I am trying to install OpenMC from source on Theta at ANL. I am running into a warning when using CMake that I fear may cause issues at runtime. I get the following warning two times when using CMake:
“ADD_LIBRARY called with SHARED option but the target platform does not support dynamic linking. Building a STATIC library instead. This may lead to problems”
Due to hardware differences between login (non-KNL) and compute nodes (Intel Phi 2nd Generation KNL), compilation of application codes on Theta systems normally involves cross-compiling. The module craype-mic-knl loaded by default defines the target architecture along with the appropriate compilation options that tune the compiler optimization to KNL hardware. For that reason, any compiler options preexisting in the application Makefile that auto-tune the code to the automatically recognized CPU architecture of the login node where the compilation proceeds have negative impact on performance of the compiled code, and should be removed.
Are there any places in the CMakeFiles where I could make this change?
I happened upon this thread this morning. Maybe @paulromano has already replied to you offline, but you can try changing the following line in the CMakeLists.txt file:
to add_library(libopenmc STATIC ${libopenmc_SOURCES}) if you want to get rid of this warning.
I understand your concern, but it appears that CMake is doing this by default. Are you asking about this mainly to remove the warning or are you noticing problems with the resulting OpenMC executable?