This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.7, RFC, Fortran] Coarray: Moving towards real parallelization
- From: Tobias Burnus <burnus at net-b dot de>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 03 Mar 2011 00:04:12 +0100
- Subject: Re: [4.7, RFC, Fortran] Coarray: Moving towards real parallelization
- References: <4D6EA9AA.2040408@net-b.de> <20110302213254.GD18183@gmx.de>
Hello Ralf,
thanks for your comments.
Ralf Wildenhues wrote:
The library will depend on the MPI installation, obviously.
You can make a new target directory and overwrite CC with MPICC
for that directory. For choosing the latter, the AX_MPI macro from
the Autoconf Macro Archive can help. (I can help with the configure
setup if needed, just not timely).
OK. Though as it should be a relatively small library with little
dependency, I assume many users/system administrators will compile it
separately.
[run the program]
But maybe you don't need to take care of that but can leave it to the
user of GCC.
That was my idea - though to have some way for the test suite would be
useful ...
static MPI_Win caf_world_window;
MPI_Win and one-sided communication is an MPI 2 feature; you need to
test that since there are (IME) still implementations out there that
don't fully support this.
The library part is actually not set in stone; there is a MPI 1 proposal
for its implementation. [1] However, using MPIv2 was the fastest for
me. I could imagine that at the end there might be a couple of different
library implementations. In any case, my current focus is mostly on the
front end - thus a roughly working library is sufficient for me. Whether
the polished library will be MPI 1 or MPI 2 or conditionally one or the
other, the future will tell.
[1] http://gcc.gnu.org/ml/fortran/2010-04/msg00168.html
MPI_Init (argc, argv);
If you're relying on MPI2 anyway, I suggest you try to not limit your
users to not use MPI themselves. So please use MPI_Initialized, and
don't finalize if the library isn't responsible.
Well, the current implementation relies on an early initialization by
the front end, the compiler generates a main program, which initializes
the library. Thus, there is no chance for the user to call MPI earlier.
However, one should think of having a coarray program, where the main
program is not a Fortran program. In that case, the parallelization
library could be called later. However, one then runs into issues like
initializing the library. I think one has to think carefully about that
- but supporting coarrays with a non-Fortran main program causes several
subtle issues.
Tobias
PS: I think I will come back to your offer to help with AX_MPI after the
first front-end patch is in and the library has been a bit cleaned up.