Copyright (c) 2012-2019 Jose Hernandez
On MacOS, please install libomp before building the simulation program. I.e.
brew install libomp
On MacOS generate the makefile with the following cmake comnand:
cmake -DOpenMP_C_FLAGS="-fopenmp=lomp" -DOpenMP_CXX_FLAGS="-fopenmp=lomp" -DOpenMP_C_LIB_NAMES="libomp" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -I/usr/local/Cellar/libomp/8.0.0/include" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_libomp_LIBRARY=/usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -I/usr/local/Cellar/libomp/8.0.0/include" .
On other platforms where CMake can detect OpenMP, the following command may suffice:
Run the following commands to build the application:
cmake .
After generating the makefile, compile the code using make. I.e.
make
Once built, the code can be run using this command:
./boltzmann-openmp
You can generate XCode projects using CMake. Please note that you may need to delete CMakeCache.txt if the project has been built before using a different gerenerator.
rm CMakeCache.txt
cmake -G "XCode" -DOpenMP_C_FLAGS="-fopenmp=lomp" -DOpenMP_CXX_FLAGS="-fopenmp=lomp" -DOpenMP_C_LIB_NAMES="libomp" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -I/usr/local/Cellar/libomp/8.0.0/include" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_libomp_LIBRARY=/usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/Cellar/libomp/8.0.0/lib/libomp.dylib -I/usr/local/Cellar/libomp/8.0.0/include" .