- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
We have been asked to begin using the icx and ifx compilers by our partner agency when deploying our software to them. I'm currently getting a segmentation fault in one of our binaries when executed, so I attempted to disable optimizations by using -O0 instead of what we usually compile with, which is -O2.
I'm getting this error during linking though:
ld: failed to convert GOTPCREL relocation; relink with --no-relax
I attempted to use --no-relax, but ifx reports that it's ignoring an unknown option, and then complains that I should use that same flag again. Any idea what is going wrong?
I'm using ifx version 2022.1.0 20220316 on RHEL 8, if that is helpful at all. Thanks,
-Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the immediate question: --no-relax is a linker option. We use the system linker, 'ld' on linux.
To pass options to the linker, use the -Wl, option. Like this
ifx <compiler options> -Wl,--no-relax foo.f90
I am surprised by this. In the C++ compilations, or Fortran, did you use -fpic option? This is for position independent executables. Our Dev Guide documentation on is here. The no-relax option and the error you see is discussed in a good StackOverflow thread.
And finally: you are using ifx 2022.1.0. I would not use that compiler. It is buggy. and immature. I understand that if you use a large server or cluster, the admins manage the SW tools provided. So you may not have a choice. And getting them to add a new compiler is like getting a root canal. But I must say, your experience with that compiler will not be good. Personally, I don't think ifx stabilized until the 2023 versions, particularly 2023.2.0. But I even better is if you can get the 2024.0 compiler. Or if you have a long lead time with your IT support, tell them you demand the 2024.1.0 compiler that will be released around the end of Q1 2024 or april 2024. That compiler is going to be a really good Fortran compiler, in my opinion.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the immediate question: --no-relax is a linker option. We use the system linker, 'ld' on linux.
To pass options to the linker, use the -Wl, option. Like this
ifx <compiler options> -Wl,--no-relax foo.f90
I am surprised by this. In the C++ compilations, or Fortran, did you use -fpic option? This is for position independent executables. Our Dev Guide documentation on is here. The no-relax option and the error you see is discussed in a good StackOverflow thread.
And finally: you are using ifx 2022.1.0. I would not use that compiler. It is buggy. and immature. I understand that if you use a large server or cluster, the admins manage the SW tools provided. So you may not have a choice. And getting them to add a new compiler is like getting a root canal. But I must say, your experience with that compiler will not be good. Personally, I don't think ifx stabilized until the 2023 versions, particularly 2023.2.0. But I even better is if you can get the 2024.0 compiler. Or if you have a long lead time with your IT support, tell them you demand the 2024.1.0 compiler that will be released around the end of Q1 2024 or april 2024. That compiler is going to be a really good Fortran compiler, in my opinion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ron,
Sorry for the late reply--I thought I responded before I left on holiday break. Thanks for helping me out with the appropriate flag to pass to the linker, that seemed to do the trick (unforunately, it did not help in diagnosing my issue). As far as ifx versions are concerned, I finally did get access to the HPC that our operating partner is migrating to. It's running 2023.1, and unfortunately, I do not have sufficient sway to motivate them to upgrade to 2024.0.
As far as fPIC is concerned, I did try building with that flag from your suggestion, but I'm still getting segmentation faults. Intel Inspector has not been illuminating on what could be the problem, I'm going to try to debug a little more today. I was also informed that our operating partner does have a contract with Intel to debug issues between ifort and ifx, so if I don't make further progress today, I may have them submit our code to see what they have to say. Thanks so much for your help,
-Dan
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page