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

How to use ifort compiler to compile a fortran code and generate a "not a dynamic executable" file?


Hello,  We previously used lf95 compiler to compile a fortran code to generate a static-linking executable file on RedHat Linux machine.  This executable file can be run on other Linux machine.  Recently, we shifted compiler from lf95 to Intel ifort.  When we use ifort compiler to compile the same fortran code with option -static-intel to generate an executable file, this file cannot be run on different Linux machine with "error while loading shared libraries", suggesting this executable is not static rather than dynamic linking.   On the machine with lf95 compiler, I type the command "ldd lf95" and it shows "not a dynamic executable", but on the machine with ifort compiler, when I type the command "ldd ifort", it shows: =>  (0x00007ffca1daa000) => /lib64/ (0x00002ab9da428000) => /lib64/ (0x00002ab9da72b000) => /lib64/ (0x00002ab9da947000) => /lib64/ (0x00002ab9dad0a000) => /lib64/ (0x00002ab9daf21000)
        /lib64/ (0x000055d6902d6000)

My question here is that how can we install Intel compiler package with static rather than dynamic so when I type command "ldd ifort" it will show "not a dynamic executable" so we can use ifort compiler to compile a fortran code and generate a "not a dynamic executable" file?



0 Kudos
3 Replies
Honored Contributor III
Under limited conditions, ifort -static could build a static binary, regardless of the requirement of ifort itself for shared objects. One of the conditions is that you don't use parallel (except possibly -static-mpi). It's usually preferable to set -static-intel which will use only shared objects required by Linux installation.
0 Kudos

I just installed Intel Parallel Studio XE Cluster Edition 2019.1.053. As I tried to source the script psxevars.csh I got the following:

bash: psxevars.csh: line 35: syntax error near unexpected token `$arg'
bash: psxevars.csh: line 35: `        switch ($arg)'

When I entered "source", the following message appeared:

ERROR: Unknown switch 'INTEL_PYTHON=3'. Accepted value is 'intel64'.

CondaEnvironmentNotFoundError: Could not find environment: INTEL_PYTHON=3 .
You can list all discoverable environments with `conda info --envs`.

Could you help me with this issue, please?


0 Kudos
Honored Contributor III

Jose, please post this in a new thread. It is unrelated to the current thread.

0 Kudos