# HG changeset patch # User joh342@DHLRI-0810.OSUMC.EDU # Date 1374856776 14400 # Node ID 0bd64fa7fcebf17ddda54e5f5c6060f92c0f75c9 # Parent 88fc6f6ed80a5198a5152c7e31a55cdab37725fc worked around threading stuff. diff -r 88fc6f6ed80a -r 0bd64fa7fceb irt/mex/src/def/jf,thread1.c --- a/irt/mex/src/def/jf,thread1.c Fri Jul 26 10:49:06 2013 -0400 +++ b/irt/mex/src/def/jf,thread1.c Fri Jul 26 12:39:36 2013 -0400 @@ -39,6 +39,9 @@ #include #endif +#if defined(Is_pc) // for omp_get_num_procs +# include +#endif // jf_thread1_ncore() // return number of available cores, if possible @@ -56,10 +59,12 @@ Fail1("sysctl returned %d", ncore) #endif -#if 1 // this works on mac osx and linux +#if !defined(Is_pc) // this works on mac osx and linux ncore = sysconf( _SC_NPROCESSORS_ONLN ); if (ncore == -1) Fail("sysconf() failed") +#else + ncore = omp_get_num_procs(); #endif if (nwant == -1) { // user wants as many as possible