forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
- From: "Matteo Giantomassi" <Matteo.Giantomassi@uclouvain.be>
- To: forum@abinit.org
- Subject: Re: [abinit-forum] parallel abinit and the 'if defined MPI' statement
- Date: Mon, 20 Oct 2008 22:30:04 +0200 (CEST)
- Importance: Normal
> Hi,
>
> I am using the parallel abinit (abinip). I recently note that the 'if
> defined
> MPI'
> statement is actually not observed or executed by the code except in the
> main
> program "abinit.F90" and several other parallel directories such as
> 01manage_mpi,
> lib01hidempi. If I add a "print" statement inside the "if defined MPI" in
> "gstate.F90"
> or in "scfcv.F90", the code would not print any thing.
>
> MPI also goes into directory "18seqpar" and "lib01fftnew" which seem
> special here. and I note that two libraries were built for "18seqpar and
> lib01fftnew,
> respectively, one parallel, one serial. while only one libraries were
> built for
> most of
> other directories. The "Makefile.am" file is also different for "18seqpar"
> and
> "lib01fftnew"
> than for others, in the sense that "18seqpar" and "lib01fftnew" have the
> "if DO_BUILD_PARALLEL" option while most of others donot.
>
> If I would like to modify one of the subroutine and call a MPI function
> such as
> "MPI_SEND",
> How do I put it inside "if defined MPI" and let the code execute it?
> Thanks a lot!
You can use the API for MPI located in src/lib01hidempi, for example
you might use xexch_mpi to send and receive a packet.
For each routine in lib01hidempi there are two versions:
the sequential one is just a fake routine performing an immediate return;
only the parallel version will actually call MPI.
This allows to avoid MPI preprocessing options inside the code.
If, for some reason, you need to separate the sequential implementation
from the parallel one, you have to resort to "if defined MPI".
In this case, however, you have to move the routine to src/18seqpar
otherwise
the MPI preprocessing option will not be considered during the build.
Hope it helps.
Best regards
Matteo Giantomassi
- [abinit-forum] parallel abinit and the 'if defined MPI' statement, kong, 10/20/2008
- Re: [abinit-forum] parallel abinit and the 'if defined MPI' statement, Matteo Giantomassi, 10/20/2008
- [abinit-forum] FR Calculation warning deliveries, sara yazdani, 10/20/2008
- Re: [abinit-forum] FR Calculation warning deliveries, Marcel Mohr, 10/27/2008
- Re: [abinit-forum] FR Calculation warning deliveries, sara yazdani, 10/27/2008
- Re: [abinit-forum] FR Calculation warning deliveries, Marcel Mohr, 10/28/2008
- Re: [abinit-forum] FR Calculation warning deliveries, sara yazdani, 10/27/2008
- Re: [abinit-forum] FR Calculation warning deliveries, Marcel Mohr, 10/27/2008
Archive powered by MHonArc 2.6.15.