Hi
That’s a runtime library for running programs that have been compiled with openmp?
This is the OpenMP runtime library needed by OpenMP enabled programs
that were built with the -fopenmp compiler option and by programs that
were auto-parallelized via the -ftree-parallelize-loops compiler
option.
Hello,
Did you mean the libgomp1 dependency I included? I am not sure if it is needed, I just found some random recommendation.
I have change the flags as my old one seems to be wrong.
I think I use it correctly now. Still, I am uncertain what went wrong from the build log.
I would suggest a first step is to build as per instructions, no using the macros…
mkdir build
cd build
cmake ..
make
git clone https://github.com/mrc-ide/covid-sim.git
Cloning into 'covid-sim'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 6871 (delta 23), reused 25 (delta 12), pack-reused 6825
Receiving objects: 100% (6871/6871), 101.93 MiB | 5.86 MiB/s, done.
Resolving deltas: 100% (5715/5715), done.
cd covid-sim
mkdir build
cd build
cmake ..
-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found Python3: /usr/bin/python3.8 (found version "3.8.3") found components: Interpreter
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /data/repositories/covid-sim/build
/data/repositories/covid-sim/build> make
Scanning dependencies of target CovidSim
6%] Building CXX object src/CMakeFiles/CovidSim.dir/CovidSim.cpp.o
13%] Building CXX object src/CMakeFiles/CovidSim.dir/BinIO.cpp.o
20%] Building CXX object src/CMakeFiles/CovidSim.dir/Rand.cpp.o
26%] Building CXX object src/CMakeFiles/CovidSim.dir/Error.cpp.o
33%] Building CXX object src/CMakeFiles/CovidSim.dir/Dist.cpp.o
40%] Building CXX object src/CMakeFiles/CovidSim.dir/Kernels.cpp.o
46%] Building CXX object src/CMakeFiles/CovidSim.dir/Bitmap.cpp.o
53%] Building CXX object src/CMakeFiles/CovidSim.dir/SetupModel.cpp.o
60%] Building CXX object src/CMakeFiles/CovidSim.dir/CalcInfSusc.cpp.o
66%] Building CXX object src/CMakeFiles/CovidSim.dir/Sweep.cpp.o
73%] Building CXX object src/CMakeFiles/CovidSim.dir/Update.cpp.o
80%] Building CXX object src/CMakeFiles/CovidSim.dir/Param.cpp.o
86%] Building CXX object src/CMakeFiles/CovidSim.dir/MicroCellPosition.cpp.o
93%] Building CXX object src/CMakeFiles/CovidSim.dir/Direction.cpp.o
[100%] Linking CXX executable CovidSim
[100%] Built target CovidSim
Note gcc 9
Additional note: add cmake -DCMAKE_VERBOSE_MAKEFILE=ON … for verbose make output…
Hello,
I should have tried building on my local machine first as you said.
But covid-sim would still not found openMP on my TW machine.
So OpenMP is a feature in gcc. From what I understand C compiler and CXX compiler mustbe the same version for OpenMP to detect properly.
andy@linux:~/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build> cmake ..
-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'RelWithDebInfo' as none was specified.
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindOpenMP.cmake:529 (find_package_handle_standard_args)
CMakeLists.txt:35 (find_package)
-- Configuring incomplete, errors occurred!
The C compiler identification is GNU and CXX compiler identification is 9.3.1.
I look inside CMakeError.log, don’t look like anything useful.
Detecting C OpenMP failed with the following output:
Change Dir: /home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_052e2/fast && /usr/bin/gmake -f CMakeFiles/cmTC_052e2.dir/build.make CMakeFiles/cmTC_052e2.dir/build
gmake[1]: Entering directory '/home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp'
CMakeFiles/cmTC_052e2.dir/build.make:84: *** target pattern contains no '%'. Stop.
gmake[1]: Leaving directory '/home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:141: cmTC_052e2/fast] Error 2
Detecting CXX OpenMP failed with the following output:
Change Dir: /home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_4a0e5/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4a0e5.dir/build.make CMakeFiles/cmTC_4a0e5.dir/build
gmake[1]: Entering directory '/home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp'
CMakeFiles/cmTC_4a0e5.dir/build.make:84: *** target pattern contains no '%'. Stop.
gmake[1]: Leaving directory '/home/kev-test/Desktop/Software/OBS Projects/home:andythe_great/covid-sim/covid-sim-0.13.0/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:141: cmTC_4a0e5/fast] Error 2
I’m a bit lost.
Thanks.
Edit: Trying to use “cmake … -DOpenMP_C_FLAGS=-fopenmp” yields the same error.
Hi
There is something wrong with your local build environment… I tested here on Leap 15.1 and SLED 15 SP2 beta, both ran cmake fine and detected OpenMP present…
Hi
The -C option is change to the directory, in this case ‘build’ I imagine a patch is needed to get it correct for using the macro, since it’s just a binary easier to just install, then look at the cmake/make/Makefile install issue…