LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2009, 05:22 PM   #1
tak.rliu
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Rep: Reputation: 0
Bash: source commands.


I just installed openSUSE 11.1; not that it's relevant.

But I also installed the Intel Compilers, c++, fortran and openMPI...

The problem is, when I type the commands to invoke them such as; icc, ifort, mpirun

bash : command not found

I have to manually source to the .sh file in order to use the commands.

like.

source /opt/intel/cce/10.0.024/bin/iccvars.sh

in order to invoke the command "icc" at the command prompt.

I think it's pretty obvious what my question is going to be: how do I automatically source these commands on boot?
 
Old 01-30-2009, 05:30 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Just copy iccvars.sh and ifortvars.sh into /etc/profile.d. Take in mind that all the shell scripts into /etc/profile.d are sourced every time you login, hence this is one of the most useful ways to automate this task for many applications.

The same for mpivars.sh. If you installed openmpi from the RPM package, you should find it under /usr/lib/mpi/gcc/openmpi/bin/.

Last edited by colucix; 01-30-2009 at 05:38 PM.
 
Old 01-30-2009, 05:53 PM   #3
kap4lin
LQ Newbie
 
Registered: Jan 2009
Posts: 10

Rep: Reputation: 0
Strictly speaking, I assume, icc is not needed at boot time, but rather you need it inside a shell. So, since you are using bash, you could as well put this in your ~/.bash_profile.
Quote:
Originally Posted by tak.rliu View Post
source /opt/intel/cce/10.0.024/bin/iccvars.sh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help with bash commands panicfire Linux - Newbie 6 05-25-2008 06:27 PM
Few commands in bash c4nk Linux - General 10 12-18-2006 02:19 AM
bash commands davatar Slackware 2 04-06-2005 03:05 AM
Bash commands PhuckFonix Linux - Newbie 2 03-30-2004 07:13 PM
Bash commands wprescott Linux - Distributions 6 04-27-2002 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration