This is the mail archive of the
mailing list for the GCC project.
Re: Implementing OpenACC's Fortran module
- From: Tobias Burnus <burnus at net-b dot de>
- To: Thomas Schwinge <thomas at codesourcery dot com>, James Norris <jnorris at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, jakub at redhat dot com, gcc at gcc dot gnu dot org
- Date: Sat, 20 Sep 2014 13:51:58 +0200
- Subject: Re: Implementing OpenACC's Fortran module
- Authentication-results: sourceware.org; auth=none
- References: <53EE5A89 dot 30905 at codesourcery dot com> <20140818093652 dot GA12023 at physik dot fu-berlin dot de> <53F1F025 dot 8080102 at codesourcery dot com> <20140818135104 dot GA8943 at physik dot fu-berlin dot de> <53F29628 dot 401 at codesourcery dot com> <53F3A8FC dot 9030105 at net-b dot de> <53F3B4DB dot 90506 at codesourcery dot com> <53F3CA22 dot 3050704 at net-b dot de> <8738cshytq dot fsf at schwinge dot name> <87bnqc3rte dot fsf at kepler dot schwinge dot homeip dot net>
On 19.09.2014 11:03, Thomas Schwinge wrote:
Regarding linking the object file produced by Fortran openacc.f90 into
libgomp: (with the version that Jim already has internally checked in)
I find that libgomp then has undefined references to
_gfortran_internal_unpack and _gfortran_internal_pack.
Internal pack and unpack appears when you a (potentially) noncontiguous
array is passed as argument to an argument which requires a contiguous
argument. Internal pack checks at run time whether the argument is
contiguous - and if not it creates a temporary and copies the data to
the temporary ('copy in') - internal unpack ensures for all arrays but
intent(in) that the data is propagated back to the original one.
I am pretty sure that copy-in will break the OpenACC functions.
One possibility would be to mark the dummy arguments in openacc.f90 as
CONTIGUOUS. That way, no internal pack/unpack is called by openacc.f90.
(If one has a noncontiguous array, the caller of openacc.f90 will do the
Thus, you could try to add ", contiguous" to all procedures which take
an assumed-rank array "(..)" as argument.