* Tobias Burnus wrote on Thu, Mar 03, 2011 at 12:04:12AM CET:
> 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.

That should be even easier then.

> >>   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.

Ouch.  That then also means that the user will not be able to use MPI
herself in the program: for them, MPI_Init first thing in main is the
documented way to initialize MPI, but it will invoke undefined behavior
with above setup.

> 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.

Could be; but I think you should aim for something like that in the end,
it would be significantly more user-friendly.

Thanks,
Ralf

Reply via email to