MPI version of the CAF library: undefined references.

Jorge D'ELIA jdelia@intec.unl.edu.ar
Mon Nov 21 11:45:00 GMT 2011


Hi Tobias,

>> I try to make the MPI version of the GNU Fortran coarray
>> communication library
> 
> First, I would really discourage the use of libcaf_mpi in 4.7.

Thanks for your very detailed answer.
 
> The reason is that despite its name, there is currently no
> communication supported. Thus, you can correctly use
> ucobound/lcobound/this_image/num_images - and (with limitations) ERROR
> STOP and SYNC with any number of images. However, anything which
> involves communication will fail *silently* (or rather operate on the
> local image) - thus, by construction, it only works correctly if you
> have a single MPI process (mpiexec -np 1) or if you use only the above
> mentioned feature. -- However, any reasonable hello-world program will
> use other features and thus will fail with multiple images.
> 
> I think I should put a huge warning on the wikipage ... 
> which I did now.

Good caution.

> > $ gfortran-beta -Wall -std=f2008 -fcoarray=lib -c test01.f90
> > $ mpif90 -lcaf_mpi -o test01.exe test01.o
> > test01.f90:(.text+0x140): undefined reference to
> > `_gfortran_caf_init'
> 
> Wrong order: The "-lcaf_mpi" needs to be placed after the "test01.o".

Uppsss ...  Thanks for noticing this wrong use.

> I actually had hoped that we could implement some working hello-world
> support for 4.7. However, implementing all the missing single-image
> support took more time that anticipated. Except for some diagnostics
> and bugs, only two items are missing: Polymorphic (scalar/array) coarrays
> and the intrinsic assignment shouldn't reallocate coarray components.

OK.
 
> For the library version, a lot of work went into the infrastructure
> such as passing coarrays as actual argument to procedures and full 
> support for registering static and allocatable coarrays. (Actually, 
> the initial plan was to add only minimal support for those and deferred 
> it after hello-world support was implemented.)

I am aware that there is much work to do! 
but I wanted to experiment a little.
 
> Still planed for 4.7:
>
> - Polymorphic coarrays: This is planned to get completed shortly after
>   Paul's polymophic array support. (One day of work?)
>
> - Avoid realloc of coarray components with intrinsic DT assignment
>   (one day?)
>
> - Implement missing bits for coarray deallocation/degregistering. 
>   (two days?)

I hope that these features can be included in the 4.7 release.

> 4.8 items:
>
> a) Implement a request-handling loop in the library* (two weeks?)
> b) Use it to properly implement SYNC and ERROR STOP (two days?)
> c) Start implementation of some simple communication (three/four
>    days?)
> 
> I hope that as soon as (c) works, implementing more will be quicker as
> the motivation to complete a half-working feature is larger than to do
> all the preparatory work.

That sounds more than interesting.
 
> (* This part does not require any knowledge of the GCC internals and
> could be merged until just before the 4.7.0 release. 
> However, I don't think any work will be done for 4.7.)

Bad luck.


Regards,

Jorge.
--



More information about the Fortran mailing list