Page 1 of 1

Compiling YAMBO on Perlmutter cluster

Posted: Wed Aug 16, 2023 2:16 am
by kle2797
Dear developers,

I am trying to compile yambo on the cluster Perlmutter and I keep getting the error:

Code: Select all

Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/COMPLEX(8)).
I tried this with the current yambo public version. The module I have loaded include:

Code: Select all

module load cpu ; module load PrgEnv-gnu ; module load cray-hdf5-parallel ; module load cray-fftw
Which helped me successfully compiled Quantum Espresso v7.0. Not sure if I am missing anything for yambo.
I have attached the file `config.log` and `log/compile_yambo.log` below. Hope that will help.
Please let me know if you need any further information.

Re: Compiling YAMBO on Perlmutter cluster

Posted: Fri Aug 18, 2023 8:22 am
by Savio Laricchia
Dear Khoa,

From the modules you are loading I can see that you are compiling Yambo on the CPU partition of Perlmutter. If this is the case, I successfully compiled Yambo on this partition by using the default modules provided when loging in. You only need the enviroment PrgEnv-gnu/8.3.3 while all the other libraries required can be downloaded and compiled directly by Yambo. A possible configuration file is the following
export FC="mpif90 -fallow-argument-mismatch"
export F77="mpif90 -fallow-argument-mismatch"
export CPP='cpp -E'
export CC=gcc
export FPP='mpif90 -E -fallow-argument-mismatch'
export F90SUFFIX=".f90"
export MPIFC='ftn'
export FCFLAGS="-g -O -fallow-argument-mismatch"
export MPIF77='ftn'
export MPICC='cc'
export MPICXX='CC'

./configure \
--enable-mpi \
--enable-par-linalg \
--enable-msgs-comps \
--enable-time-profile \
--enable-memory-profile \
--with-blas-libs="-lblas" \
--with-lapack-libs="-llapack" \
--with-scalapack-libs=yes --with-blacs-libs=yes \
--disable-hdf5-par-io \
--enable-slepc-linalg
Hope this will help.

Re: Compiling YAMBO on Perlmutter cluster

Posted: Tue Aug 22, 2023 10:08 am
by kle2797
Savio Laricchia wrote: Fri Aug 18, 2023 8:22 am Dear Khoa,

From the modules you are loading I can see that you are compiling Yambo on the CPU partition of Perlmutter. If this is the case, I successfully compiled Yambo on this partition by using the default modules provided when loging in. You only need the enviroment PrgEnv-gnu/8.3.3 while all the other libraries required can be downloaded and compiled directly by Yambo. A possible configuration file is the following

Hope this will help.
Dear Savio,

Thank you for your response. Yes, I am trying to compile on the CPU partition. Thanks to your suggestion, I have compiled Yambo successfully with default configuration.
However, when I tried to add the flag '--enable-slepc-linalg' for diagonalization of BSE using SLEPc, it returned the following errors.

Code: Select all

/softwares/yambo/src/linear_algebra/MATRIX_slepc.F:54:6:

   54 |  use slepceps
      |      1
Fatal Error: Cannot open module file 'slepceps.mod' for reading at (1): No such file or directory
compilation terminated.
Do you know if this is a compiler error or is it my environment set up? I only loaded the "PrgEnv-gnu/8.3.3" as you suggested.

Re: Compiling YAMBO on Perlmutter cluster

Posted: Thu Aug 24, 2023 12:44 pm
by Savio Laricchia
Dear Khoa,

I was able in reproducing your error when compiling Yambo 5.2 on Perlmutter, both with the default versions for PETSC and SLEPc (3.17.4 and 3.17.2, respectively) or their previous versions (3.14.6 and 3.14.2, respectively). Probably there will be some Yambo-SLEPc interface problem in the 5.2 version that should be investigated, given that the PETSC 3.14.6 and SLEPc 3.14.2 libraries have already been used successfully in compiling Yambo 5.1.

Therefore, my suggestion is to compile Yambo 5.1 with the same setting used before in order to be able to correctly compile Yambo (including the SLEPc libraries) on the CPU partition of Perlmutter.

Re: Compiling YAMBO on Perlmutter cluster

Posted: Thu Aug 24, 2023 8:20 pm
by kle2797
Savio Laricchia wrote: Thu Aug 24, 2023 12:44 pm Dear Khoa,

I was able in reproducing your error when compiling Yambo 5.2 on Perlmutter, both with the default versions for PETSC and SLEPc (3.17.4 and 3.17.2, respectively) or their previous versions (3.14.6 and 3.14.2, respectively). Probably there will be some Yambo-SLEPc interface problem in the 5.2 version that should be investigated, given that the PETSC 3.14.6 and SLEPc 3.14.2 libraries have already been used successfully in compiling Yambo 5.1.

Therefore, my suggestion is to compile Yambo 5.1 with the same setting used before in order to be able to correctly compile Yambo (including the SLEPc libraries) on the CPU partition of Perlmutter.
Thank you Savio,

I have successfully compiled Yambo 5.1.0. I noticed that the same problem may persist down to Yambo v5.1.1. Hope that will help later!

Re: Compiling YAMBO on Perlmutter cluster

Posted: Wed Nov 15, 2023 11:12 pm
by milesj
For anyone else still trying, here is the compilation procedure I ended up having to use:

Code: Select all

login
module load cpu


modules loaded
  1) craype-x86-milan     4) xpmem/2.6.2-2.5_2.27__gd067c3f.shasta   7) cpe/23.03    10) craype/2.7.20     (c)    13) PrgEnv-gnu/8.3.3            (cpe)   16) cray-netcdf-hdf5parallel/4.9.0.3 (io)
  2) libfabric/1.15.2.0   5) gcc/11.2.0                              8) xalt/2.10.2  11) cray-dsmml/0.2.2         14) cray-hdf5-parallel/1.12.2.3 (io)    17) espresso/7.0-libxc-5.2.2-cpu
  3) craype-network-ofi   6) perftools-base/23.03.0                  9) cpu/1.0      12) cray-mpich/8.1.25 (mpi)  15) cray-fftw/3.3.10.3          (math)
module load espresso/7.0-libxc-5.2.2-cpu
module load cray-netcdf-hdf5parallel/4.9.0.3
module load cray-hdf5-parallel/1.12.2.3
module load cray-fftw/3.3.10.3

mkdir yambo_dev
cd yambo_dev/
git clone https://github.com/yambo-code/yambo.git ./

export FC="mpif90 -fallow-argument-mismatch"
export F77="mpif90 -fallow-argument-mismatch"
export CPP='cpp -E'
export CC=gcc
export FPP='mpif90 -E -fallow-argument-mismatch'
export F90SUFFIX=".f90"
export MPIFC='ftn'
export FCFLAGS="-g -O -fallow-argument-mismatch"
export MPIF77='ftn'
export MPICC='cc'
export MPICXX='CC'


./configure --enable-open-mp --enable-par-linalg --enable-hdf5-par-io --enable-memory-profile --enable-time-profile --with-fft-path=/opt/cray/pe/fftw/3.3.10.3/x86_milan --with-libxc-path=/global/common/software/nersc/pm-2021q4/sw/libxc/v5.2.2/pm-cpu/ --with-hdf5-path=/opt/cray/pe/hdf5-parallel/1.12.2.3/gnu/9.1/ --with-netcdf-path=/opt/cray/pe/netcdf-hdf5parallel/4.9.0.3/gnu/9.1 --with-netcdff-path=/opt/cray/pe/netcdf-hdf5parallel/4.9.0.3/gnu/9.1

add -fopenmp to cflags, fcflags, and the one openmp line later in the ./config/setup file
replace the two fft lines with:
lfft        = -L/opt/cray/pe/fftw/3.3.10.3/x86_milan/lib -lfftw3 -lfftw3_threads -lfftw3_omp
ifft        = -I/opt/cray/pe/fftw/3.3.10.3/x86_milan/include/


cd ..
mkdir yambo_lib
cp -r ./yambo_dev/lib/external/ ./yambo_lib/

(download yambo-5.1.0.tar.gz)

tar -zxvf yambo-5.1.0.tar.gz
cd yambo-5.1.0

export FC="mpif90 -fallow-argument-mismatch"
export F77="mpif90 -fallow-argument-mismatch"
export CPP='cpp -E'
export CC=gcc
export FPP='mpif90 -E -fallow-argument-mismatch'
export F90SUFFIX=".f90"
export MPIFC='ftn'
export FCFLAGS="-g -O -fallow-argument-mismatch"
export MPIF77='ftn'
export MPICC='cc'
export MPICXX='CC'


./configure --enable-open-mp --enable-par-linalg --enable-hdf5-par-io --enable-memory-profile --enable-time-profile --enable-slepc-linalg  --with-extlibs-path=../yambo_lib/external

(the final flag may actually need the full path as output by 'pwd')
(I don't remember whether or not I needed to edit the ./config/setup file for 5.1.0, but the -fopenmp flag should be in the same places and lfft and ifft should look the same as above) 

Re: Compiling YAMBO on Perlmutter cluster

Posted: Thu Nov 16, 2023 12:14 pm
by Nicola Spallanzani
Dear Miles,
thank you very much for your help.

Best,
Nicola