Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2019-04-15 11:15:43

LucaBabetto
Member
Registered: 2018-11-21
Posts: 31

OpenMolcas with Intel compilers

Hello,

I'm trying to install OpenMolcas, with the QCMaquis DMRG support, on a 8core/8GB Virtual Machine running on a cluster.

I already have a working installation which used openMPI-3.1.3 and OpenBLAS, but unfortunately QCMaquis does not seem to be compatible with that (in the manual they say they only officially support MKL)

Therefore, I installed the Intel Parallel suite for clusters, in particular I installed Intel MPI, MKL and the C++/Fortran compilers.

First, I installed GlobalArrays with the following command:

./configure --prefix=/opt/ga-5.7 --enable-i8 --with-blas8="-L$MKLROOT/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm" --with-scalapack8="-L$MKLROOT/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm"

which seemed to go well, as I did not get any warning/error during the compilation.

After that, I configured OpenMolcas with the following command:

CC=mpiicc FC=mpiifort cmake3 -DMPI=ON -DGA=ON -DLINALG=MKL -DOPENMP=ON -DDMRG=ON -DNEVPT2=ON -DQCMaquis_NAME="myname" -DQCMaquis_EMAIL="myemail" ../

The configuration doesn't give me any errors, but when I run make it stops at this point:

[  0%] Linking Fortran executable bin/single_aniso.exe
/opt/ga-5.7/lib/libga.a(scalapack.o): In function `slgetmxproc_':
scalapack.F:(.text+0x4b76): undefined reference to `_gfortran_pow_r8_i8'
scalapack.F:(.text+0x4bcb): undefined reference to `_gfortran_pow_i8_i8'
/opt/ga-5.7/lib/libga.a(scalapack.o): In function `ga_pdsyevr_':
scalapack.F:(.text+0x97b5): undefined reference to `_gfortran_st_write'
scalapack.F:(.text+0x97ce): undefined reference to `_gfortran_transfer_character_write'
scalapack.F:(.text+0x97ec): undefined reference to `_gfortran_transfer_integer_write'
scalapack.F:(.text+0x9805): undefined reference to `_gfortran_transfer_character_write'
scalapack.F:(.text+0x9823): undefined reference to `_gfortran_transfer_integer_write'
scalapack.F:(.text+0x9832): undefined reference to `_gfortran_st_write_done'
/opt/ga-5.7/lib/libga.a(scalapack.o): In function `ga_pzheevr_':
scalapack.F:(.text+0xb2ae): undefined reference to `_gfortran_st_write'
scalapack.F:(.text+0xb2c7): undefined reference to `_gfortran_transfer_character_write'
scalapack.F:(.text+0xb2e5): undefined reference to `_gfortran_transfer_integer_write'
scalapack.F:(.text+0xb2fe): undefined reference to `_gfortran_transfer_character_write'
scalapack.F:(.text+0xb31c): undefined reference to `_gfortran_transfer_integer_write'
scalapack.F:(.text+0xb32b): undefined reference to `_gfortran_st_write_done'
/opt/ga-5.7/lib/libga.a(farg.o): In function `f2c_iargc_':
farg.F:(.text+0x9): undefined reference to `_gfortran_iargc'
/opt/ga-5.7/lib/libga.a(farg.o): In function `f2c_getarg_':
farg.F:(.text+0x55): undefined reference to `_gfortran_getarg_i8'
make[2]: *** [bin/single_aniso.exe] Error 1
make[1]: *** [CMakeFiles/single_aniso.exe.dir/all] Error 2
make: *** [all] Error 2

I'm not a programmer so I don't really understand the issue, but since I used the Intel Fortran compiler for both GA and OpenMolcas, why is it looking for gfortran?

Thank you for your help.

Offline

#2 2019-04-15 17:06:17

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: OpenMolcas with Intel compilers

Are you sure you used the Intel compilers for GA?

I believe it should also be possible to compile everything with gcc+MKL.

Offline

#3 2019-04-16 07:09:01

LucaBabetto
Member
Registered: 2018-11-21
Posts: 31

Re: OpenMolcas with Intel compilers

Yes, I tried compiling GA both with this configuration:

./configure --prefix=/opt/ga-5.7 --enable-i8 --with-blas8="-L$MKLROOT/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm" --with-scalapack8="-L$MKLROOT/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm"

And explicitly specifying the Intel compilers:

./configure MPICC=mpiicc MPIFORT=mpiifort --prefix=/opt/ga-5.7 --enable-i8 --with-blas8="-L$MKLROOT/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm" --with-scalapack8="-L$MKLROOT/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm"

But the same error shows up. If I type CC=mpiicc FC=mpiifort a warning pops up saying it will ignore those compilers, so maybe it forces the compilation with gfortran?

I used the Intel compilers because in the Molcas manual there are two examples: i) GCC C/Fortran compilers with GA/OpenMPI and OpenBLAS; ii) Intel C/Fortran compilers with GA/IntelMPI and MKL; so I thought that if I wanted to use MKL I had to use the Intel compilers as well.

If you say GCC/MKL is still a compatible solution, would I simply have to ignore the CC/FC flags and configure as follows?

cmake3 -DMPI=ON -DGA=ON -DLINALG=MKL -DOPENMP=ON -DDMRG=ON -DNEVPT2=ON -DQCMaquis_NAME="myname" -DQCMaquis_EMAIL="myemail" ../

Offline

#4 2019-04-16 08:03:21

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: OpenMolcas with Intel compilers

But the same error shows up. If I type CC=mpiicc FC=mpiifort a warning pops up saying it will ignore those compilers, so maybe it forces the compilation with gfortran?

Probably. You'd have to look at what actually happens when you run make.

If you say GCC/MKL is still a compatible solution, would I simply have to ignore the CC/FC flags and configure as follows?

To be safe, specify FC=gfortran CC=gcc. Look into your $MKLROOT to make sure you have libmkl_gf_ilp64.so.

Offline

#5 2019-04-16 09:01:54

LucaBabetto
Member
Registered: 2018-11-21
Posts: 31

Re: OpenMolcas with Intel compilers

libmkl_gf_ilp64.so is present in my $MKLROOT.

If I run cmake as:

CC=gcc FC=gfortran cmake3 -DMPI=ON -DGA=ON -DLINALG=MKL -DOPENMP=ON -DDMRG=ON -DNEVPT2=ON -DQCMaquis_NAME="myname" -DQCMaquis_EMAIL="myemail" ../

I get the following error when running make:

[ 56%] Building Fortran object CMakeFiles/system_util_obj.dir/src/system_util/xabort.f.o
/home/centos/OpenMolcas/src/system_util/xabort.f:14.9:

      use mpi
         1
Fatal Error: File 'mpi.mod' opened at (1) is not a GNU Fortran module file
make[2]: *** [CMakeFiles/system_util_obj.dir/src/system_util/xabort.f.o] Error 1
make[1]: *** [CMakeFiles/system_util_obj.dir/all] Error 2
make: *** [all] Error 2

When I installed Intel Parallel Studio I only picked the 64 bit architecture since I'm running on a 64 bit machine. Should I have also installed the IA_32 architecture?

Offline

#6 2019-04-16 09:50:53

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: OpenMolcas with Intel compilers

That's a drawback of Fortran modules, they have to be built with the same compiler (and sometimes version) that uses them. You should either use an IntelMPI built with gfortran (if that's available) or use OpenMPI (I think QCMaquis supports it fine).

Offline

#7 2019-04-16 10:31:21

LucaBabetto
Member
Registered: 2018-11-21
Posts: 31

Re: OpenMolcas with Intel compilers

Since the problem seems to be with GA, is there an easy way to compile it with OpenMPI but still using MKL as a linear algebra library?

I've found this page where they say that Intel MPI provides two sets of MPI wrappers {mpiicc,mpicpc,mpiifort} and {mpicc,mpicxx,mpif90} that use Intel compilers and GNU compilers, respectively.

In particular, mpif90 uses GNU gfortran. I will try compiling OpenMolcas with CC=mpicc and FC=mpif90 instead of CC=mpiicc and FC=mpiifort and get back to you.

Offline

#8 2019-04-16 12:49:17

LucaBabetto
Member
Registered: 2018-11-21
Posts: 31

Re: OpenMolcas with Intel compilers

Well, that didn't work out at all, I get another error related to mpi.

HOWEVER! I managed to compile GA with the Intel compilers! The problem was that I set FC=mpiifort, and buried in the ./configure output I saw that it ignored that flag and wanted the F77 and MPIF77 flags instead. Setting those to mpiifort compiles GA with the Intel compilers, and now the whole build compiles!

I'm currently running pymolcas verify to see if everything works as intended, but I think I found the solution to my problem (actually reading the compile output...)

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 00:41:21