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

How to enable the GPU to run a FORTRAN program?

eliopoulos
초보자
11,583 조회수

How can I enable the GPU to run a parallel do loop in a FORTRAN program? I have tried: "!$omp target teams distribute parallel do" but the GPU does not run. Any advice?

0 포인트
49 응답
eliopoulos
초보자
3,986 조회수

When I run the program from the Visual Studio is the same.

0 포인트
Barbara_P_Intel
3,965 조회수

>>  Only Intel GPU are compatible with FORTRAN?

Yes. Intel Fortran only works with Intel GPU.

 

 

0 포인트
eliopoulos
초보자
3,953 조회수

Can I do anything about the environment issue?

0 포인트
Barbara_P_Intel
3,882 조회수

What does your PATH variable look like? Perhaps the wrong directory is being picked up by ifx.

 

0 포인트
eliopoulos
초보자
3,875 조회수
0 포인트
eliopoulos
초보자
3,863 조회수

I don't know if this is what you want but I have:

Executables: $(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\bin\HostX64\x64;$(UniversalCRTSdkDir)bin\$(UCRTVersion)\x64;$(UniversalCRTSdkDir)bin\x64;$(IFortInstallDir)bin;$(IFortInstallDir)bin;$(VSInstallDir)Common7\ide;$(VSInstallDir)Common7\Tools;$(FrameworkDir)$(FrameworkVersion);$(WindowsSdkDir)bin\x64;$(PATH)

Includes: $(UniversalCRTSdkDir)Include\$(UCRTVersion)\um;$(UniversalCRTSdkDir)Include\$(UCRTVersion)\shared;$(IFortInstallDir)opt\compiler\include;$(MKLInstallDir)..\latest\include;$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\atlmfc\include;$(WindowsSdkDir)include\um;$(WindowsSdkDir)include\shared;$(FrameworkSDKDir)include

Libraries: $(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\lib\x64;$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\um\x64;$(UniversalCRTSdkDir)Lib\$(UCRTVersion)\ucrt\x64;$(IFortInstallDir)lib;$(MKLInstallDir)..\latest\lib;$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\atlmfc\lib\x64;$(WindowsSdkDir)lib\winv6.3\um\x64

Default options: /Qlocation,link,"$(VSInstallDir)VC\Tools\MSVC\$(VCToolsVersion)\bin\HostX64\x64"

0 포인트
Steve_Lionel
명예로운 기여자 III
3,844 조회수

To see what PATH is from a command window, type:

 

set path > path.txt

and then attach path.txt to a reply here. Note that the path in a Fortran command prompt window (started with the Intel shortcut) is different from the system PATH which is what will be used if you double-click on an EXE, so check PATH from a bare command prompt (Click Start, type "cmd" (no quotes) and then open Command Prompt when it appears.) The Visual Studio environment is different still.

eliopoulos
초보자
3,834 조회수

Because I didn't understand which one is needed, I am providing both paths, From Fortran cmd (path1) and from cmd (path2).

0 포인트
Barbara_P_Intel
3,778 조회수

It looks like path1.txt is the PATH from the oneAPI command window. That's the command window you want to use. The PATH is like what is on my laptop. I asked to be sure some other directories were not before the ones for oneAPI components.

What version of VS is installed?

Please post a reproducer.

 

 

0 포인트
eliopoulos
초보자
3,772 조회수

Visual Studio 2022 Enterprise is installed. I didn't understand the reproducer thing. What exactly should I do?

0 포인트
Barbara_P_Intel
3,730 조회수

Can you please be more specific about the version of VS 2022 you are using? To get that, start VS, open a solution, click Help in the top bar, click about Microsoft Visual Studio. In the upper left corner there's a version number. It may be something like Version 17.8.1.

A reproducer is a small sample program that demonstrates the issue.

0 포인트
eliopoulos
초보자
3,708 조회수

The VS 2022 version is 17.8.6. I haven't got a suitable reproducer. When I run the reproducer I have, I get different errors.

0 포인트
eliopoulos
초보자
3,694 조회수

An update:

when I build the solution, I get:

Rebuild started at 17:18...
1>------ Rebuild All started: Project: BSFADAS_03 (IFX), Configuration: Release x64 ------
Deleting intermediate files and output files for project 'BSFADAS_03', configuration 'Release|x64'.
Compiling with Intel® Fortran Compiler 2024.0.2 [Intel(R) 64]...
BSFADAS_03.for
ifx: warning #10148: option '/size-llp64' not supported
ifx: warning #10148: option '/size-llp64' not supported
Linking...
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
12744354.o : warning LNK4078: multiple '__CLANG_OFFLOAD_BUNDLE__openmp-s' sections found with different attributes (40500040)
Embedding manifest...

Build log written to "file://C:/Work/Work/2023%20OPENZDM/Fortran%20folder/BSFADAS_03/x64/Release/BuildLog.htm"
BSFADAS_03 - 0 error(s), 3 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 17:18 and took 31.941 seconds ==========

and when I run the program:

LEVEL_ZERO message: Error: module creation failed
LEVEL_ZERO message: Target build log:
LEVEL_ZERO message: <empty>
Libomptarget error: Unable to generate entries table for device id 0.
Libomptarget error: Failed to init globals on device 0
Libomptarget error: Run with
Libomptarget error: LIBOMPTARGET_DEBUG=1 to display basic debug information.
Libomptarget error: LIBOMPTARGET_DEBUG=2 to display calls to the compute runtime.
Libomptarget error: LIBOMPTARGET_INFO=4 to dump host-target pointer mappings.
Libomptarget error: Source location information not present. Compile with -g or -gline-tables-only.
Libomptarget fatal error 1: failure of target construct while offloading is mandatory

0 포인트
Barbara_P_Intel
3,682 조회수

@eliopoulos, earlier you wrote that you couldn't run the samples I pointed you to successfully. Can you please attach one that fails? Then I can be sure what you are running and work with that.

 

0 포인트
eliopoulos
초보자
3,673 조회수

This sample fails for a large number n but works for smaller values.

0 포인트
Barbara_P_Intel
3,647 조회수

Thanks for the file. 

I ran into the same issue on my laptop... not enough memory in the Intel(R) Iris(R) Xe Graphics GPU for the larger arrays.

So your software environment seems fine then. Good!

'/size-llp64' is not an ifx compiler option. Can you attach the BuildLog.htm? Where did you get that compiler option?

 

0 포인트
eliopoulos
초보자
3,618 조회수

I am not allowed to attach the file. Here it is:

Build Log
  

Build started: Project: BSFADAS_03, Configuration: Release|x64

Output
  
Deleting intermediate files and output files for project 'BSFADAS_03', configuration 'Release|x64'.
Compiling with Intel® Fortran Compiler 2024.0.2 [Intel(R) 64]...
ifx /nologo /O2 /Qopenmp-targets:spir64 /Qopenmp /Qiopenmp /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc170.pdb" /libs:dll /threads /c /Qmkl /integer-size:64 /Qlocation,link,"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64" /Qm64 "C:\Work\Work\2023 OPENZDM\Fortran folder\BSFADAS_03\BSFADAS_03.for"
ifx: warning #10148: option '/size-llp64' not supported
ifx: warning #10148: option '/size-llp64' not supported

Linking...
Link /Qiopenmp /Qopenmp-targets:spir64 /Fe"x64\Release\BSFADAS_03.exe"  "x64\Release\BSFADAS_03.obj" /link /INCREMENTAL:NO /NOLOGO /NODEFAULTLIB:"libcmt.lib" /MANIFEST /MANIFESTFILE:"x64\Release\BSFADAS_03.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Work\Work\2023 OPENZDM\Fortran folder\BSFADAS_03\x64\Release\BSFADAS_03.lib"
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.2 Build 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

7764354.o : warning LNK4078: multiple '__CLANG_OFFLOAD_BUNDLE__openmp-s' sections found with different attributes (40500040)

Embedding manifest...
mt.exe /nologo /outputresource:"C:\Work\Work\2023 OPENZDM\Fortran folder\BSFADAS_03\x64\Release\BSFADAS_03.exe;#1" /manifest "x64\Release\BSFADAS_03.exe.intermediate.manifest"

BSFADAS_03 - 0 error(s), 3 warning(s)

I don't know where I got that option.

0 포인트
joshbuttler1
초급자
3,601 조회수

I think your problem has been solved?  Right?

0 포인트
eliopoulos
초보자
3,584 조회수

No, it has not been solved yet, I think.

0 포인트
Barbara_P_Intel
3,565 조회수

Thank you. You only need one of these: /Qopenmp /Qiopenmp. I recommend using /Qiopenmp.

 

0 포인트
eliopoulos
초보자
3,552 조회수
0 포인트
응답