Using coarrays in a shared library (OpenCoarrays)

I would write a main program in Fortran that then calls a c_main C routine. You can pass command line arguments in standard-conforming ways. On the C side, just rename your main() to c_main() and recompile. At some point in the C code, you call a Fortran subroutine that uses coarrays. Compile and link with the Fortran compiler, deploy normally as for a Fortran coarray program. I tried an example with NAG Fortran Compiler.

4 Likes