cp2k / dbcsr

DBCSR: Distributed Block Compressed Sparse Row matrix library
https://cp2k.github.io/dbcsr/
GNU General Public License v2.0
134 stars 46 forks source link

Compilation fails on Archer2 UK system #749

Closed ctc1822 closed 6 months ago

ctc1822 commented 6 months ago

I was trying to compile dbcsr-2.1.0 on Archer2, which uses the HPE cray environment. When I followed the steps on installation https://cp2k.github.io/dbcsr/develop/page/2-user-guide/1-installation/index.html, mkdir build cd build cmake .. make

the compilation failed with the error Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER(*)/COMPLEX(4)).

I was hoping to fix it with the Fortran flag -fallow-argument-mismatch. But I am not sure where or how to add this flag. Where should I do this?

Many thanks for your help.

Best regards, Christopher

alazzaro commented 6 months ago

Why the 2.1 version? This problem was fixed in a more recent release...

ctc1822 commented 6 months ago

Thanks a lot for your reply.

Archer2's cmake version is 3.20.4, which is below the required 3.22 in the recent releases.

Are there fixes I can do so that I can install 2.1 with an older version of cmake?

alazzaro commented 6 months ago

Well, frankly speaking, I don't remember, 2.1 is > 3 years old... I would suggest to update cmake on your local directory, e.g.

CMAKE_VERSION=3.25.1
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh
mkdir -p cmake_install
sh cmake-${CMAKE_VERSION}-Linux-x86_64.sh --prefix=$PWD/cmake_install --skip-license
rm -f cmake-${CMAKE_VERSION}-Linux-x86_64.sh
export PATH=$PWD/cmake_install/bin:$PATH
aproeme commented 6 months ago

As member of the ARCHER2 support team, I might suggest that you could very reasonably request a more recent version of cmake be centrally installed on ARCHER2 by contacting the service desk (support@archer2.ac.uk) - cmake 3.21.3 is the most recent version available as a centrally installed module.

Meanwhile, you could use a (centrally unsupported) install of cmake 3.27.7 located at:

/home/z19/shared/cmake/3.27.7

ctc1822 commented 6 months ago

Thanks for the comments. I will try out cmake 3.27.

ctc1822 commented 6 months ago

I have installed the latest DBCSR using a local cmake-3.28. Thanks a lot!

alazzaro commented 6 months ago

You are welcome!