- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need ifort to compile a program which requires MKL. I've downloaded it, intalled it, and done the ifortvars.sh thing everytime I open the bash terminal. However when I try to make my program I just get this error
cpp -P -traditional-cpp -Dsp ddprecision.f90 \
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
make: *** [ddprecision.mod] Error 127
When i type ifort and double tap tab the ifort comand appears to be there. The makefile is fine because after editing out MKL and using gfortran it works. Can anybody help? Have I not done something, I should have done? Thanks
cpp -P -traditional-cpp -Dsp ddprecision.f90 \
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
make: *** [ddprecision.mod] Error 127
When i type ifort and double tap tab the ifort comand appears to be there. The makefile is fine because after editing out MKL and using gfortran it works. Can anybody help? Have I not done something, I should have done? Thanks
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
You're starting make under a new shell. Apparently, you haven't sourced ifortvars.sh either in the shell startup script or in the Makefile. Not that we could recommend running make as root, or could have guessed you were doing this. Except that you have confirmed a suspicion which Ron mentioned.
Exactly as Tim says. Once you type 'sudo' you start a new root shell and lose all your environment settings. You have to source iforvars from this sudo shell. Here's a workaround if you insist on using a sudo root shell to make your application:
sudo bash
source /opt/intel/..../ifortvars.sh intel64
make all
exit
Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intelnoob
I need ifort to compile a program which requires MKL. I've downloaded it, intalled it, and done the ifortvars.sh thing everytime I open the bash terminal. However when I try to make my program I just get this error
cpp -P -traditional-cpp -Dsp ddprecision.f90
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
make: *** [ddprecision.mod] Error 127
When i type ifort and double tap tab the ifort comand appears to be there. The makefile is fine because after editing out MKL and using gfortran it works. Can anybody help? Have I not done something, I should have done? Thanks
cpp -P -traditional-cpp -Dsp ddprecision.f90
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
make: *** [ddprecision.mod] Error 127
When i type ifort and double tap tab the ifort comand appears to be there. The makefile is fine because after editing out MKL and using gfortran it works. Can anybody help? Have I not done something, I should have done? Thanks
Just to be sure, when you said you 'did the ifortvars.sh thing', you did do:
source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh intel64
and
echo $0
does return
-bash
right? If so, try putting that source command inside your ~/.bashrc file
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
never mind but a silly query: do your ifort is in path?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald W. Green (Intel)
Just to be sure, when you said you 'did the ifortvars.sh thing', you did do:
source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh intel64
and
echo $0
does return
-bash
right? If so, try putting that source command inside your ~/.bashrc file
ron
Sorry REALLY bad time for my harddrive to just pack in. Anyway I've installed everything again and I still have the same problem. I followed your instructions above (echo $0 did return bash) but the same thing keeps happening
make: ifort: Command not found
This is really puzzling because the command seems to be there in bash but as soon as I try to use it says it can't be found. Any help would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intelnoob
Sorry REALLY bad time for my harddrive to just pack in. Anyway I've installed everything again and I still have the same problem. I followed your instructions above (echo $0 did return bash) but the same thing keeps happening
make: ifort: Command not found
This is really puzzling because the command seems to be there in bash but as soon as I try to use it says it can't be found. Any help would be greatly appreciated.
How are you building the code, with a simple make command? ie 'make all' or some such thing? Or do you wrap up the build inside a script file of some sort?
Show us your Makefile. And cut and paste your session from the time you type 'make' until the thing aborts and returns to the command prompt.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald W. Green (Intel)
How are you building the code, with a simple make command? ie 'make all' or some such thing? Or do you wrap up the build inside a script file of some sort?
Show us your Makefile. And cut and paste your session from the time you type 'make' until the thing aborts and returns to the command prompt.
ron
@Ubuntu:~/Desktop/ddscat7.2.0.7/src$ sudo make all
[sudo] password for :
cpp -P -traditional-cpp -Dsp ddprecision.f90
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
make: *** [ddprecision.mod] Error 127
@Ubuntu:~/Desktop/ddscat7.2.0.7/src$
Thanks again for any assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intelnoob
@Ubuntu:~/Desktop/ddscat7.2.0.7/src$ sudo make all
[sudo] password for :
cpp -P -traditional-cpp -Dsp ddprecision.f90
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
[sudo] password for :
cpp -P -traditional-cpp -Dsp ddprecision.f90
ddprecision_cpp.f90
ifort -c -O2 ddprecision_cpp.f90 -o ddprecision.o
make: ifort: Command not found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
You're starting make under a new shell. Apparently, you haven't sourced ifortvars.sh either in the shell startup script or in the Makefile. Not that we could recommend running make as root, or could have guessed you were doing this. Except that you have confirmed a suspicion which Ron mentioned.
Exactly as Tim says. Once you type 'sudo' you start a new root shell and lose all your environment settings. You have to source iforvars from this sudo shell. Here's a workaround if you insist on using a sudo root shell to make your application:
sudo bash
source /opt/intel/..../ifortvars.sh intel64
make all
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald W. Green (Intel)
Exactly as Tim says. Once you type 'sudo' you start a new root shell and lose all your environment settings. You have to source iforvars from this sudo shell. Here's a workaround if you insist on using a sudo root shell to make your application:
sudo bash
source /opt/intel/..../if
ortvars.sh intel64
make all
exit
Thanks Tim and Ron, that worked a treat. I was using sudo because something was being refused permission and sudo is the only way I know to fix that. I hate compiling anything. Why they can't just offer this program precompiled I have no idea, the damned thing is standalone and is only 0.5MB once compiled anyway. Thanks again, I can get some work done now once I master getting it to work with MKL, MPI and openMP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intelnoob
Thanks Tim and Ron, that worked a treat. I was using sudo because something was being refused permission and sudo is the only way I know to fix that. I hate compiling anything. Why they can't just offer this program precompiled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Some people think open software, with provided source, is an advantage. If it has a public license, provision of source is mandatory, and allows the user to run on various architectures. It's a big job to build and test 6 or more builds such as ifort does. Usually, if the build has a final install step which requires root privilege, that is a separate step 'make install' so you would run make without root privilege, then complete make install under sudo. You would have to change ownership of all the files in the build back to yourself if you wished to switch back to building that way.
I didn't know the provision of source was mandatory, learn't something new there. I would very much be of the opinion that if the makers can't build the program it doesn't leave much hope for anyone else. I presume (and hope) that any code has been compiled with all it's options by the builders first. Hence, can they not make the executable available to us mere plebs of the computing world to just download and use. I get your point about the installing part though. Thanks again for your help. I guess I just click the question answered to close the thread.

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