- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone tried mixing C++ with Fortran co-arrays. I am trying to do so at the moment however it seems the "this_image()" and "num_images()" routines return a 0 for all cores, The main program is in C++ which calls a Fortran subroutine that contains those statements . There are no compilation errors or run time errors from these routines.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the main program is not in Fortran, then there are no calls to the run-time library to set up the coarray environment and also no "launch" code. I don't see documentation of a way to call the init routine yourself, though I know it's possible. May I suggest having the main be in Fortran and calling the C++ "main" as a subroutine?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page