LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-26-2011, 06:28 PM   #1
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Rep: Reputation: Disabled
mpicc command not found with openmpi


I installed openmpi.i686 using yum, but I can't use the 'mpicc' complier/wrapper.

Code:
[wcucluster.master@wcucluster ~]$ mpicc
bash: mpicc: command not found...
I've looked on their website but haven't found any useful information. Does this require some special configuration that yum doesn't do. What am I missing?

Last edited by Aqua_Regia; 10-26-2011 at 06:29 PM.
 
Old 10-26-2011, 06:44 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
'mpicc' is in the package 'openmpi-devel'.


You can list the installed files from a package with :
rpm -ql openmpi


'openmpi-devel' will provide /usr/lib/openmpi/1.4-gcc/bin/mpicc
... and 250 other files.

.
 
Old 10-26-2011, 06:57 PM   #3
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
Should I uninstall the openmpi package I installed with yum to avoid problems with the two packages or do I need both?
 
Old 10-26-2011, 07:14 PM   #4
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
Thanks for the help! I installed it using yum
Code:
yum install openmpi-devel.i686
had to search to find it.
 
Old 10-26-2011, 07:29 PM   #5
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
Ok I installed the package and found the directory but I can't get mpicc to run.

Code:
[wcucluster.master@wcucluster ~]$ cd /usr/lib/openmpi/bin
[wcucluster.master@wcucluster bin]$ ls
mpic++    mpiCC-vt   mpiexec    mpif90-vt   ompi-iof       ompi-server   orte-bootproxy.sh  orte-clean  orterun              otfconfig  otfprofile  vtCC   vtfilter
mpicc     mpic++-vt  mpif77     mpirun      ompi-probe     ompi-top      ortec++            orted       orte-top             otfdump    otfshrink   vtcxx  vtunify
mpiCC     mpicxx     mpif77-vt  ompi-clean  ompi-profiler  opal_wrapper  ortecc             orte-iof    orte_wrapper_script  otfinfo    vtc++       vtf77  vtunify-mpi
mpicc-vt  mpicxx-vt  mpif90     ompi_info   ompi-ps        opari         orteCC             orte-ps     otfaux               otfmerge   vtcc        vtf90  vtwrapper
[wcucluster.master@wcucluster bin]$ mpicc
mpicc: Command not found.
[wcucluster.master@wcucluster bin]$ mpicc -pc
mpicc: Command not found.
[wcucluster.master@wcucluster bin]$
 
Old 10-26-2011, 07:40 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Both packages are required.

Using mpicc: export PATH=/usr/lib/openmpi/bin/ && mpicc <etc. etc.>

EDIT : Should be : export PATH=$PATH:/usr/lib/openmpi/bin
See post # 9.

.

Last edited by knudfl; 10-27-2011 at 01:52 AM.
 
Old 10-26-2011, 07:52 PM   #7
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
Thanks for the help! I found it on yum
Code:
 yum install openmpi-devel.i686
 
Old 10-26-2011, 10:10 PM   #8
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
I tried issuing the command you posted to run mpicc and I recieved this error.

Code:
[wcucluster.master@wcucluster ~]$ bash
[wcucluster.master@wcucluster ~]$ export PATH=/usr/lib/openmpi/bin/ && mpicc
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
gcc in your PATH.

Note that this compiler was either specified at configure time or in
one of several possible environment variables.
--------------------------------------------------------------------------
 
Old 10-27-2011, 01:02 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
That export statement wipes out your previous value of PATH. What you want is to add the OpenMPI directory to the list of directories that's already there. So, it should be

Code:
export PATH=$PATH:/usr/lib/openmpi/bin
 
1 members found this post helpful.
Old 10-27-2011, 08:23 AM   #10
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
The command worked as far as I can tell, but when I went to run mpicc I received an error about gcc input files.


Code:
[wcucluster.master@wcucluster bin]$ bash
[wcucluster.master@wcucluster bin]$ export PATH=$PATH:/usr/lib/openmpi/bin
[wcucluster.master@wcucluster bin]$ mpicc
gcc: fatal error: no input files
compilation terminated.
 
Old 10-27-2011, 08:25 AM   #11
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Of course, you need to tell the compiler which files it should compile! Edit: Obviously, if you have a makefile for the software, you'll want to change the relevant line so that it calls mpicc (rather than gcc). Then, you can just run make as usual.

Last edited by Nylex; 10-27-2011 at 08:30 AM.
 
Old 10-27-2011, 10:39 AM   #12
Aqua_Regia
Member
 
Registered: Oct 2011
Posts: 37

Original Poster
Rep: Reputation: Disabled
Ok. Now I feel like a noob and I believe I screwed something up with mpicc which was working before because I could run

Code:
[wcucluster.master@wcucluster ~]$  mpicc --help
/home/wcucluster.master/override/mpicc: line 2: /lib/openmpi/bin/mpicc: No such file or directory
[wcucluster.master@wcucluster ~]$
and info about mpicc would be displayed. I was trying to implement this guys work around on the nwchem forum so I could compile nwchem-6.0 with mpicc instead of gcc. Here is the thread.

http://www.nwchem-sw.org/index.php/S..._compi....html

I added this: PATH=/home/wcucluster.master/override:$PATH to the .bashrc file which linked to a script in that directory called mpicc with the commands.
Code:
[wcucluster.master@wcucluster override]$ cat mpicc
#!/bin/bash
/lib/openmpi/bin/mpicc -pc $@
Any Idea what I did wrong? (I'm a windows junkie I need undo buttons!)
 
Old 10-28-2011, 09:27 AM   #13
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Aren't you missing "/usr" at the beginning of the line?
 
  


Reply



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
Compiling another program with mpicc using a non default compiler Ztif Linux - Newbie 2 07-06-2011 08:07 AM
cannot find mpicc libraries KBriggs Linux - Software 4 01-06-2011 12:01 PM
missing mpicc when installing lam-mpi package fatra2 Linux - Software 4 11-27-2009 03:12 PM
mpicc: command not found ArthurHuang Programming 1 08-05-2006 04:51 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM

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

All times are GMT -5. The time now is 10:14 AM.

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