compile error 7.0.5 bigDFT error?  [SOLVED]

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
woates
Posts: 6
Joined: Sun Feb 17, 2013 11:11 pm

compile error 7.0.5 bigDFT error?

Post by woates » Sun Feb 17, 2013 11:28 pm

Hello,

I've been having trouble compiling and running Abinit in parallel for the past couple of months. In previous 6.XX versions, I was able to compile and execute parallel jobs on our cluster without problem. Since an upgrade by our administers of the cluster, I can only compile and run serial jobs. Our cluster administer thinks the issue is within bigdft. Frankly, the administer doesn't understand how I got the code to work prior to the upgrade. I wish I remembered how I did it! (Note, I get the same type error after our upgrate using Abinit 6.10.3)

I am able to "successfully" make the code after using--> CC=mpicc FC=mpif90 ./configure --enable-mpi

However, upon executing a parallel job I get the error--> STOP MPIFAKE: mpi_attr_get. This gets printed for each processor. Similar errors occur after a make check.

I've looked in ~abinit/doc/config/build-config.ac and my config.log file, but I'm unsure what I should be looking for to resolve the problem. I also saw a couple of other threads on this, but I didn't see a solution that worked for me. My config.log file is attached below. Any help would be gratefully appreciated.

Regards,
Billy
Attachments
config.log
(220.64 KiB) Downloaded 427 times

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: compile error 7.0.5 bigDFT error?

Post by Alain_Jacques » Mon Feb 18, 2013 11:38 am

Hi Billy,

May I suggest to start from a clean situation ...

1. do an export PATH=/WhereYourMPIExecutablesReside:$PATH
2. then export LD_LIBRARY_PATH=/WhereYourMPILibrariesReside:$LD_LIBRARY_PATH
in order to be sure that mpirun, mpif90, mpicc, mpicxx are the ones you expect and the corresponding dynamic libraries can be found when configure performs its tests. Of course use the procedure adapted to your cluster, for example if you have to use module or similar environment utilities.

3. create a tmp-build building directory, invoque configure with the following flags ... --enable-mpi="yes" --with-mpi-prefix="/RootOfYourMPI"
where /RootOfYourMPI is the root path of your MPI installation i.e. you have /RootOfYouMPI/bin, /RootOfYouMPI/lib, etc... No need for a CC= or FC=

Doest it goes up to the end? Can you "make" abinit then? I see in the config.log that configure doesn't find mpi.h. Do you have that include file?

Kind regards,

Alain

woates
Posts: 6
Joined: Sun Feb 17, 2013 11:11 pm

Re: compile error 7.0.5 bigDFT error?

Post by woates » Mon Feb 18, 2013 8:02 pm

Dear Alain,

Thank you very much for your prompt reply. We tried this, but run into a few problems. We're still thinking the source of the problem may be associated with bigdft. Below is an e-mail from our administrator. (I forwarded him your suggestion.)

Thanks,
Billy

---------------------------
It's a good suggestion, but the "module load gnu-openmpi" will set the path & ld_library_path variables correctly. As I mentioned before, I think the problem is with bigdft and this morning I tried to build abinit (7.0.5!) and looked at the build logs. Abinit's configure is fine and it recognizes MPI. After that It gets a little tricky because during the build phase of abinit, it will download a bigdft tar file, untar, configure, make and delete the source directory of bigdft. In the "config.log" file from bigdft, it shows that there is a an error somewhere:

(from bigdft config.log)

configure:6778: checking for MPI capabilities
configure:6787: mpif90 -o conftest -ffree-form -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/home/paulvdm/src/abinit-7.0.5/fallbacks/exports/include /opt/hpc/gnu/openmpi/include conftest.f90 >&5
/opt/hpc/gnu/openmpi/include: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:6787: $? = 1
configure: failed program was:
| program main
| include "mpif.h"
|
| call MPI_INIT
| end
configure:6794: result: no
configure:6875: WARNING: MPI is not working and has been disabled.
configure:6877: WARNING: If you don't want to see this warning,
configure:6879: WARNING: set --disable-mpi in the configure line.
----
As you can see, it forgets to put the "-I" in front of the /opt/hpc/gnu/openmpi/include path and the compiler now tries to include that "file" in the compilation. My guess is that there is an error in the configure for bigdft: for this test it sets a variable FCFLAGS="$FCFLAGS $ac_mpi_include" and $ac_mpi_include is not set correctly. You can call bigdft's configure with the --with-mpi-include="" paremeter (mpicc knows the path, so no need to specify it) and bigdft will compile fine with mpi after that. However, I'm not sure how to do this from the abinit configure/make.

I will try some more this afternoon, but you might want to post that excerpt from bigdft's build.log to your thread on the abinit forum.

Best Regards,
Paul van der Mark

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: compile error 7.0.5 bigDFT error?

Post by Alain_Jacques » Tue Feb 19, 2013 12:02 pm

Hi Billy,

I agree with you that there are things that stink in bigdft configuration. I checked on my config: it works but there are lousy things that I'll have to investigate.
With my recipe, I don't have the explicit inclusion of the mpi headers path. It shouldn't appear in the test line because it is hidden in the mpif90 wrapper.

Would you be so kind to create a simple MPI test file containing

Code: Select all

program main
   include "mpif.h"
 
   call MPI_INIT
end
and, under the same environment, run mpif90 on it? And also report the output of

Code: Select all

/opt/hpc/gnu/openmpi/bin/mpif90 -show

If you don't need bigdft capabilities, you can always bypass the error by configuring abinit with the --with-dft-flavor="atompaw+libxc+wannier90" flag.

Kind regards,

Alain

woates
Posts: 6
Joined: Sun Feb 17, 2013 11:11 pm

Re: compile error 7.0.5 bigDFT error?  [SOLVED]

Post by woates » Sun Jun 30, 2013 3:04 am

We finally resolved this problem some time ago and I lost track in getting back to post the solution. Here is what we found worked with our system.

The missing variable was "CFGFLAGS_BIGDFT". The following commands compiled it without problems.

cd $HOME/src
rm -rf abinit-7.0.5 && tar zxf abinit-7.0.5.tar.gz
cd abinit-7.0.5
module purge
module load gnu-openmpi
echo $PATH
echo $LD_LIBRARY_PATH
which mpicc
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export CFGFLAGS_BIGDFT='--with-mpi-include=""'
./configure --prefix=$HOME/abinit --enable-mpi | tee abinit-config.log
grep MPI abinit-config.log
grep "define HAVE_MPI" config.h
make | tee abinit-build.log

Locked