QMCPACK / miniqmc

QMCPACK miniapp: a simplified real space QMC code for algorithm development, performance portability testing, and computer science experiments
Other
26 stars 34 forks source link

Building without OpenMP fails on test_ParallelBlock.cpp #264

Closed joncooknmsu closed 3 years ago

joncooknmsu commented 3 years ago

With "cmake -DQMC_OMP=0 .." then "make" I get:

[ 51%] Linking CXX executable ../../../tests/bin/test_utilities CMakeFiles/test_utilities.dir/test_ParallelBlock.cpp.o: In function qmcplusplus::____C_A_T_C_H____T_E_S_T____0()': test_ParallelBlock.cpp:(.text+0x260): undefined reference toomp_set_num_threads' collect2: error: ld returned 1 exit status

I poked around and tried "cmake -DQMC_OMP=0 -DBUILD_TESTING=0 -DBUILD_UNIT_TESTS=0 .." but it still tries to build it. I didn't see any other flags related to building test files. I don't know if there will be further fails. For research purposes I want to build miniqmc with gprof profiling, and gprof doesn't play well with threads. I will continue to poke around but I'm not a regular CMake user so it's a bit Greek.

ye-luo commented 3 years ago

We are not maintaining QMC_OMP=0 case right now, because QMCPACK users always enable OpenMP and miniQMC carries this behavior. Could you keep the default or set QMC_OMP=1? Or let me know if you have to disable OpenMP.

joncooknmsu commented 3 years ago

Yeah, we'll try to work around it. I expected that answer and so am not surprised. Feel free to close this issue if you want.

ye-luo commented 3 years ago

If you manage to fix it, PR is welcome.