Hi Yuao,
Yuao Ma wrote:
Happy New Year!
Likewise.
After some investigation, I've prepared the
following patch for acc_init_device, which I believe can share most of
its implementation with acc_init.
I would like to leave the review of the actual patch to Thomas, who
knows OpenACC better than me.
However, I miss the Fortran changes to
libgomp/{openacc_lib.h,openacc.f90}. Even though the added libgomp.texi
change talks about Fortran.
Note: The entries in the map file that end with an underscore are for
Fortran – and the '_8_' to be compatible with -fdefault-integer-8. In
any case, the patch adds acc_init_device_h_ to the .map file but don't
actually provide it. (openacc.f90 creates both an .o files that is
linked to libgomp.{a,so} and module files – i.e. it contains actual
code; openacc_lib.h only declares the added routine).
Tobias
PS: Eventually, the 'acc init' directive also needs to be added
(likewise for shutdown), but that's somewhat unrelated to this patch,
even though the added routine could be used by the directive.
PPS: 'acc_ev_device_init_start' description clearly implies that it
should be triggered for acc_init_device (as the patch does), but the
specification only talks about 'acc_init'. Looks as if some copy editing
is required, cf. Section 5.1.2 in OpenACC 3.4.