Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29417 Discussions

'Unknown option: -localonly' when running Coarray program

FruitBread
Beginner
2,028 Views

Hello everyone.

I am recently converting an old Fortran 90 serial program to parallel. I intended to use Coarray feature to do this. As I tried running my example code with IFX Intel Fortran Compiler 2024.2.1 (integrated with Microsoft Visual Studio 2022 Community, v17.11.5), the compiling and linking procedure finished without any problem, but the generated exe starts with an error. Code example and exe result are as below:

PROGRAM A
    print*,this_image()	
END

FruitBread_0-1730794380826.png

I have already enabled Coarrays for shared memory and set number of images. It seems there is an argument  '-localonly'  which cannot be identified. In Visual Studio project configuration pages I did not find such command option:

FruitBread_1-1730795185350.png

 

I tried to figure out how to disable this argument but failed (did not find where to use commands rather than GUI)

P.S. the oneAPI version (base and HPC toolkits) is 2024.2.1. I tried different configurations (Debug/Release) and platforms (x86/x64), and also tried Intel Fortran Compiler Classic, but none worked.

Can anyone help with this problem? Thanks

Best regards,

FruitBread

Labels (2)
0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,931 Views

Thanks. I ran the exe in the project and did not see the error you showed. There may be something odd in your system's install of Intel MPI.

View solution in original post

8 Replies
Steve_Lionel
Honored Contributor III
1,954 Views

-localonly is not an Intel Fortran option. I have tried reproducing this problem but was not successful. Would you please ZIP the project folder (and any subfolders) and attach the ZIP here?

I do see that -localonly is an Intel Hydra option, but am unsure if that is relevant here.

0 Kudos
FruitBread
Beginner
1,936 Views

Hi Lionel!

I have attached the zipped Visual Studio project file in this reply.

Yes, -localonly is an Intel MPI Hydra Option rather than IFX/IVF command. The coarray program relies on MPI library to run, and this might be the problem. Perhaps I should transfer this post to Intel MPI Library forum for help?

Thank you!

0 Kudos
Steve_Lionel
Honored Contributor III
1,932 Views

Thanks. I ran the exe in the project and did not see the error you showed. There may be something odd in your system's install of Intel MPI.

FruitBread
Beginner
1,927 Views

Got it. I will look for the problems in my MPI configurations. Thanks a lot!

0 Kudos
Jon_D
New Contributor II
124 Views

Hello.

I was wondering if there are any new insights on this issue. I have a coarray Fortran program that used to run without a problem several years ago with older IFX compiler but now I am getting the same error as in this topic with the latest version. 

0 Kudos
FruitBread
Beginner
78 Views

Hi Jon!

As  mentioned in the former post, this problem might caused by Visual Studio. When you start the executable program from the VS GUI, it passes a "-localonly" command to the program (or MPI library), which is an MPI Hydra command and somehow cannot be identified. I do not know how it works, but did find solutions to correctly start the parallel program.

First, build the project using Visual Studio. Remember to activate coarray and set number of images in project configuration. If successfully built, you will find the exe in your project directory. 

Second, open a windows command window using Intel oneAPI command prompt, which should be in the start menu under Intel oneAPI folder. Please Select the right architecture and version, for example, "Intel oneAPI command prompt for Intel 64 for Visual Studio 2022". This automatically initializes the environment for a coarry program to run.

Third, in the cmd, change directory to the folder of the exe and directly run it by its name. DO NOT use "mpiexec" or "mpirun" because the number of images is already specified.

Hope this info helps!

0 Kudos
Jon_D
New Contributor II
71 Views

Thanks for the explanation FruitBread!

In my case, I figured out that in my system PATH variable Microsoft MPI path was listed before the Intel MPI path. I believe this meant that the coarray executable was trying to use MS MPI dll instead of Intel's. I moved MS MPI path after the Intel MPI path and that resolved the issue of "unknown -localonly" error. 

But my program still didn't run correctly. I eventually uninstalled and reinstalled Fortran compiler, and that seems to have fixed my issue. 

0 Kudos
FruitBread
Beginner
53 Views

Thank you for your experience! Next time I will try re-installing the compiler. If this fixes the problem on my computer, it will be much more convenient to run my coarrays.

0 Kudos
Reply