-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed on LLNL singe cluster #2954
Comments
Hey @Plasdom ! For the first error: It looks like you have to reinstall fftw3 as a shared library. I think the second (DWARF) error is because the system binutils |
Thanks for the help. I've rebuilt fftw with
The warning on the first line is probably a clue. The version of netcdf I'm using is 4.7.0. Looks like the version of binutils is 2.27 which is quite old, so do I need to update that? |
Update: I have built the latest version of binutils and get the same error. The warning on the first line above was caused by using a different version of gcc from the one it seems netcdf was compiled with; fixing this removes the warning but does not fix the errors ( |
Can you post the content of Have you tried removing the build folder, after you fixed the netcdf warning? |
On 8/5/24 15:32, Dominic Power wrote:
Yes, |examples/conduction/CMakeFiles/conduction.dir/link.txt| looks like:
image.png (view on web)
<https://github.com/user-attachments/assets/f4f73baf-f171-4ccb-8fe7-503bd0e36d36>
Can you please share the text rather then a picture?
|
|
what does nm -CD /usr/local/netcdf/lib/libnetcdf_c++4.so | grep 'netCDF::NcFile::NcFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, netCDF::NcFile::FileMode)' say? Is You probably need to tell cmake to use the ones you want to use. |
if the above has no output, what does: |
The first command has no output. The second has the following:
|
Any thoughts on this? |
As far as I can tell, the issue is that netcdf-c++ has been compiled against an old c++-standard, while you are using a newer c++ standard to compile bout++. As such you need to link against a netcdf-c++ that is also compiled with a newer c++ standard. See previous comments as to what could be the cause of that. |
I thought it might be something like that. I've tried building netcdf from source with no success so far, so I'll focus on that for now. Thanks for your help. |
Have you tried building BOUT++ with:
This will build the netcdf C++ library as part of the BOUT++ build. It also looks like you're using the system gcc (7.4) rather than the modules one (12.2). I suspect you're also picking up the system netcdf too. Please can you run the following:
It could be that you've built mpich using the system compiler, so cmake is going to pick that up instead of the module one. If so, you'll either have to recompile mpich or use an MPI implementation from the module system |
Yep, as you spotted BOUT++ is picking up the system netcdf and proceeding without building it, even with that flag set. I suspect building netcdf myself and using that with BOUT++ would fix the problem, but I'm hitting an error there which I haven't resolved yet ( Output from
Output from
Output from
Output from
|
CMake is sometimes weird about finding the wrong compiler. cmake -DCMAKE_CXX_COMPILER=$(which g++) \
-DCMAKE_C_COMPILER=$(which gcc) \
-DMPI_CXX_COMPILER=$(which mpic++) \
-DMPI_C_COMPILER=$(which mpicc) maybe something like that helps cmake find the right compiler + mpiwrappers Setting the serial compiler is sometimes needed, as otherwise cmake things the flags do not work, because it tests them with the wrong compiler. |
@Plasdom Although we don't have a configuration for |
I'm trying to build the latest version of bout++ on LLNL's singe cluster (Red Hat Enterprise Linux v7.9). I am using the singe modules gcc (v12.2) and netcdf (v4.3.3.1), and versions of cmake (v3.30.1), mpich (v4.2.2) and fftw (v3.3) built from source. I can succesfully configure but not build with the following:
The error from cmake is many lines similar to:
I've also tried running cmake with the flag
-DBUILD_SHARED_LIBS=Off
. This allows bout++ to build successfully, but it then fails when building examples:The cache file is here: CMakeCache.txt
The text was updated successfully, but these errors were encountered: