Trouble in running on CENTOS 7

Hello all,

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.

@paulromano any clues???

thanks

Dear all developers and @paulromano

Can you please guide in this regard?

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.

@khurrum,

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.

missed_path()
{
LD_LIBRARY_PATH=$PATH::/YourPathTo/gcc-10.2.0/lib64/
export LD_LIBRARY_PATH
}

This function can be added in your .profile. and/or merged to your compile OpenMC alias.

Thanks @Ahmed and @paulromano I will try that.