Compilation problems: mpiifort not found, even though is perfectly installed

74 views
Skip to first unread message

Diego Guedes-Sobrinho

unread,
Nov 28, 2020, 9:18:06 PM11/28/20
to cp2k
Hi everyone, I'm trying a compilation with intel compilers with the following archtecture:

------------------------------
CC        = mpiicc
FC        = mpiifort
LD        = mpiifort
AR        = ar -r

CFLAGS    = -O3 -xAVX -g -traceback -xHost

DFLAGS    = -D__FFTW3 -D__MKL -D__MPI_VERSION=3
DFLAGS   += -D__parallel -D__SCALAPACK

FCFLAGS   = $(CFLAGS) $(DFLAGS)
FCFLAGS  += -fpp -fp-model precise -free -funroll-loops
FCFLAGS  += -I${MKLROOT}/include -I${MKLROOT}/include/fftw

LDFLAGS   = $(FCFLAGS) -static-intel -static_mpi
LDFLAGS_C = -nofor_main

MKL_LIB   = ${MKLROOT}/lib/intel64

LIBS      = $(MKL_LIB)/libmkl_scalapack_lp64.a
LIBS     += -Wl,--start-group
LIBS     += $(MKL_LIB)/libmkl_intel_lp64.a
LIBS     += ${MKL_LIB}/libmkl_sequential.a
LIBS     += $(MKL_LIB)/libmkl_core.a
LIBS     += ${MKL_LIB}/libmkl_blacs_intelmpi_lp64.a
LIBS     += -Wl,--end-group

# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
        $(FC) -c $(subst O2,O0,$(FCFLAGS)) $<
----------------------

After following command 

make -j 6 ARCH=Linux-x86-64-intel-minimal_changed VERSION=popt

I got the following error message:

/bin/sh: 1: mpiifort: not found
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/exts/dbcsr/Makefile:428: recipe for target 'dbcsr_kinds.o' failed
make[4]: *** [dbcsr_kinds.o] Error 127
Makefile:129: recipe for target 'libdbcsr' failed
make[3]: *** [libdbcsr] Error 2
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/exts/Makefile.inc:16: recipe for target 'dbcsr' failed
make[2]: *** [dbcsr] Error 2
make[2]: ** Esperando que outros processos terminem.
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/Makefile:123: recipe for target 'popt' failed
make[1]: *** [popt] Error 2
Makefile:118: recipe for target 'all' failed
make: *** [all] Error 2

mpiifort is installed, such as others codes can be compiled with the intel set.
By setting explicity the path for mpiifort and mpiicc, e. g.

CC        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiicc
FC        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort
LD        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort

the compilation error change to 

/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort: 1: eval: ifort: not found
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/exts/dbcsr/Makefile:428: recipe for target 'dbcsr_kinds.o' failed
make[4]: *** [dbcsr_kinds.o] Error 127
Makefile:129: recipe for target 'libdbcsr' failed
make[3]: *** [libdbcsr] Error 2
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/exts/Makefile.inc:16: recipe for target 'dbcsr' failed
make[2]: *** [dbcsr] Error 2
make[2]: ** Esperando que outros processos terminem.
/home/dgs/Downloads/cp2k-7.1/cp2k-7.1_parallel/cp2k-7.1/Makefile:123: recipe for target 'popt' failed
make[1]: *** [popt] Error 2
Makefile:118: recipe for target 'all' failed
make: *** [all] Error 2

Anyone would know how to solve this?
Thanks in advance.

Glenn Wolosh

unread,
Nov 28, 2020, 11:04:51 PM11/28/20
to cp2k
You need to source the intel compilers prior to compiling:

source /opt/intel/compilers_and_libraries_2020.4.304/linux/compilervars.sh intel64

--Glenn

Glenn Wolosh

unread,
Nov 28, 2020, 11:06:05 PM11/28/20
to cp2k
Oops, that should be 

source /opt/intel/compilers_and_libraries_2020.4.304/linux/bin/compilervars.sh intel64

--Glenn

Diego Guedes-Sobrinho

unread,
Nov 29, 2020, 5:07:21 AM11/29/20
to cp...@googlegroups.com
Glenn

That's not the case.
The compilers are charged, even into ~/.bashed.rc

As I said, compiling others codes with intel works perfectly.

--
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cp2k/dqPgUnh54Ss/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/9c431830-898d-4d7f-89f4-44e8aa79d775n%40googlegroups.com.

Krack Matthias (PSI)

unread,
Nov 29, 2020, 5:33:55 AM11/29/20
to cp...@googlegroups.com

Hello

 

What do you get when you type “which mpiifort”?

 

The need to specify the full path for the compiler call indicates that your environment is not properly setup.

 

HTH

 

Matthias

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/CAGR3pZh4wRQ7KbphEs%2BEhK%2BaW12FfX3-fkaw38vO-YHFAZ04SQ%40mail.gmail.com.

Diego Guedes-Sobrinho

unread,
Nov 29, 2020, 8:10:22 AM11/29/20
to cp2k
Mathias, 

the full path was indicated at a second moment, as a said, like this

CC        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiicc
FC        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort
LD        = /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort

which is the result of "which mpiifort". However, the error change to ifort not found, something like:

/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiifort: 1: eval: ifort: not found

One new insight: that solved the problem: I'm using "sudo make", which does not recognize the intel compilers. 
How to solve? Removing sudo and performing not as root.

However, the problem moves to obj/ directory that requires root privileges to access if at the first time you tried to compiled with sudo. 
We have a paradox.

Solving the problem:
You have to change root privileges to all directories. Just type "sudo chown user:user directoty"

Thank you Matthias and Glenn, talking with you guys made me think about and I could solve the problem.

Evelyn Navarro

unread,
Dec 12, 2020, 6:55:16 AM12/12/20
to cp2k
.
Reply all
Reply to author
Forward
0 new messages