I am really new to coarray. I am trying a trying a simple example:
program ex print *, this_image(), num_images() end program
I compile with ifort /Qcoarray ex.f90. Then, when I simply run ex.exe in the console, nothing happens, the programs just hangs. If, however, I run mpiexec -n 1 ex, then it runs, and it prints 4 lines.
If I set FOR_COARRAY_DEBUG_STARTUP=1, then, when I run ex.exe directly in the console, it prints Generated MPI command line is 'mpiexec.exe -localonly -n 4 ex ' before hanging.
So, I try to run mpiexec.exe -localonly -n 4 ex directly in the command line, and it hangs too. Without -localonly, it runs, and with -n 4, I get four times the line Generated MPI command line is 'mpiexec.exe -localonly -n 4 ex ', and 16 lines output from the program.
I wonder what I am doing wrong. If I interpret correctly, coarray is using MPI, but I should not type mpiexec to run the program, it will be called automatically. However, it seems mpiexec doesn't like the -localonly option.
In case it's important, I use IVF 2017.1 on Windows 7, both 64 bits.
You are right, the workaround provided by Steve Lionel solves the problem. Since I am really beginning with coarray, I thought I had something wrong somewhere.