ICLDisco / parsec

PaRSEC is a generic framework for architecture aware scheduling and management of micro-tasks on distributed, GPU accelerated, many-core heterogeneous architectures. PaRSEC assigns computation threads to the cores, GPU accelerators, overlaps communications and computations and uses a dynamic, fully-distributed scheduler based on architectural features such as NUMA nodes and algorithmic features such as data reuse.
Other
47 stars 17 forks source link

make/cmake issue #215

Closed abouteiller closed 5 years ago

abouteiller commented 5 years ago

Original report by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


login21 ../conf -- Building for target x86_64 -- Found target X86_64 -- Looking for include file stdatomic.h -- Looking for include file stdatomic.h - not found -- support for 32 bits atomics - found -- support for 64 bits atomics - found -- support for 128 bits atomics - found -- Found CUDA 10.0 in /gpfs/software/cuda/10.0 -- Fortran adds libraries path /cm/local/apps/cuda/libs/current/lib64;/gpfs/software/cuda/10.0/lib64;/cm/shared/apps/slurm/17.11.12/lib64;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/gpfs/software/valgrind/3.12.0/lib/valgrind;/gpfs/software/numactl-2.0.11/lib;/gpfs/software/subversion-1.9.7/lib;/cm/shared/apps/slurm/17.11.12/lib64/slurm;/usr/lib -- Fortran adds libraries gfortran;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc -- Could NOT find GTG (missing: GTG_LIBRARY GTG_INCLUDE_DIR) -- Checking for module 'libgvc' -- No package 'libgvc' found -- Could NOT find GRAPHVIZ (missing: GRAPHVIZ_LIBRARY GRAPHVIZ_INCLUDE_DIR) -- Could NOT find Cython (missing: CYTHON_EXECUTABLE) (Required is at least version "0.21.2") -- PARSEC Modular Component Architecture (MCA) discovery: -- -- Found Component pins' -- Module alperf not selectable: PARSEC_PROF_TRACE disabled. -- ---- Moduleiterators_checker' is ON -- The PAPI Library is found at PAPI_LIBRARY-NOTFOUND -- Module papi not selectable: PARSEC_PROF_TRACE disabled. -- ---- Module print_steals' is ON -- ---- Moduleptg_to_dtd' is ON -- Module task_profiler not selectable: PARSEC_PROF_TRACE disabled. -- Component pins sources: mca/pins/pins.c;mca/pins/pins_init.c -- -- Found Component sched' -- ---- Moduleap' is ON -- ---- Module gd' is ON -- ---- Moduleip' is ON -- ---- Module lfq' is ON -- ---- Modulelhq' is ON -- ---- Module ll' is ON -- ---- Moduleltq' is ON -- ---- Module pbq' is ON -- ---- Modulernd' is ON -- ---- Module `spq' is ON -- Component sched sources: -- PARSEC Modular Component Architecture (MCA) discovery done. -- Could NOT find Omega; Options depending on Omega will be disabled (missing: OMEGA_INCLUDE_DIR OMEGA_LIBRARY) -- Internal PaRSEC uses CAS 128B. Reconfiguring parsec_options.h


Configuration flags:  
CMAKE\_C\_FLAGS          =  -m64 -std=c1x -mcx16  
CMAKE\_C\_LDFLAGS        =  -m64  
CMAKE\_EXE\_LINKER\_FLAGS =  
EXTRA\_LIBS             = /gpfs/projects/ChapmanGroup/opt/hwloc/2.0.2/lib/libhwloc.so;-L/cm/local/apps/cuda/libs/current/lib64;-L/gpfs/software/cuda/10.0/lib64;-L/cm/shared/apps/slurm/17.11.12/lib64;-L/usr/lib/gcc/x86\_64-redhat-linux/4.8.5;-L/usr/lib64;-L/lib64;-L/gpfs/software/valgrind/3.12.0/lib/valgrind;-L/gpfs/software/numactl-2.0.11/lib;-L/gpfs/software/subversion-1.9.7/lib;-L/cm/shared/apps/slurm/17.11.12/lib64/slurm;-L/usr/lib;gfortran;m;gcc\_s;gcc;quadmath;c

-- Configuring done  
-- Generating done  
-- Build files have been written to: /gpfs/home/arcurtis/src/parsec/build  
login2[1](~/src/parsec/build) make  
\[  1%\] Built target build\_with\_parsec  
\[  1%\] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/debug.c.o  
In file included from /gpfs/home/arcurtis/src/parsec/source/parsec/utils/debug.c:13:0:  
/gpfs/home/arcurtis/src/parsec/source/parsec/include/parsec/sys/tls.h:81:2: error: #error "No Thread Specific API defined \(CMake should have failed\)"  
\#error "No Thread Specific API defined \(CMake should have failed\)"  
^  
make\[2\]: \*\*\* \[parsec/CMakeFiles/parsec-base-obj.dir/utils/debug.c.o\] Error 1  
make\[1\]: \*\*\* \[parsec/CMakeFiles/parsec-base-obj.dir/all\] Error 2  
make: \*\*\* \[all\] Error 2

```shell
abouteiller commented 5 years ago

Original comment by Thomas Herault (Bitbucket: herault, GitHub: therault).


Hi Tony,

thanks for the bug report. Can you reproduce the problem after removing CMakeCache.txt from your build directory and attach the output as well as the CMakeFiles/CMakeOutput.log file?

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


login21 ../conf
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The Fortran compiler identification is GNU 4.8.5
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.5.37")
-- Building for target x86_64
-- Found target X86_64
-- Performing Test C_M32or64
-- Performing Test C_M32or64 - Success
-- Performing Test PARSEC_HAVE_STD_C1x
-- Performing Test PARSEC_HAVE_STD_C1x - Success
-- Performing Test PARSEC_HAVE_WALL
-- Performing Test PARSEC_HAVE_WALL - Success
-- Performing Test PARSEC_HAVE_WEXTRA
-- Performing Test PARSEC_HAVE_WEXTRA - Success
-- Performing Test PARSEC_HAVE_PAR_EQUALITY
-- Performing Test PARSEC_HAVE_PAR_EQUALITY - Success
-- Performing Test PARSEC_HAVE_G3
-- Performing Test PARSEC_HAVE_G3 - Success
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int128_t
-- Check size of __int128_t - done
-- Performing Test PARSEC_COMPILER_C11_COMPLIANT
-- Performing Test PARSEC_COMPILER_C11_COMPLIANT - Success
-- Performing Test PARSEC_STDC_HAVE_C11_ATOMICS
-- Performing Test PARSEC_STDC_HAVE_C11_ATOMICS - Success
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - not found
-- Performing Test PARSEC_ATOMIC_USE_GCC_32_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_GCC_32_BUILTINS - Success
-- Performing Test PARSEC_ATOMIC_USE_GCC_64_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_GCC_64_BUILTINS - Success
-- Performing Test PARSEC_ATOMIC_USE_GCC_128_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_GCC_128_BUILTINS - Failed
-- Performing Test PARSEC_ATOMIC_USE_GCC_128_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_GCC_128_BUILTINS - Success
-- Performing Test PARSEC_ATOMIC_USE_XLC_32_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_XLC_32_BUILTINS - Failed
-- Performing Test PARSEC_ATOMIC_USE_MIPOSPRO_32_BUILTINS
-- Performing Test PARSEC_ATOMIC_USE_MIPOSPRO_32_BUILTINS - Failed
-- Performing Test PARSEC_ATOMIC_USE_SUN_32
-- Performing Test PARSEC_ATOMIC_USE_SUN_32 - Failed
-- support for 32 bits atomics - found
-- support for 64 bits atomics - found
-- support for 128 bits atomics - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for pthread_getspecific
-- Looking for pthread_getspecific - not found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - not found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - not found
-- Looking for sched_setaffinity
-- Looking for sched_setaffinity - found
-- Performing Test PARSEC_HAVE_TIMESPEC_TV_NSEC
-- Performing Test PARSEC_HAVE_TIMESPEC_TV_NSEC - Success
-- Looking for clock_gettime in c
-- Looking for clock_gettime in c - found
-- Looking for include file stdarg.h
-- Looking for include file stdarg.h - found
-- Performing Test PARSEC_HAVE_VA_COPY
-- Performing Test PARSEC_HAVE_VA_COPY - Success
-- Performing Test PARSEC_HAVE_ATTRIBUTE_FORMAT_PRINTF
-- Performing Test PARSEC_HAVE_ATTRIBUTE_FORMAT_PRINTF - Success
-- Performing Test PARSEC_HAVE_THREAD_LOCAL
-- Performing Test PARSEC_HAVE_THREAD_LOCAL - Failed
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Looking for getopt_long
-- Looking for getopt_long - found
-- Looking for include file errno.h
-- Looking for include file errno.h - found
-- Looking for include file stddef.h
-- Looking for include file stddef.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for include file ctype.h
-- Looking for include file ctype.h - found
-- Performing Test PARSEC_HAVE_BUILTIN_CPU
-- Performing Test PARSEC_HAVE_BUILTIN_CPU - Success
-- Performing Test PARSEC_HAVE_BUILTIN_CPU512
-- Performing Test PARSEC_HAVE_BUILTIN_CPU512 - Failed
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for RUSAGE_THREAD
-- Looking for RUSAGE_THREAD - not found
-- Looking for RUSAGE_THREAD
-- Looking for RUSAGE_THREAD - found
-- Looking for include file limits.h
-- Looking for include file limits.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file libgen.h
-- Looking for include file libgen.h - found
-- Looking for include file complex.h
-- Looking for include file complex.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file syslog.h
-- Looking for include file syslog.h - found
-- Performing Test PARSEC_HAVE_ATTRIBUTE_ALWAYS_INLINE
-- Performing Test PARSEC_HAVE_ATTRIBUTE_ALWAYS_INLINE - Success
-- Performing Test PARSEC_HAVE_ATTRIBUTE_VISIBILITY
-- Performing Test PARSEC_HAVE_ATTRIBUTE_VISIBILITY - Success
-- Performing Test PARSEC_HAVE_BUILTIN_EXPECT
-- Performing Test PARSEC_HAVE_BUILTIN_EXPECT - Success
-- Looking for dlsym
-- Looking for dlsym - found
-- Found HWLOC: /gpfs/projects/ChapmanGroup/opt/hwloc/2.0.2/lib/libhwloc.so
-- Performing Test PARSEC_HAVE_HWLOC_PARENT_MEMBER
-- Performing Test PARSEC_HAVE_HWLOC_PARENT_MEMBER - Success
-- Performing Test PARSEC_HAVE_HWLOC_CACHE_ATTR
-- Performing Test PARSEC_HAVE_HWLOC_CACHE_ATTR - Success
-- Performing Test PARSEC_HAVE_HWLOC_OBJ_PU
-- Performing Test PARSEC_HAVE_HWLOC_OBJ_PU - Success
-- Looking for hwloc_bitmap_free in /gpfs/projects/ChapmanGroup/opt/hwloc/2.0.2/lib/libhwloc.so
-- Looking for hwloc_bitmap_free in /gpfs/projects/ChapmanGroup/opt/hwloc/2.0.2/lib/libhwloc.so - found
-- Performing Test MPI_WORKS_WITH_WRAPPER
-- Performing Test MPI_WORKS_WITH_WRAPPER - Failed
-- Found MPI_C: /gpfs/projects/ChapmanGroup/opt/openmpi/4.0.1/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /gpfs/projects/ChapmanGroup/opt/openmpi/4.0.1/lib/libmpi_cxx.so (found version "3.1")
-- Found MPI_Fortran: /gpfs/projects/ChapmanGroup/opt/openmpi/4.0.1/lib/libmpi_usempi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Looking for MPI_Type_create_resized
-- Looking for MPI_Type_create_resized - found
-- Performing Test PARSEC_HAVE_MPI_OVERTAKE
-- Performing Test PARSEC_HAVE_MPI_OVERTAKE - Failed
-- Found CUDA: /gpfs/software/cuda/10.0 (found version "10.0")
-- Found CUDA 10.0 in /gpfs/software/cuda/10.0
-- Looking for cudaDeviceCanAccessPeer
-- Looking for cudaDeviceCanAccessPeer - found
-- Fortran adds libraries path /cm/local/apps/cuda/libs/current/lib64;/gpfs/software/cuda/10.0/lib64;/cm/shared/apps/slurm/17.11.12/lib64;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/gpfs/software/valgrind/3.12.0/lib/valgrind;/gpfs/software/numactl-2.0.11/lib;/gpfs/software/subversion-1.9.7/lib;/cm/shared/apps/slurm/17.11.12/lib64/slurm;/usr/lib
-- Fortran adds libraries gfortran;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc
-- Could NOT find GTG (missing: GTG_LIBRARY GTG_INCLUDE_DIR)
-- Checking for module 'libgvc'
-- No package 'libgvc' found
-- Could NOT find GRAPHVIZ (missing: GRAPHVIZ_LIBRARY GRAPHVIZ_INCLUDE_DIR)
-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Could NOT find Cython (missing: CYTHON_EXECUTABLE) (Required is at least version "0.21.2")
-- Looking for shm_open
-- Looking for shm_open - not found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- PARSEC Modular Component Architecture (MCA) discovery:
-- -- Found Component pins' -- Module alperf not selectable: PARSEC_PROF_TRACE disabled. -- ---- Moduleiterators_checker' is ON
-- The PAPI Library is found at PAPI_LIBRARY-NOTFOUND
-- Module papi not selectable: PARSEC_PROF_TRACE disabled.
-- ---- Module print_steals' is ON -- ---- Moduleptg_to_dtd' is ON
-- Module task_profiler not selectable: PARSEC_PROF_TRACE disabled.
-- Component pins sources: mca/pins/pins.c;mca/pins/pins_init.c
-- -- Found Component sched' -- ---- Moduleap' is ON
-- ---- Module gd' is ON -- ---- Moduleip' is ON
-- ---- Module lfq' is ON -- ---- Modulelhq' is ON
-- ---- Module ll' is ON -- ---- Moduleltq' is ON
-- ---- Module pbq' is ON -- ---- Modulernd' is ON
-- ---- Module `spq' is ON
-- Component sched sources:
-- PARSEC Modular Component Architecture (MCA) discovery done.
-- Could NOT find Omega; Options depending on Omega will be disabled (missing: OMEGA_INCLUDE_DIR OMEGA_LIBRARY)
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Looking for PARSEC_ATOMIC_HAS_ATOMIC_CAS_INT128
-- Looking for PARSEC_ATOMIC_HAS_ATOMIC_CAS_INT128 - found
-- Internal PaRSEC uses CAS 128B. Reconfiguring parsec_options.h

Configuration flags:
CMAKE_C_FLAGS = -m64 -std=c1x -mcx16
CMAKE_C_LDFLAGS = -m64
CMAKE_EXE_LINKER_FLAGS =
EXTRA_LIBS = /gpfs/projects/ChapmanGroup/opt/hwloc/2.0.2/lib/libhwloc.so;-L/cm/local/apps/cuda/libs/current/lib64;-L/gpfs/software/cuda/10.0/lib64;-L/cm/shared/apps/slurm/17.11.12/lib64;-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5;-L/usr/lib64;-L/lib64;-L/gpfs/software/valgrind/3.12.0/lib/valgrind;-L/gpfs/software/numactl-2.0.11/lib;-L/gpfs/software/subversion-1.9.7/lib;-L/cm/shared/apps/slurm/17.11.12/lib64/slurm;-L/usr/lib;gfortran;m;gcc_s;gcc;quadmath;c

-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

COREBLAS_INCLUDE_DIRS
COREBLAS_LIBRARIES
COREBLAS_LIBRARY_DIRS

-- Build files have been written to: /gpfs/home/arcurtis/src/parsec/build
login21 make
Scanning dependencies of target build_with_parsec
[ 0%] Generating contrib/build_with_parsec/dtd_test_allreduce.c
[ 1%] Generating contrib/build_with_parsec/flops.h
[ 1%] Generating contrib/build_with_parsec/write_check.jdf
[ 1%] Built target build_with_parsec
[ 1%] [FLEX][keyval_flex] Building scanner with flex 2.5.37
[ 1%] [FLEX][show_help_flex] Building scanner with flex 2.5.37
Scanning dependencies of target parsec-base-obj
[ 2%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_dequeue.c.o
[ 2%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_fifo.c.o
[ 2%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_lifo.c.o
[ 3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_list.c.o
[ 3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_object.c.o
[ 3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_value_array.c.o
[ 3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_hash_table.c.o
[ 4%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_rwlock.c.o
[ 4%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/argv.c.o
[ 4%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/cmd_line.c.o
[ 5%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/colors.c.o
[ 5%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/parsec_environ.c.o
[ 5%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/installdirs.c.o
[ 6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/keyval_parse.c.o
[ 6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_param.c.o
[ 6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_param_cmd_line.c.o
[ 6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_parse_paramfile.c.o
[ 7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/os_path.c.o
[ 7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/output.c.o
[ 7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/show_help.c.o
[ 8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/zone_malloc.c.o
[ 8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/atomic_external.c.o
[ 8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/debug.c.o
In file included from /gpfs/home/arcurtis/src/parsec/source/parsec/utils/debug.c:13:0:
/gpfs/home/arcurtis/src/parsec/source/parsec/include/parsec/sys/tls.h:81:2: error: #error "No Thread Specific API defined (CMake should have failed)"
#error "No Thread Specific API defined (CMake should have failed)"
^
make[2]: *** [parsec/CMakeFiles/parsec-base-obj.dir/utils/debug.c.o] Error 1
make[1]: *** [parsec/CMakeFiles/parsec-base-obj.dir/all] Error 2
make: *** [all] Error 2

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


How to add file with text output?

abouteiller commented 5 years ago

Original comment by Thomas Herault (Bitbucket: herault, GitHub: therault).


You can edit the issue (top of the page), there you will have a ‘attachments’ field, where you can attach files to the issue.

It seems that your GCC is pretty old (4.8.5). What version of the glibc do you have? I'm wondering why CMake could not find pthread_getspecific...

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


glibc = glibc-2.17-222.el7

abouteiller commented 5 years ago

Original comment by Thomas Herault (Bitbucket: herault, GitHub: therault).


glibc-2.17 is old (2012), but it does define pthread_getspecific (according to the source…). Even pthread_barrier_init should be defined…

Can you also attach the CMakeError.log file? I don’t see why CMake did not find any of the pthread_* functions after it found the pthread.h file.

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


abouteiller commented 5 years ago

Original comment by Thomas Herault (Bitbucket: herault, GitHub: therault).


Can you try applying the following patch and notify in the issue if the problem persists (or change)? I don’t have access to a compiler/glibc combination old enough at this time to get in the case where -lpthread is needed, and I cannot reproduce.

Thanks,

diff --git a/CMakeLists.txt b/CMakeLists.txt
index [8aa1240 (bb)](https://bitbucket.org/icldistcomp/parsec/commits/8aa1240)..d2c5f47 [100644 (bb)](https://bitbucket.org/icldistcomp/parsec/commits/100644)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -384,8 +384,9 @@ find_package(Threads)
 if(Threads_FOUND)
   set(PARSEC_HAVE_PTHREAD true)
   CMAKE_PUSH_CHECK_STATE()
-  check_function_exists(pthread_getspecific PARSEC_HAVE_PTHREAD_GETSPECIFIC)
-  check_function_exists(pthread_barrier_init PARSEC_HAVE_PTHREAD_BARRIER)
+  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
+  check_symbol_exists(pthread_getspecific "pthread.h" PARSEC_HAVE_PTHREAD_GETSPECIFIC)
+  check_symbol_exists(pthread_barrier_init "pthread.h" PARSEC_HAVE_PTHREAD_BARRIER)
   if(NOT PARSEC_HAVE_PTHREAD_BARRIER)
     check_symbol_exists(pthread_barrier_init "pthread-barrier.h" PARSEC_HAVE_PTHREAD_BARRIER_H)
     if(PARSEC_HAVE_PTHREAD_BARRIER_H)
abouteiller commented 5 years ago

Original comment by George Bosilca (Bitbucket: bosilca, GitHub: bosilca).


The gcc used is ancient, 4.8.5 !!

Indeed this compiler need -pthread to provide support for pthread, and according to the CMake documentation this dependency is not automatically added to the cmake required libraries. We do set the dependency on all the targets to Threads::Threads, but our configuration checks do not have the same flags. However, to avoid the double presence of -pthread in the linking flags we do need to have the push/pop check state, but then all threads related checks must be protected inside.

abouteiller commented 5 years ago

@{557058:1b61a2aa-7f7b-48d0-9f84-7c97af04f674} that fixed it on BG/Q

abouteiller commented 5 years ago

Original comment by Thomas Herault (Bitbucket: herault, GitHub: therault).


PR #306 might fix. Let us know if it does not.

abouteiller commented 5 years ago

Original comment by George Bosilca (Bitbucket: bosilca, GitHub: bosilca).


For environments that need to add -lpthread or -pthread to get pthread_barrier_init and/or pthread_getspecific, we need to add CMAKE_THREAD_LIBS_INIT provided by find_package(threads) into CMAKE_REQUIRED_LIBRARIES during the tests.

This should fix issue #215

→ <<cset b7766cf7906e (bb)>>

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


Wait…I had a typo in my MPI setup, adding MPI correctly to my build environment fixed things: parsec now compiles with that patch and the old gcc.

abouteiller commented 5 years ago

Original comment by George Bosilca (Bitbucket: bosilca, GitHub: bosilca).


Can you attach the CMakeError.log please.

abouteiller commented 5 years ago

Original comment by George Bosilca (Bitbucket: bosilca, GitHub: bosilca).


Awesome, we can then close this issue. Thanks for following up.

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


I attached the one from the failed compile up-thread.

abouteiller commented 5 years ago

Original comment by Tony Curtis (Bitbucket: tony-curtis, GitHub: tony-curtis).


Yep, mea culpa with MPI. Strange failure mode though. Let’s fermer!