Skip to content

Commit c7978fa

Browse files
committed
Fixed errors for MacOSx / Apple
1 parent f61416f commit c7978fa

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

affinity/affinity.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
**********************************************************************/
1919
#define _GNU_SOURCE
2020

21+
#ifdef MACOS
22+
23+
int get_cpu_affinity(void) { return -1; };
24+
void set_cpu_affinity( int cpu ) {};
25+
26+
#else
27+
2128
#include <stdio.h>
2229
#include <stdlib.h>
2330
#include <string.h>
@@ -58,7 +65,6 @@ int get_cpu_affinity(void)
5865
return -1;
5966
}
6067

61-
int get_cpu_affinity_(void) { return get_cpu_affinity(); } /* Fortran interface */
6268

6369

6470
/*
@@ -122,4 +128,7 @@ int set_cpu_affinity(int cpu)
122128
return 0;
123129
}
124130

125-
int set_cpu_affinity_(int *cpu) { return set_cpu_affinity(*cpu); } /* Fortran interface */
131+
#endif
132+
133+
int get_cpu_affinity_(void) { return get_cpu_affinity(); } /* Fortran interface */
134+
void set_cpu_affinity_(int *cpu) { return set_cpu_affinity(*cpu); } /* Fortran interface */

mpp/mpp_parameter.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ module mpp_parameter_mod
117117
! combination with the flag parameter defined above to create a unique identifier for
118118
! each Domain+flags combination. Therefore, the value of any flag must not exceed DOMAIN_ID_BASE.
119119
! integer(LONG_KIND), parameter :: DOMAIN_ID_BASE=INT( 2**(4*LONG_KIND),KIND=LONG_KIND )
120-
integer(LONG_KIND), parameter :: DOMAIN_ID_BASE=Z'0000000100000000' ! Workaround for 64bit init problem
120+
integer(LONG_KIND), parameter :: DOMAIN_ID_BASE=INT(Z'0000000100000000') ! Workaround for 64bit init problem
121121
integer, parameter :: NON_BITWISE_EXACT_SUM=0
122122
integer, parameter :: BITWISE_EXACT_SUM=1
123123
integer, parameter :: BITWISE_EFP_SUM=2

0 commit comments

Comments
 (0)