https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120632

--- Comment #2 from ktkachov at gcc dot gnu.org ---

[tag] [reply] [−][email protected] 2025-03-18 08:54:08 UTC
Tamar and I have been discussing this offline but now that we have a reproducer
with all public sources here's a bug report.

We see GROMACS giving an internal error when built for -march=armv9-a.
To reproduce you need to get GROMACS from:
https://gitlab.com/gromacs/gromacs.git

You can get the source from https://gitlab.com/gromacs/gromacs.git

and use branch v2025.0-1

You may need to patch one of the header files trivially to make it build:
--- a/src/gromacs/mdtypes/energyhistory.h
+++ b/src/gromacs/mdtypes/energyhistory.h
@@ -51,6 +51,7 @@

 #include <memory>
 #include <vector>
+#include <cstdint>

Build it with cmake with the following options:
CMAKE_OPTIONS=" -DGMX_OPENMP=ON -DGMX_CYCLE_SUBCOUNTERS=ON \
                                        -DGMX_BUILD_OWN_FFTW=ON \
                                        -DGMX_GPU=OFF
-DCMAKE_BUILD_TYPE=Release -DGMX_DOUBLE=OFF -DGMX_CYCLE_SUBCOUNTERS=ON \
                                        -DGMX_PREFER_STATIC_LIBS=OFF
-DGMX_INSTALL_NBLIB_API=OFF -DGMXAPI=OFF \
                                        -DCMAKE_C_FLAGS="-mcpu=neoverse-v2"
-DCMAKE_CXX_FLAGS="-mcpu=neoverse-v2" \
                                        -DCMAKE_C_COMPILER=$COMPILERBIN
-DCMAKE_CXX_COMPILER=$COMPILERXXBIN \
                                        -DGMX_SIMD_ARM_SVE_LENGTH=128 \
                                        -DGMX_SIMD=ARM_SVE -DGMX_USE_NVTX=ON \
                                        -DGMX_MPI=OFF"

where COMPILERBIN and COMPILERXXBIN point to your installation of gcc and g++.
Substituting gcc and g++ with clang and clang++ would give the LLVM binary to
compare against.

The benchmark line can be:
$PATH_TO_GMX_BUILD/gmx mdrun -v -resethway -noconfout -pin on -ntmpi 1 -ntomp
24 -nsteps 4000 -nb cpu -s benchmark

where "benchmark" is a benchmark.tpr input file that you can get from various
sources, for example https://www.hecbiosim.ac.uk/benchmark-files/gromacs.tar.gz
(you can use the 20k-atoms one)

Reply via email to