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

ifortvars.csh setenv: too many arguments

feitouzi
Beginner
1,066 Views
Hi,

I'm a newbie system administrator. Recently I installed Fortran 11.1.075 on my 64-bit SUSE Linux box (SLES 10 SP2). When sourcing the ifortvars.sh file under bash, it worked perfectly. However, when I switched to csh or tcsh, and
source /opt/intel/Compiler/11.1/075/bin/ifortvars.csh intel64
It gives back an error message
setenv: Too many arguments.

I checked the syntax and couldn't find where the setenv syntax may be wrong. I have, however, isolated the issue to this line:
source /opt/intel/Compiler/11.1/075/bin/intel64/ifortvars_intel64.csh;

Specifically, when I go into the /opt/intel/Compiler/11.1/075/bin/intel64/ifortvars_intel64.csh file, it seens that the INTEL_LICENSE_FILE variable is not set.

Anybody have any advice? Thanks!
0 Kudos
2 Replies
feitouzi
Beginner
1,066 Views
I managed to solve the problem.

In /opt/intel/Compiler/11.1/075/bin/intel64/ifortvars_intel64.csh, in the first clause to append to the PATH variable, for some reason the original command is not working. I modified this:

if !($?PATH) then
setenv PATH /opt/intel/Compiler/11.1/075/bin/intel64
else
setenv PATH /opt/intel/Compiler/11.1/075/bin/intel64:${PATH}
endif

with this:

if !($?PATH) then
setenv PATH /opt/intel/Compiler/11.1/075/bin/intel64
else
setenv PATH "/opt/intel/Compiler/11.1/075/bin/intel64:${PATH}"
endif


And all is well. The same worked for the C Compiler. I still don't understand why the original syntax, which seems correct, gave trouble, but at least now things work.

Thanks!
0 Kudos
Hirchert__Kurt_W
New Contributor II
1,066 Views
Quoting feitouzi
And all is well. The same worked for the C Compiler. I still don't understand why the original syntax, which seems correct, gave trouble, but at least now things work.

You don't give enough details for me to be certain, but from your description of the problem and fix, my guess would be that somewhere in the existing value for $PATH, you had a blank or other whitespace, causing csh to see it as being more than one argument when not quoted. The fix you applied is one Intel should adopt generally (for sh as well as csh and for any case where the old value of an environment variable is to be retained as part of the new value).

-Kurt

0 Kudos
Reply