Launching a Coarray process from within Fortran

Launching a Coarray process from within Fortran

Steve (et alia),

Is it possible for a non-Coarray Fortran program to launch a Coarray Fortran?  Can a Coarray Fortran image launch other Coarray Fortran images? I'm imagining using RUNQQ() in both cases.  We are exploring some (perhaps unconventional) ways to parallelize very large sections of engineering code. These ideas arise from the need to very carefully balance work load between Coarray images if full efficiency is to be obtained.

David

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You can only launch an entire program - the number of images is determined when the program starts. RUNQQ can be used to start a coarray program. You can't dynamically add images. Keep in mind that with coarrays that they are partitioned at program start based on the number of images.

It is possible to write a coarray program with "worker images" that wait for work to be assigned through the shared variables.

Steve - Intel Developer Support

Steve,

Can you clarify just a bit? Your reply indicates that I can run a non-Coarray fortran program, and that I can then (from within it) use RUNQQ to launch a Coarray program. I would then have the mother program running but waiting for the Coarray images to finish and multiple images of the Coarray program executing. Presumably the "lanucher" will need to communicate to the "launchees" via files -- though the "launchees" could communicate to each other via shared variables.  Or have I misunderstood?

David

Yes, that's exactly right. Well, mostly. There's only one "launchee" - that it ends up running in parallel is not inherently visible to the launching program. It's no different from running an autoparallel or OpenMP program via RUNQQ, though a lot more happens behind the curtain.

You could also communicate through command arguments - typically image 1 would determine what work is to be done and set things up for other images to process, though files also work.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today