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

'Unknown option: -localonly' when running Coarray program

FruitBread
초급자
2,185 조회수

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

레이블 (2)
0 포인트
1 솔루션
Steve_Lionel
명예로운 기여자 III
2,086 조회수

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.

원본 게시물의 솔루션 보기

8 응답
Steve_Lionel
명예로운 기여자 III
2,109 조회수

-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 포인트
FruitBread
초급자
2,091 조회수

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 포인트
Steve_Lionel
명예로운 기여자 III
2,087 조회수

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
초급자
2,082 조회수

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

0 포인트
Jon_D
새로운 기여자 II
279 조회수

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 포인트
FruitBread
초급자
233 조회수

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 포인트
Jon_D
새로운 기여자 II
226 조회수

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 포인트
FruitBread
초급자
209 조회수

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 포인트
응답