Open
Description
Description
My attempts to compile Isca on a Mac OS have failed, so for now I give up. Until this issue is fixed (and unless I am just confused) my suggestion would be that you add a warning in the docs & README.md that Isca can only be built on a linux machine (not on Mac).
At first I tried as explained in the README (i.e. via held_suarez_test_case.py
) and then as explained in the docs (i.e. via py.test
).
I get error messages that have to do with system calls that seem specific for linux:
ulimit -s unlimited
insrc/extra/python/isca/templates/compile.sh
syscall(__NR_gettid)
insrc/shared/mpp/affinity.c
cpu_set_t
,CPU_ZERO
,coremask
, etc also inmpp/affinity.c
The patch below shows what I did to get past the first two errors based on finding this post.
I also found this other post by @ntlewis , I think, which links to this potential solution.
git diff / patch I tried
--- a/src/extra/python/isca/templates/compile.sh
+++ b/src/extra/python/isca/templates/compile.sh
@@ -20,7 +20,7 @@ executable={{ executable_name }}
netcdf_flags=`nf-config --fflags --flibs`
-ulimit -s unlimited # Set stack size to unlimited
+#ulimit -s unlimited # Set stack size to unlimited
export MALLOC_CHECK_=0
# 3. compile the mppncombine tool if it hasn't yet been done.
diff --git a/src/shared/mpp/affinity.c b/src/shared/mpp/affinity.c
index f0eb781..e165365 100644
--- a/src/shared/mpp/affinity.c
+++ b/src/shared/mpp/affinity.c
@@ -30,9 +30,13 @@
#include <sys/resource.h>
#include <sys/syscall.h>
+#include <pthread.h>
+
static pid_t gettid(void)
{
- return syscall(__NR_gettid);
+ uint64_t tid64;
+ pthread_threadid_np(NULL, &tid64);
+ return (pid_t)tid64;
}
/*
Activity