Showing results for 
Search instead for 
Did you mean: 

source environmental variables failed after installing Intel Fortran 2016


         I am a student and mayor is computer fluid dynamics.

         I need to install Intel Fortran to finish the numerical calculation work.

         After I installed the IVF 2016,I could not source my environmental variable(I am currently using a commerical CFD software called STAR-CD)

         please see the output below:


liuxd@shanghai08:~$ source /home/liuxd/1-Installations/etc/setstar

bash: arch: No such file or directory

bash: arch: No such file or directory

No command 'ia32' found, did you mean:

 Command 'id32' from package 'simh' (universe)

ia32: command not found

bash: /tmp/starenv.liuxd.4890: line 60: syntax error near unexpected token `('

bash: /tmp/starenv.liuxd.4890: line 60: `      intel64        : Set up for Intel(R)64 target.'


         The ifort version is as below:


liuxd@shanghai08:~$ ifort -V

Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version Build 20160415

Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.


         And the linux system information is as below:


liuxd@shanghai08:~$ cat /etc/os-release


VERSION="16.04.1 LTS (Xenial Xerus)"



PRETTY_NAME="Ubuntu 16.04.1 LTS"







         Before I installed IVF 2016,I could source this environmental variable successfully.

         I think there must be some conflicts after the fortran compiler installing.

         Could you commment on this?

         Thanks in advance.


0 Kudos
2 Replies

A problem I've recently experienced on CentOS 7.2 (but not on 6.7) may be related. Let me explain my problem and work around.

I have two Linux boxes (servers) with minimal display (each single 1080p). I have a Windows 7 desktop with a 4K monitor (3840x2160p). I use Xming on the desktop, and putty into either or both of the servers (multiple Xming instances when both).

When I putty into a server, but before launching the gnome or kde session, I run a bash shell script. I call it

   bash bin/

The script performs the source commands to set up the environment for the Intel software packages.

On return from the bash run, on CentOS 7.2 (but not on 6.7), I too noticed that ifort -V does not locate ifort. ??

I issue cat bin/ to list the contents of the script, then copy  the source line to clipboard, then paste to the command line, and issue the source command directly. Then the ifort -V succeeds.

What's apparently happening, is the behavior of bash (CentOS 7.2 (but not on 6.7)), is to restore (pop back) the original environment upon termination of the script.

My solution was to launch the plasma-desktop within the bash shell script

# script for starting up login programs
source /opt/intel/parallel_studio_xe_2016.3.067/bin/ intel64
source /opt/intel/itac/ --vtune
source /opt/intel/compilers_and_libraries/linux/mpi/intel64/bin/ intel64
plasma-desktop && kwin &

This kept the environment setup.

If you Google

    bash not preserving source environment

You will find other work arounds.

Jim Dempsey

0 Kudos

The string in the error from line 60 matches a string in our compilervars very near line 60. Our script also accepts an ia32 argument and uses command-line options and variables named ‘arch’ and uses <arch> in echo commands near line 60 too. So it seems like the setstar script created a copy of our compilervars in the file name /tmp/starenv.liuxd.4890 and then echo commands or quoted strings used in echo commands in our script around line 60 malfunctioned somehow.

I don’t know whether your allowed to share their setstar script here with us and do not advise doing so w/o their permission. If you haven’t already, you might inquire with the providers of STAR-CD about the error and let us know how we can help. We’d be happy to follow-up if there’s anything related to our setup scripts contributing to the error.

Maybe another possibility is to run our compilervars script first so your environment is setup for our compiler and then maybe the setstar script will detect that and not source our script.

0 Kudos