Hello Frederick, <div><br /></div><div>Thank you for your quick response and suggestion, that's worked!   Although to be precise I didn't *actually* expand the exception clause based on GCC version but rather simply commented out the if statement to force the same effect (this was prior to your message). And did the same in the one other place where the same thing came up as an issue, namely in src/mp2_types.F (line 310, in the definition of mp2_type). </div><div><br /></div><div>Leading to the very pleasing regtest result:</div><div>





<p><font face="Courier New">------------------------------- Summary --------------------------------</font></p>
<p><font face="Courier New">Number of FAILED  tests 0<br />Number of WRONG   tests 0<br />Number of CORRECT tests 4171<br />Total number of   tests 4171</font></p>
<p><font face="Courier New">Summary: correct: 4171 / 4171; 270min<br /></font></p>
<p><font face="Courier New">Status: OK</font></p></div><div><br /></div><div>Best wishes!</div><div><br /></div><div>Arno</div><div><br /><br /></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Monday 17 June 2024 at 14:32:29 UTC+1 Frederick Stein wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Dear Arno,</div><div>Could you add an exception for the older GCC compilers of version (append "
<span style="font-family:"Courier New""> || (__GNUC__ == 10 && __GNUC_MINOR__ < 5)</span>" to the condition of the preprocessor)? Does this issue vanish? If the same error occurs at other spots but in the same context, try to add this fix as well.</div><div>Best,</div><div>Frederick<br></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">Arno schrieb am Montag, 17. Juni 2024 um 14:42:03 UTC+2:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello, <div><br></div><div>I am running into the following compilation error when trying to build CP2K v2024.1 with GCC 10.2.0:</div><div><br></div><div><font face="Courier New">/mnt/lustre/e1000/home/z04/shared/cp2k/cp2k-2024.1/src/cp_eri_mme_interface.F:25:7:</font></div><div><p><font face="Courier New">   25 |    USE eri_mme_test,                    ONLY: eri_mme_2c_perf_acc_test,&<br>      |       1<br>Error: The rank of the element in the structure constructor at (1) does not match that of the component (0/1)<br></font><br>I believe this relates to the following in cp_eri_mme_interface.F:<br></p><p><font face="Courier New">TYPE cp_eri_mme_param<br>  TYPE(cp_logger_type), POINTER :: logger => NULL()</font><br><span style="font-family:"Courier New"">  ! There is a bug with some older compilers preventing a default initialization of derived types with allocatable components <br></span><span style="font-family:"Courier New"">#if __GNUC__ < 9 || (__GNUC__ == 9 && __GNUC_MINOR__ < 5)<br></span><span style="font-family:"Courier New"">    TYPE(eri_mme_param)  :: par<br></span><span style="font-family:"Courier New"">#else<br></span><span style="font-family:"Courier New"">    TYPE(eri_mme_param) :: par = eri_mme_param()<br></span><span style="font-family:"Courier New"">#endif</span></p><p>





</p><p>Based on this and your successful builds of CP2K v2024.1 with GCC 9.5 and 10.5 in the dashboard I would not expect this to fail. <br><br>Would you be able to advise on how to resolve this, short of using another version of GCC?  Is GCC 10.2.0 perhaps an edge case of a version that has the same bug that is not caught by the above workaround?  </p><p>The full compilation command is as follows (I have checked that the mpifort command is indeed using GCC 10.2.0): </p><p><font face="Courier New">/work/y07/shared/cirrus-software/openmpi/4.1.6/bin/mpifort -c -fno-omit-frame-pointer -fopenmp -g -mtune=native  -O3 -funroll-loops   -I/work/y07/shared/cirrus-software/openmpi/4.1.6/include -pthread  -m64 -I/mnt/lustre/e1000/home/y07/shared/cirrus-software/oneapi/mkl/2024.0/include -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/fftw-3.3.10/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/libxc-6.2.2/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/libgrpp-main-20231215/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/libxsmm-1.17/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/COSMA-2.6.6/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/elpa-2023.05.001/cpu/include/elpa_openmp-2023.05.001/modules' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/elpa-2023.05.001/cpu/include/elpa_openmp-2023.05.001/elpa' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/gsl-2.7/include' -I/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/hdf5-1.14.2/include -I/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/libvdwxc-0.4.0/include -I/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/spglib-1.16.2/include -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/SpFFT-1.0.6/include' -I'/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/SpLA-1.5.5/include/spla' -I/work/z04/shared/cp2k/cp2k-2024.1/tools/toolchain/install/sirius-7.4.3/include -fbacktrace -ffree-form -fimplicit-none -std=f2008  -Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=unused-parameter -Werror=unused-label -Werror=conversion -Werror=zerotrip -Wno-maybe-uninitialized -Wuninitialized -Wuse-without-only  -D__LIBXSMM  -D__parallel -D__MPI_F08 -D__MKL -D__FFTW3  -D__SCALAPACK -D__FFTW3  -D__LIBINT -D__LIBXC -D__LIBGRPP -D__COSMA -D__ELPA  -D__GSL -D__PLUMED2 -D__HDF5 -D__LIBVDWXC -D__SPGLIB -D__LIBVORI -D__SPFFT    -D__SPLA -D__SIRIUS   -fallow-argument-mismatch -D__COMPILE_ARCH="\"local\"" -D__COMPILE_DATE="\"Thu May  9 17:32:33 BST 2024\"" -D__COMPILE_HOST="\"cirrus-login1\"" -D__COMPILE_REVISION="\"git:b4a17a5\"" -D__DATA_DIR="\"/mnt/lustre/e1000/home/z04/shared/cp2k/cp2k-2024.1/data\"" -D__SHORT_FILE__="\"cp_eri_mme_interface.F\"" -I'/mnt/lustre/e1000/home/z04/shared/cp2k/cp2k-2024.1/src/' -I'/mnt/lustre/e1000/home/z04/shared/cp2k/cp2k-2024.1/obj/local/psmp/exts/dbcsr' cp_eri_mme_interface.F90</font><br></p><p>This follows a toolchain build of the dependencies using the following command:<br><br><font face="Courier New">./install_cp2k_toolchain.sh -j 18 --with-gcc=system --mpi-mode=openmpi --with-openmpi=system --math-mode=mkl --with-mkl=system --with-openblas=no --with-plumed </font><br></p><p>For completeness I have attached attached the ARCH file and toolchain-installed setup file that I am sourcing prior to the CP2K build.</p><p>Many thanks in advance, </p><p>Arno</p><p><br></p><p><br></p></div></blockquote></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/bcf499cd-77ea-4025-9a38-049a1d29713bn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/bcf499cd-77ea-4025-9a38-049a1d29713bn%40googlegroups.com</a>.<br />