- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I run the program from the Visual Studio is the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> Only Intel GPU are compatible with FORTRAN?
Yes. Intel Fortran only works with Intel GPU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can I do anything about the environment issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does your PATH variable look like? Perhaps the wrong directory is being picked up by ifx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Visual Studio 2022 Enterprise is installed. I didn't understand the reproducer thing. What exactly should I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sample fails for a large number n but works for smaller values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think your problem has been solved? Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. You only need one of these: /Qopenmp /Qiopenmp. I recommend using /Qiopenmp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page