I am trying to install OpenMC develop branch on a small HPC we have. It is running CENTOS 7. after sorting out the pre-requisites like GCC, MPICH, HDF5, CMAKE the code compiles fine. but when i run the code after compiling it, it gives an error as shown below in the figure. the figure also contains the version information of various pre-requisites. HDF5 is compiled from source. I tried setting LD_LIBRARY_PATH environment variable to see if that can resolve the issue but no success.
Your help in this regard will be highly appreciated.
My guess is that the C++ standard library that it is picking up is not sufficient. OpenMC requires C++14 features from the standard library, so if the openmc executable links against a version of libstdc++.so that doesn’t have the necessary functionality, errors like this can occur. This is perhaps not too surprising in your case because Centos 7 is a bit old — from what I can tell gcc 4.8 is the default in Centos 7. However, It looks like you do have a recent build of gcc installed somewhere. You need to make sure that the openmc executable links against libstdc++.so from gcc 10.
Dear @paulromano
Thanks for the reply. Can you suggest how can I do that. I tried setting ld_library_path environment variable pointing to HDF folder but to no avail.
This suggestion may not help, but I faced exactly the same problem recently with Geant-4, for the reason explained by @paulromano. In my case, this was solved by calling this function in every run.