- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi guys
i used source command for enviroment setup of ifort command as :
source /opt/intel/Compiler/.../ifortvars.sh ia32
it works well when i use ifort in bash and csh shell but when i try use ifort in a csh script it doesn't work !
this probelm only occoures in debian and ubuntu and i do this job in opensuse with no problem.
please help me
i used source command for enviroment setup of ifort command as :
source /opt/intel/Compiler/.../ifortvars.sh ia32
it works well when i use ifort in bash and csh shell but when i try use ifort in a csh script it doesn't work !
this probelm only occoures in debian and ubuntu and i do this job in opensuse with no problem.
please help me
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, for csh you must source ..../ifortvars.csh ia32
Second, your first line of the script must be:
#!/bin/csh
Next, you may have a ~/.cshrc or other startup script that is resetting the env for the subshell invoked by the csh script. Normally child shells inherit their parent's env, but your .cshrc could be overriding things. Move it out of the way and see if that makes a difference.
If all else fails, add the source ../ifortvars.csh ia32 as the second line in your script.
There is no reason this will not work, and I wrote a simple csh script invoked from csh to confirm that it works fine on my Ubu 9.04 system.
ron
Second, your first line of the script must be:
#!/bin/csh
Next, you may have a ~/.cshrc or other startup script that is resetting the env for the subshell invoked by the csh script. Normally child shells inherit their parent's env, but your .cshrc could be overriding things. Move it out of the way and see if that makes a difference.
If all else fails, add the source ../ifortvars.csh ia32 as the second line in your script.
There is no reason this will not work, and I wrote a simple csh script invoked from csh to confirm that it works fine on my Ubu 9.04 system.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald Green (Intel)
First, for csh you must source ..../ifortvars.csh ia32
Second, your first line of the script must be:
#!/bin/csh
Next, you may have a ~/.cshrc or other startup script that is resetting the env for the subshell invoked by the csh script. Normally child shells inherit their parent's env, but your .cshrc could be overriding things. Move it out of the way and see if that makes a difference.
If all else fails, add the source ../ifortvars.csh ia32 as the second line in your script.
There is no reason this will not work, and I wrote a simple csh script invoked from csh to confirm that it works fine on my Ubu 9.04 system.
ron
Second, your first line of the script must be:
#!/bin/csh
Next, you may have a ~/.cshrc or other startup script that is resetting the env for the subshell invoked by the csh script. Normally child shells inherit their parent's env, but your .cshrc could be overriding things. Move it out of the way and see if that makes a difference.
If all else fails, add the source ../ifortvars.csh ia32 as the second line in your script.
There is no reason this will not work, and I wrote a simple csh script invoked from csh to confirm that it works fine on my Ubu 9.04 system.
ron
when i try to source .../ifortvars.csh ia32 i get such error:
bash: /opt/.../ifortvars.csh: line 10: syntax error near unexpected token "$1" '
bash: /opt/.../ifortvars.csh: line 10: switch ("$1") '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - hossein309
when i try to source .../ifortvars.csh ia32 i get such error:
bash: /opt/.../ifortvars.csh: line 10: syntax error near unexpected token "$1" '
bash: /opt/.../ifortvars.csh: line 10: switch ("$1") '
This means you are in bash shell and not csh. You can confirm this with:
echo $0
which prints your shell. I was surprised that source .../ifortvars.sh would work for csh; it should not work.
How do you get into csh? Bash is the default for Ubuntu. You also have to explicitly apt-get install csh tcsh for Ubu desktop as it is not installed by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald Green (Intel)
This means you are in bash shell and not csh. You can confirm this with:
echo $0
which prints your shell. I was surprised that source .../ifortvars.sh would work for csh; it should not work.
How do you get into csh? Bash is the default for Ubuntu. You also have to explicitly apt-get install csh tcsh for Ubu desktop as it is not installed by default.
YES !!! IT IS CORRECT !!!
I was in bash and tried to source /.../ifrotvars.csh
Thank you so much

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page