Problem during cmake build

I am trying to compile a code using cmake3. But I am getting this error at the end of the compilation:

[ 99%] Building Fortran object CMakeFiles/commander3.dir/commander3/src/drc3jj.f.o
[100%] Linking Fortran executable /home/users/s/sahasay2/cosmoglobe2/bin/commander3
** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

fortcom: Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.

ifort: error #10014: problem during multi-file optimization compilation (code 3)
gmake[2]: *** [/home/users/s/sahasay2/cosmoglobe2/bin/commander3] Error 3
gmake[1]: *** [CMakeFiles/commander3.dir/all] Error 2
gmake: *** [all] Error 2
~/cosmoglobe2/Commander-camb2/build$

The modules that are loaded are as follows:

~/cosmoglobe2/Commander-camb2/build$ module list

Currently Loaded Modules:
  1) GCCcore/11.3.0   3) binutils/2.38              5) numactl/2.0.14   7) impi/2021.6.0   9) imkl-FFTW/2022.1.0  11) ncurses/6.3  13) OpenSSL/1.1  15) XZ/5.2.5          17) CMake/3.23.1
  2) zlib/1.2.12      4) intel-compilers/2022.1.0   6) UCX/1.12.1       8) imkl/2022.1.0  10) intel/2022a         12) bzip2/1.0.8  14) cURL/7.83.0  16) libarchive/3.6.1

Could you please advise me what might be the problem?

Hello,

I have done checks on the error in your home directory : /home/users/s/sahasay2/cosmoglobe2/Commander-camb2/build/CMakeFiles

And find error in file CMakeError.log :

Determining if the Fortran sgemm exists failed with the following output:
Change Dir: /home/users/s/sahasay2/cosmoglobe2/Commander-camb2/build/CMakeFiles/CMakeScratch/TryCompile-6eL05H

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_e3def/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_e3def.dir/build.make CMakeFiles/cmTC_e3def.dir/build
gmake[1]: Entering directory `/home/users/s/sahasay2/cosmoglobe2/Commander-camb2/build/CMakeFiles/CMakeScratch/TryCompile-6eL05H'
Building Fortran object CMakeFiles/cmTC_e3def.dir/testFortranCompiler.f.o
/opt/ebsofts/GCCcore/12.2.0/bin/gfortran   -O3 -DNDEBUG -O3 -fPIE -c /home/users/s/sahasay2/cosmoglobe2/Commander-camb2/build/CMakeFiles/CMakeScratch/TryCompile-6eL05H/testFortranCompiler.f -o CMakeFiles/cmTC_e3def.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_e3def
/opt/ebsofts/CMake/3.25.2-GCCcore-12.2.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e3def.dir/link.txt --verbose=1
/opt/ebsofts/GCCcore/12.2.0/bin/gfortran -O3 -DNDEBUG -O3 CMakeFiles/cmTC_e3def.dir/testFortranCompiler.f.o -o cmTC_e3def
/opt/ebsofts/binutils/2.39-GCCcore-12.2.0/bin/ld: CMakeFiles/cmTC_e3def.dir/testFortranCompiler.f.o: in function `main':
testFortranCompiler.f:(.text.startup+0x1d): undefined reference to `sgemm_'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_e3def] Error 1
gmake[1]: Leaving directory `/home/users/s/sahasay2/cosmoglobe2/Commander-camb2/build/CMakeFiles/CMakeScratch/TryCompile-6eL05H'
gmake: *** [cmTC_e3def/fast] Error 2

Il seems you miss to load module OpenBLAS.

Best regards,

Hi Thanks for replying. But the problem still persist even if I load OpenBLAS :slightly_frowning_face: