Hello everyone~!
Now I have a urgent porblem: I have tried to install ifort( intel fortran compiler ) on my laptop with mint 14. After the install, I runned the instruction
" source /opt/intel/composer_xe_2013.2.146/bin/compilervars.sh intel64 "
to set the enviroment variables. In the same shell, it worked. But when i quited the shell window and created another shell window to run ifort, the system told me that he can not find instruction ifort.
I have tried to run shell as superuser, but that do not change the enviroment variables either: New window can not run ifort.
I think that is a dirty joker to users and make me a little angry.
Can anyone tell me how to solve that problem? thanks very much!
Bash Instrcution source dosen't work
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Bash Instrcution source dosen't work
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Bash Instrcution source dosen't work
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: Bash Instrcution source dosen't work
I doubt that it is not the problem of Intel: The ifort ran well but i can not modify the enviroment variables. Is there anyway that I can run "source" in shell truely as superuser?TehGhodTrole wrote:http://software.intel.com/en-us/forum/
Re: Bash Instrcution source dosen't work
Hello, HeeH.
into your personal .bashrc file.
Karl
This suggests that you will have to put the commandlineAfter the install, I runned the instruction
" source /opt/intel/composer_xe_2013.2.146/bin/compilervars.sh intel64 "
to set the enviroment variables. In the same shell, it worked. But when i quited the shell window and created another shell window to run ifort, the system told me that he can not find instruction ifort.
Code: Select all
source /opt/intel/composer_xe_2013.2.146/bin/compilervars.sh intel64
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Re: Bash Instrcution source dosen't work
Environment variables are not "global", they only have effect within the shell that you set them. So it's as expected that they don't work when you open another shell. But if you put this in your .bashrc as suggested, it will be run whenever you start a new shell.
Re: Bash Instrcution source dosen't work
Thanks very much! It works! Now I am compiling my project of fortran for my course. Thank you for your help!karlchen wrote:Hello, HeeH.This suggests that you will have to put the commandlineAfter the install, I runned the instruction
" source /opt/intel/composer_xe_2013.2.146/bin/compilervars.sh intel64 "
to set the enviroment variables. In the same shell, it worked. But when i quited the shell window and created another shell window to run ifort, the system told me that he can not find instruction ifort.into your personal .bashrc file.Code: Select all
source /opt/intel/composer_xe_2013.2.146/bin/compilervars.sh intel64
Karl
Re: Bash Instrcution source dosen't work
Thanks very much! Now I begin to understand how the Linux deals with environment variables: it is different from the windows. Thank you for your help!bjornmu wrote:Environment variables are not "global", they only have effect within the shell that you set them. So it's as expected that they don't work when you open another shell. But if you put this in your .bashrc as suggested, it will be run whenever you start a new shell.
Re: Bash Instrcution source dosen't work
Hello, HeeH.
You're welcome.
Karl
You're welcome.
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Re: Bash Instrcution source dosen't work
Environment variables, i.e. those that are exported, are available to all descendants shells.bjornmu wrote:Environment variables are not "global", they only have effect within the shell that you set them. So it's as expected that they don't work when you open another shell. But if you put this in your .bashrc as suggested, it will be run whenever you start a new shell.
Note that the source command is specific to bash, and not available in sh (which is dash on Debian-based systems); use '. scriptname' instead.