Error during compilation of LAMMPS on new supercomputer

Hello

We have recently been given access to a new supercomputer here in Norway, Olivia — Sigma2 documentation. When I try to compile the latest release of LAMMPS (patch_10Sep2025) on it using GNU 14.3.0 I get an error almost immediately,
error: cannot convert ‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization :


[ 5%] Generating includes/lammps/lmptype.h
[ 5%] Built target lmptype.h
[ 5%] Generating includes/lammps/memory.h
[ 5%] Built target memory.h
[ 5%] Generating includes/lammps/modify.h
[ 5%] Built target modify.h
[ 5%] Building CXX object CMakeFiles/lammps.dir/cluster/home/oystegul/lammps/src/angle.cpp.o
In file included from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/x86_64-pc-linux-gnu/bits/gthr.h:157,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/ext/atomicity.h:35,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/bits/ios_base.h:39,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/streambuf:43,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/bits/streambuf_iterator.h:35,
from /cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/iterator:66,
from /cluster/home/oystegul/lammps/src/fmt/format.h:40,
from /cluster/home/oystegul/lammps/src/pointers.h:33,
from /cluster/home/oystegul/lammps/src/angle.h:17,
from /cluster/home/oystegul/lammps/src/angle.cpp:14:
/cluster/software/NRIS/zen5/software/GCCcore/14.3.0/include/c++/14.3.0/ext/concurrence.h:252:32: error: cannot convert ‘’ to ‘unsigned int’ in initialization
252 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
| ^~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/lammps.dir/build.make:79: CMakeFiles/lammps.dir/cluster/home/oystegul/lammps/src/angle.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:176: CMakeFiles/lammps.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Some more information about the compilation:

– Running check for auto-generated files from make-based build system
– Found MPI_CXX: /cluster/software/NRIS/zen5/software/impi/2021.16.1-intel-compilers-2025.2.0/mpi/2021.16/lib/libmpicxx.so (found version “4.1”)
– Found MPI: TRUE (found version “4.1”) found components: CXX
– Looking for C++ include omp.h
– Looking for C++ include omp.h - found
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”) found components: CXX
– Looking for sgemm_
– Looking for sgemm_ - not found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Looking for sgemm_
– Looking for sgemm_ - found

I have asked the support from the Norwegian Research Infrastructure Services but they were not able to help me, unfortunately. Can any of you help me here?

Øystein

Hi Oystein (: I notice the compilation seems to be using GCC 14.1.0, but the CMake output you listed seems to point to an Intel MPI C++ wrapper instead.

In such situations I often just delete the build folder and CMake from scratch again.

2 Likes

The error is originating from the compiler installation itself and not from LAMMPS. I suspect that the problem is due to the compiler installation or other, related issues, e.g. incompatible environment modules or similar.

You can try narrowing it down by configuring/compiling with -D BUILD_MPI=OFF and -D BUILD_OMP=OFF and no packages or only the basic set with -C cmake/presets/basic.cmake. If that is successful, you can enable packages in stages, and see which is causing trouble and then enable MPI and OMP, or the other way around.

Thanks both @srtee and @akohlmey!

You are correct about the mismatch of compiler and CMake output. That can happen sometimes when you start to try every single available compiler. I deleted the build folder, remade it and cmake’d from scratch but I still get the same error.

Then I tried to compile by cmake -C ../cmake/presets/all_off.cmake -D BUILD_MPI=OFF -D BUILD_OMP=OFF ../cmake - but still get the same error.

Now I am unsure of what to try next, any suggestions?

That suggests the selected compiler module is broken and you need to select a different one. Overall, try loading only the minimum set of environment modules.

1 Like

Yes, this worked! Apparently some special software stack had to be used. Thanks a lot!

I was looking through the Olivia documentation you linked in the first post and noticed a lack of documentation on compiling software.

This is understandable for a new cluster still being setup, but you should advise the cluster admins to include documentation on compiling. Additionally many clusters will include a PrgEnv in the default module list – precisely to avoid your situation. This goes double for the recent wave of Cray-AMD clusters where careful compilation will make a big difference to performance.

An example of similar documentation from your neighbouring country: Programming environment - Documentation

Cheers,
Shern

1 Like

Yes, that is a good point, I also noticed the lack of documentation on compilation of software. I will let the cluster admins know about this. The PrgEnv seems like a good idea, this is not present however on Olivia so we just have to work with what we’ve got.

Thank you!

Øystein