Compling Problem for Abinit 7.0.4 with mpich2 [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
ljludwig
Posts: 77
Joined: Fri Jun 08, 2012 5:19 am

Compling Problem for Abinit 7.0.4 with mpich2 [Solved]

Post by ljludwig » Sun Dec 16, 2012 7:08 am

Previously, when compiling Abinit 6.12.3 with mpich2, it goes well with the following:

#./configure --prefix=XX --enable-mpi=/home/XX/software/abinit-7.0.4/ --with-mpi-prefix=/home/XX/software/mpi/
#make multi multi_nprocs=X
#make install

However, when trying to compiling Abinit 7.0.4 with either mpich2 or mpich3, it shows the following problem:

error: #error "HAVE_MPI1 and HAVE_MPI2 are both undefined"
Makefile:778: recipe for target `m_iso_c_bindings.o' failed
make[4]: *** [m_iso_c_bindings.o] Error 1
make[4]: Leaving directory `/home/XX/software/abinit-7.0.4/src/01_interfaces_ext'
Makefile:802: recipe for target `all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/XX/software/abinit-7.0.4/src'
Makefile:1321: recipe for target `all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/XX/software/abinit-7.0.4'
Makefile:1243: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/XX/software/abinit-7.0.4'
Makefile:1843: recipe for target `multi' failed
make: *** [multi] Error 2


Can anyone tell me what does it mean of "HAVE_MPI1 and HAVE_MPI2 are both undefined"?

The currently status is:

1) Serial compiling of 7.0.4 is good.
2) parallel compiling of 6.12.3 is good, too.

Many thanks for your answer!
Last edited by ljludwig on Mon Dec 17, 2012 10:15 pm, edited 1 time in total.

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

Re: Compling Problem for Abinit 7.0.4 with mpich2

Post by ljludwig » Sun Dec 16, 2012 2:58 pm

Hello All:

I think somehow I solved this problem, simply change make multi_nprocs=4 to make mj4.

Is there a real difference between the two??...

Just put the answer here for future reference.

Btw, if there is 12 cores, can I also use mj12?

Thanks a lot.

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

Re: Compling Problem for Abinit 7.0.4 with mpich2

Post by jbeuken » Sun Dec 16, 2012 9:27 pm

Hi ljludwig,,


the correct syntax is :

Code: Select all

./configure   --prefix=XX    --enable-mpi    --with-mpi-prefix=/home/XX/software/mpi/


concerning "mj4" , after configure, you can find in Makefile :


Code: Select all

# Default number of processors for parallel builds
multi_nprocs = 4
...
# Special targets for parallel builds, in order to work around random
# failures (e.g. LibXC, NetCDF) and make sure dependencies are met
mj4:
        $(MAKE) multi multi_nprocs=4

multi:
        cd fallbacks && $(MAKE)
        $(MAKE) -j$(multi_nprocs)

multi_dual:
        $(MAKE) multi multi_nprocs=2

multi_quad:
        $(MAKE) multi multi_nprocs=4

multi_octo:
        $(MAKE) multi multi_nprocs=8


then, "make mj4" is the same that "make multi multi_nprocs=4"

and , with 12 cores, use "make multi multi_nprocs=12"

jmb
Last edited by jbeuken on Tue Dec 18, 2012 6:27 pm, edited 1 time in total.
------
Jean-Michel Beuken
Computer Scientist

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

Re: Compling Problem for Abinit 7.0.4 with mpich2

Post by ljludwig » Mon Dec 17, 2012 10:15 pm

Thank you so much!!! It then works perfectly well. Followed by your instruction, I changed Makefile (actually mj4 means 4 is default), and then

use

make multi_quad

and there is no error at all.

Thanks a lot again!


jbeuken wrote:Hi ljludwig,,


the correct syntax is :

Code: Select all

./configure   --prefix=XX    --enable-mpi    --with-mpi-prefix=/home/XX/software/mpi/


concerning "mj4" , after configure, you can find in Makefile :


Code: Select all

# Default number of processors for parallel builds
multi_nprocs = 4
...
# Special targets for parallel builds, in order to work around random
# failures (e.g. LibXC, NetCDF) and make sure dependencies are met
mj4:
        $(MAKE) multi multi_nprocs=4

multi:
        cd fallbacks && $(MAKE)
        $(MAKE) -j$(multi_nprocs)

multi_dual:
        $(MAKE) multi multi_nprocs=2

multi_quad:
        $(MAKE) multi multi_nprocs=4

multi_octo:
        $(MAKE) multi multi_nprocs=8


then, "make mj4" is the same that "make multi_nprocs=4"

and , with 12 cores, use "make multi_nprocs=12"

jmb

Locked