Expose caf_init and caf_finalize in module to allow use with f2py, see #204 #251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #204
At configure time, choose whether to expose the
caf_init
andcaf_finalize
functions in the opencoarrays (extension) module by using-DCAF_EXPOSE_INIT_FINALIZE
.N.B. the semantics of using C pointers with Fortran still mystifies me a bit, and I don't really understand what the point of passing
argc
andargv
toMPI_init
is (since I always use fortran, where the only arg isierr
). So for my interface tocaf_init
which takesargc
andargv
as arguments, I have declared both astype(c_ptr)
so it is the users responsibility to pass the appropriatec_ptr
in to them. In my testing I just passedc_null_ptr
s and it seemed to work fine. Also, please note, that thecaf
compiler wrapper script does not pass in the installed module file for open coarrays aware (OCA) compilers (GCC/GFortran) to the compiler, so you'll have to add something like-J/usr/local/mod
or whatever to thecaf
script if you use it and want the compiler to find your installed module file and compile time.@amckinstry: will this suit your needs? Please take a look and let me know if you need any changes.