[SOLVED] Problem when compiling 6.12.3 with Openmpi

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
ljludwig
Posts: 77
Joined: Fri Jun 08, 2012 5:19 am

[SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ljludwig » Fri Jun 08, 2012 5:41 am

Hello Everyone:
I struggled for a while, find no where else to get solution, and come here as the last station:

1. The Abinit 6.12.3 has been compiled well in serial and works perfect.

2. However, when I try to compile it with openmpi1.3.4, like

/configure CC=mpicc CXX=mpicxx FC=mpif90 --enable-mpi --with-mpi-prefix=/usrname/software/mpi/openmpi1.3.4/ --prefix=/usrname/software/abinit-6.12.3

The compiler mpicc cannot even produce a.out file and configuration terminates immediately.

3. So I tried a newer version openmpi1.5.4, it can compile, but cannot make to the end. It says /lib is a directory, but it needs a file... which is quite odd to me

4. Fortunately, when I use another mpi, mvapich2-17rc1-intel, other than openmpi, it can get to the end, I use
make multi multi_nprocs=12
make install

5.Unfortunately, even it compiles ans installs successfully (abinit generated in /bin folder), abinit still cannot run, use command
mpirun -np 12 /usrname/software/abinit-6.12.3/bin/abinit <filename.files>& log

the log file shows
Fatal error in MPI_Init: Other MPI error

Notice, the env. vars have all been setup well, but script, even by source to ~/.bashrc file:

MPI_HOME=/usrname/software/mpi/mvapich2-17rc1-intel/
export PATH=${MPI_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MANPATH=${MPI_HOME}/share/man:$MANPATH

Thus, to this end, can anyone tell me what might be going wrong? Is that caused by wrong setting in the step of configuration?
Another question, what is the real difference between
make, make mj4, and make multi multi_nprocsX ?

Many thanks in advance.
Last edited by ljludwig on Sun Jun 17, 2012 1:51 am, edited 1 time in total.

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Tue Jun 12, 2012 8:11 pm

Hi,

5.Unfortunately, even it compiles ans installs successfully (abinit generated in /bin folder), abinit still cannot run, use command
mpirun -np 12 /usrname/software/abinit-6.12.3/bin/abinit <filename.files>& log

the log file shows
Fatal error in MPI_Init: Other MPI error


what are the results of these commands :

Code: Select all

mpif90 -show
mpif90 -V
mpif90 --version


Notice, the env. vars have all been setup well, but script, even by source to ~/.bashrc file:

MPI_HOME=/usrname/software/mpi/mvapich2-17rc1-intel/
export PATH=${MPI_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH
export MANPATH=${MPI_HOME}/share/man:$MANPATH


what is the result of this command :

Code: Select all

env


Thus, to this end, can anyone tell me what might be going wrong? Is that caused by wrong setting in the step of configuration?
Another question, what is the real difference between
make, make mj4, and make multi multi_nprocsX ?


Code: Select all

make  =>   make multi multi_nprocs=1    ( sequential make )
make mj4  => make multi multi_nprocs=4

regards

jmb
------
Jean-Michel Beuken
Computer Scientist

ljludwig
Posts: 77
Joined: Fri Jun 08, 2012 5:19 am

Re: Problem when compiling 6.12.3 with Openmpi

Post by ljludwig » Sat Jun 16, 2012 8:45 pm

Hello jmb:

Thank you very much for your kind reply. It does help a lot. Eventually I managed to compile, make and install it successfully, and run it in a cluser, with 1 node and 12 intel xeron cores.

The configuration files I used is:

#./configure CC=mpicc FC=mpif90 CXX=mpicxx --prefix=/public/home/usrname/software/abinit-6.12.3 --enable-mpi --with-linalg-libs="-L/public/software/intel/Compiler/11.1/059/mkl/lib/em64t -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm" --with-mpi-prefix=/public/software/mpi/openmpi1.5.4-intel --with-linalg-includes=/public/software/intel/Compiler/11.1/059/mkl/include --with-linalg-flavor=mkl --with-dft-flavor="bigdft+libxc+wannier90"

In other wors, I used mpicc, mpif90 and mpicxx as compiler, set the install path in "--prefix".

The linear algebra should be mkl, however, even if I used "--with-linalg-libs", "---with-linalg-includes", and "--with-linalg-flavor", it does not recognize but still use the internal blas and lapack libraries.

Then, I enable MPI with "-enable-mpi", and "--with-mpi-prefix" is set to OpenMPI version 1.5.4

The important thing which makes it work is in the step of atompaw; if atompaw is in the "with-dft-flavor", it will cause crash, so I select dft flavor manually, without atompaw. Hopefully it will only affect the generation of paw data, not using PAW method.

Then, after configure, I use
#/public/software/intel/Compiler/11.1/059/bin/iccvars.sh intel64
#/public/software/intel/Compiler/11.1/059/bin/ifortvars.sh intel64


After that, I did
#make multi multi_nprocs=12

With the aid of these steps, eventually it can run the program, at least in the current stage.

I believe this session can be labeled as "Solved" and hopefully it will be more or less helpful for future reference.

Cheers!

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Sun Jun 17, 2012 8:07 pm

Hi,

I didn't remember precisely why but it's better to use the intel version 11.1.073 ( in any case to use mpiio )

concerning the problem to use mkl and/or the compile atompaw, this is my recipe working on our test farm :

before to run configure, set your env by
( I use the paths of your env, you replace "current" in paths by the current version of your intel compiler (seems 059) ) :

source /public/software/Compiler/11.1/current/bin/ifortvars.sh intel64
source/public/software/Compiler/11.1/current/bin/iccvars.sh intel64
export PATH=/public/software/mpi/openmpi1.5.4-intel/bin:$PATH
export LD_LIBRARY_PATH= /public/software/mpi/openmpi1.5.4-intel/lib:$LD_LIBRARY_PATH


create the file "build.ac" with :

enable_gw_dpc = yes
enable_mpi = yes
enable_mpi_io = yes
with_mpi_prefix = /public/software/mpi/openmpi1.5.4-intel
with_dft_flavor = atompaw+bigdft+libxc+wannier90
with_fft_flavor = fftw3
with_fft_libs = -L/public/software/Compiler/11.1/current/mkl/lib/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
with_linalg_flavor = mkl
with_linalg_libs = -L/public/software/Compiler/11.1/current/mkl/lib/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
FC_LDFLAGS_EXTRA = -static-intel -static-libgcc
FCFLAGS_EXTRA = -static-intel -static-libgcc


and run configure :

./configure --with-config-file=./build.ac


regards

jmb
------
Jean-Michel Beuken
Computer Scientist

ljludwig
Posts: 77
Joined: Fri Jun 08, 2012 5:19 am

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ljludwig » Fri Jun 22, 2012 11:04 pm

jbeuken wrote:Hi,

I didn't remember precisely why but it's better to use the intel version 11.1.073 ( in any case to use mpiio )

concerning the problem to use mkl and/or the compile atompaw, this is my recipe working on our test farm :

before to run configure, set your env by
( I use the paths of your env, you replace "current" in paths by the current version of your intel compiler (seems 059) ) :

source /public/software/Compiler/11.1/current/bin/ifortvars.sh intel64
source/public/software/Compiler/11.1/current/bin/iccvars.sh intel64
export PATH=/public/software/mpi/openmpi1.5.4-intel/bin:$PATH
export LD_LIBRARY_PATH= /public/software/mpi/openmpi1.5.4-intel/lib:$LD_LIBRARY_PATH


create the file "build.ac" with :

enable_gw_dpc = yes
enable_mpi = yes
enable_mpi_io = yes
with_mpi_prefix = /public/software/mpi/openmpi1.5.4-intel
with_dft_flavor = atompaw+bigdft+libxc+wannier90
with_fft_flavor = fftw3
with_fft_libs = -L/public/software/Compiler/11.1/current/mkl/lib/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
with_linalg_flavor = mkl
with_linalg_libs = -L/public/software/Compiler/11.1/current/mkl/lib/em64t -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread
FC_LDFLAGS_EXTRA = -static-intel -static-libgcc
FCFLAGS_EXTRA = -static-intel -static-libgcc


and run configure :

./configure --with-config-file=./build.ac


regards

jmb



Hello jmb!! Thank you very much for your kind advice. I never thought it can be compiled that way. I deleted the previous one, and compiled under your suggestion. For me, it is super cool! The mkl, linear algebra can be incorporated, which is awesome! !

future_wl
Posts: 3
Joined: Fri Jul 27, 2012 9:02 am

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by future_wl » Fri Jul 27, 2012 9:24 am

hi ljludwig and experts here:
I met a similar problem when configuring and making abinit 6.12.3 that atompaw play a key role.
If I took atompaw in the "with-dft-favor", it will occur an unexpected error when installation, however ,if I don't write "atompaw" in "with-dft-favor" manually, the installation will be correctly finished
I wonder that without atompaw in dft favor is there some restriction when I calculate with abinit ,such as calculation with PAW. If so ,how could I solve this problem

Thanks so much!

P.S
ifort=10.1
icc=10.1
openmpi=1.4.2

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Fri Jul 27, 2012 3:16 pm

Hi,

I met a similar problem when configuring and making abinit 6.12.3 that atompaw play a key role.
If I took atompaw in the "with-dft-favor", it will occur an unexpected error when installation, however ,if I don't write "atompaw" in "with-dft-favor" manually, the installation will be correctly finished


what is the "unexpected error" ?
( PS : is flavor not favor... typo I suppose )

with abinit 6.12.3 / ifort 10.1 / openmpi 1.6, and this abinit.ac file :

Code: Select all

CC = icc
CXX = icpc
FC = ifort

with_dft_flavor = atompaw+libxc+wannier90
with_trio_flavor = netcdf+etsf_io

with_mpi_prefix = /usr/local/openmpi_intel10
enable_gw_dpc = yes
enable_mpi = yes

prefix = /opt/etsf


these commands succeed :

Code: Select all

./configure --with-config-file=./abinit.ac
make mj4
make install


you can find all binaries in /opt/etsf/bin/ as expected :

Code: Select all

ls /opt/etsf/bin/
abinetcdf  abinit  aim  anaddb  band2eps  conducti  cut3d  fftprof  kss2wfk  lapackprof  lwf  macroave  mrgddb  mrggkk  mrgscr  newsp  optic  timeout  ujdet


except the binaries of fallbacks that seems forgotten...

Code: Select all

ls fallbacks/exports/bin/
atompaw-abinit  etsf_io-abinit  graphatom-abinit  nc-config-abinit  nccopy-abinit  ncdump-abinit  ncgen3-abinit  ncgen-abinit  wannier90.x-abinit


...totally missed in the "make install"... ( also in the 6.15.2 version...)

jmb
------
Jean-Michel Beuken
Computer Scientist

future_wl
Posts: 3
Joined: Fri Jul 27, 2012 9:02 am

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by future_wl » Wed Aug 01, 2012 5:09 am

Thanks jbeuken so much for your help, and the unexpected error is :

Code: Select all

ifort: command line warning #10156: ignoring option '-r'; no argument required
ifort: command line warning #10156: ignoring option '-r'; no argument required
ipo: error #11021: OBJREAD Error: Could not create mapping for /opt/openmpi-1.4.2/lib
ifort: error #10014: problem during multi-file optimization compilation (code 1)
make[6]: *** [atompaw] Error 1
make[6]: Leaving directory `/opt/abinit/fallbacks/sources/atompaw-3.0.1.3/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/opt/abinit/fallbacks/sources/atompaw-3.0.1.3'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/opt/abinit/fallbacks/sources/atompaw-3.0.1.3'
make[3]: *** [stamps/atompaw-build-stamp] Error 2
make[3]: Leaving directory `/opt/abinit/fallbacks'
make[2]: [all-local] Error 2 (ignored)
Checking build of atompaw fallback
test -e stamps/atompaw-install-stamp
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/opt/abinit/fallbacks'
make[1]: *** [multi] Error 2
make[1]: Leaving directory `/opt/abinit'
make: *** [mj4] Error 2


When I don't write "atompaw" into -with_dft-flavor, these error won't appear, and the installation is correct.

And, I'm sorry for the typo that it's "flavor", not "favor" :oops:

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Wed Aug 01, 2012 10:56 pm

Hi,

I'm not sure but it seems that this is a problem with your openmpi

ifort: command line warning #10156: ignoring option '-r'; no argument required
ifort: command line warning #10156: ignoring option '-r'; no argument required
ipo: error #11021: OBJREAD Error: Could not create mapping for /opt/openmpi-1.4.2/lib
ifort: error #10014: problem during multi-file optimization compilation (code 1)


have you compiled openmpi from source ? with ifort ? same version ?
have you already compiled abinit without MPI but with atompaw ?

regards

jmb
------
Jean-Michel Beuken
Computer Scientist

future_wl
Posts: 3
Joined: Fri Jul 27, 2012 9:02 am

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by future_wl » Tue Aug 21, 2012 5:07 am

Thanks jbeuken so much for your instruction:
I did compile openmpi from the source with the same version of ifort (ifort 10.0), actually, it does work if i don't take " autopaw " into -with_dft_flavor
With your instruction, I tried to compile abinit without MPI but with atompaw, and it really worked.
I wander that is there any relation between "autopaw" and "openmpi", and how can I successfully compiled abinit with openmpi and "autopaw" simultaneously?

Thank you!

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Fri Aug 24, 2012 10:19 pm

Hi future_wl,

I wander that is there any relation between "autopaw" and "openmpi", and how can I successfully compiled abinit with openmpi and "autopaw" simultaneously?


I think there is no relation between...

and how can I successfully compiled abinit with openmpi and "autopaw" simultaneously?


peharps, with this recipe

- compile abinit without openmpi
- copy atompaw found under fallbacks/exports/[bin,lib,include] to , for example, /usr/local/atompaw[bin,lib,include]

and, in the .ac file , add

Code: Select all

with_atompaw_bins = /usr/local/atompaw/bin
with_atompaw_incs = -I/usr/local/atompaw/include
with_atompaw_libs = -L/usr/local/atompaw/lib -latompaw


and recompile abinit with openmpi

but, it's important to upgrade intel ifort version to 11.1 or 12.1.4 because 10.x is no longer supported

regards

jmb
------
Jean-Michel Beuken
Computer Scientist

ppy
Posts: 24
Joined: Wed May 19, 2010 6:28 pm

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ppy » Thu Sep 13, 2012 4:31 pm

Dear Abinit users and developpers,

I was wondering if anybody already tried to compile abinit 6.12.3 on opensuse with openmpi and GNU compilers.
I guess I have some trouble because of the command:

gfortran -V
With compiler I got the following error message:

gfortran: error: unrecognized option ‘-V’
gfortran: fatal error: no input files

Actually '-V' is an option on Red Hat but not on SUSE Linux...
This is a very specific question but would anybody have some suggestions (except use intel compilers that I would like to avoid
for the moment)?
Thanks a lot in advance.
PY

ppy
Posts: 24
Joined: Wed May 19, 2010 6:28 pm

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ppy » Thu Sep 13, 2012 4:36 pm

Sorry I forgot to paste the error message that I got from the compilation :

abinit-6.12.3/fallbacks/exports/lib -lnetcdf" --with-moduledir="/home/prodhomme/Simulation/abinit-6.12.3/fallbacks/exports/include"
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether the Fortran compiler works... no
configure: error: in `/home/prodhomme/Simulation/abinit-6.12.3/fallbacks/sources/etsf_io-1.0.4':
configure: error: Fortran compiler cannot create executables
See `config.log' for more details.
make[3]: *** [stamps/etsf_io-config-stamp] Erreur 77
make[3] : on quitte le répertoire « /home/prodhomme/Simulation/abinit-6.12.3/fallbacks »
make[2]: [all-local] Erreur 2 (ignorée)
Checking build of etsf_io fallback
test -e stamps/etsf_io-install-stamp
make[2]: *** [all-local] Erreur 1
make[2] : on quitte le répertoire « /home/prodhomme/Simulation/abinit-6.12.3/fallbacks »
make[1]: *** [multi] Erreur 2
make[1] : on quitte le répertoire « /home/prodhomme/Simulation/abinit-6.12.3 »
make: *** [mj4] Erreur 2
[prodhomme@linux-63vp abinit-6.12.3]$ gfortran -V
gfortran: error: unrecognized option ‘-V’
gfortran: fatal error: no input files
compilation terminated.

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by pouillon » Thu Sep 13, 2012 6:02 pm

I guess I have some trouble because of the command:
gfortran -V
With compiler I got the following error message:
gfortran: error: unrecognized option ‘-V’
gfortran: fatal error: no input files


The correct command is: gfortran --version

configure: error: in `/home/prodhomme/Simulation/abinit-6.12.3/fallbacks/sources/etsf_io-1.0.4':
configure: error: Fortran compiler cannot create executables
See `config.log' for more details.


As indicated in your error message, the information about the error is in the config.log of ETSF_IO, in ~abinit/fallbacks/sources/etsf_io-1.0.4/. Look for the last occurence of "failed" in there. If you cannot resolve the issue, I suggest you to disable ETSF_IO support (see with_trio_flavor in ~abinit/doc/config/build-config.ac). You may repeat this strategy disabling as many options as necessary until your build environment complies with what you ask.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

ppy
Posts: 24
Joined: Wed May 19, 2010 6:28 pm

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ppy » Thu Sep 13, 2012 10:24 pm

Thanks a lot for your answer,
I will give a try to this flavor.
Actullay I tried to disable etsf-io with "--enable-etsf-io=no" but it looks like it was not a good idea since I got the same error message.
Thanks again, I will let you know about my progress...
PY

ppy
Posts: 24
Joined: Wed May 19, 2010 6:28 pm

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ppy » Wed Sep 19, 2012 2:16 pm

I finally got through it...
I used openmpi, icc and ifort on openuse 12.1 (but I think I would have the same behavior with gcc and gfortran).
Actually what happens to me was that during the compilation the lib for netcdf was not redirected in the good directory:
it was directed to: ~/abinit/fallbacks/exports/lib
though the lib had been created in ~/abinit/fallbacks/exports/lib64.
Probably my environment is not set properly...?
So I tried to specify the link to the netcdf lib during the config mit --with-netcdf-libs="L/home/..../fallbacks/exports/lib64"
But It didn't work so I simply linked the .../lib to the .../lib64.
This is not a nice way to recover it but it works.
Then I simply had further troubles with atompaw compilation (same error as future_wl). I didn't have the courage to go through so I just skip the compilation of atompaw. That I already compiled anyway with a former version of abinit.
So Finally it works...
I just wonder if there is nicer way to tell the compilation where to find the netcdf (and others) libs...
Thanks a lot
PY

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Thu Sep 20, 2012 11:35 am

Hi,
But It didn't work so I simply linked the .../lib to the .../lib64.
This is not a nice way to recover it but it works.

for information, this "problem" is solved in the build system of Abinit version 7
2 bots in our testfarm run now on openSUSE 12.1 and Fedora 16, both OS know to use lib64
------
Jean-Michel Beuken
Computer Scientist

ppy
Posts: 24
Joined: Wed May 19, 2010 6:28 pm

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by ppy » Thu Sep 20, 2012 12:08 pm

Hi,
ok good news!
Do you have any expected date for the next abinit released?
Thanks

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: [SOLVED] Problem when compiling 6.12.3 with Openmpi

Post by jbeuken » Thu Sep 20, 2012 9:10 pm

very soon, early next week, the version 7.0.1-rc1 should be completed and
then, I hope so, in one or two weeks, the final 7.0.1 will be available ...

jmb
------
Jean-Michel Beuken
Computer Scientist

Locked