Page 1 of 1

Compling Problem for Abinit 7.0.4 with mpich2 [Solved]

Posted: Sun Dec 16, 2012 7:08 am
by ljludwig
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!

Re: Compling Problem for Abinit 7.0.4 with mpich2

Posted: Sun Dec 16, 2012 2:58 pm
by ljludwig
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.

Re: Compling Problem for Abinit 7.0.4 with mpich2

Posted: Sun Dec 16, 2012 9:27 pm
by jbeuken
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

Re: Compling Problem for Abinit 7.0.4 with mpich2

Posted: Mon Dec 17, 2012 10:15 pm
by ljludwig
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