- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am working on a mixed language program that involves Fortran and Data Parallel C++ code.
When previously working on mixed language projects, I have followed the recommended procedure of linking all of the objects with ifort such that the Fortran runtimes are linked properly. This is because of the long list of varying runtime libraries that are typically involved with Fortran linking. When C++ code is involved this would involve linking the single, additional libstdc++ library with the ifort link command.
However, now with dpcpp under Linux, when I link with ifort (adding -lsycl and -lstdc++), the resulting executable fails to run, instead throwing a "cl::sycl::runtime_error".
If I instead link with dpcpp, providing -lifcore and .../compiler/lib/intel64_lin/for_main.o, the resulting executable runs as expected.
I have also tried linking with icpx and the resulting executable again throws "cl::sycl::runtime_error".
Is it possible to link a Data Parallel C++ executable, with dpcpp generated fat objects, using the ifort or ifx compilers to obtain a functional executable that runs on the device?
I can provide a reproducer if necessary, but thought I'd start by asking the question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I helped another user with a similar issue. The Fortran code does not offload. This worked for him:
+ dpcpp -c device.cpp
+ ifx -qopenmp -fsycl host.f90 device.o -lstdc++ -lOpenCL -lsycl
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm interested in the topics you have ifind it excellent advanced thanks
Best wishes,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The OneAPI Fortran compiler is ifx. Try linking with the ifx compiler (you may also need to build your Fortran sources with ifx). Please report back on your success or failure in using ifx in lieu of ifort.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the response, but as I implied in the original post, I have already tried ifx without success. The results are the same as linking with ifort, it throws the exception.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I helped another user with a similar issue. The Fortran code does not offload. This worked for him:
+ dpcpp -c device.cpp
+ ifx -qopenmp -fsycl host.f90 device.o -lstdc++ -lOpenCL -lsycl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! The "-qopenmp" and "-fsycl" command line options to ifx were what fixed it for me. Thanks again!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page