LinuxQuestions.org
Help answer threads with 0 replies.
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 01-17-2013, 01:59 AM   #1
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Rep: Reputation: Disabled
problem getting started with mpicc


I am new to mpicc compiler and i have installed using
"yum install openmpi openmpi-devel"
but when i am trying to compile my code with command
"mpicc -o hello hello.c"
it says mpicc command not found
please help me getting started with mpi.
Thanks.
 
Old 01-17-2013, 02:07 AM   #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
The mpicc command (actually it is a link to opal_wrapper) doesn't reside in a standard directory and for this reason it's not included in your PATH. You have to add the directory to your PATH, e.g.
Code:
export PATH=/usr/lib64/openmpi/bin:$PATH
or give the full path on the command line:
Code:
/usr/lib64/openmpi/bin/mpicc -o hello hello.c
Hope this helps.
 
Old 01-17-2013, 02:12 AM   #3
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
@coluxic :
I added the path too but its still not working for me.
 
Old 01-17-2013, 02:17 AM   #4
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
Mine was only an example, your path might be different. Please verify it by
Code:
rpm -ql openmpi-devel | grep 'bin/mpicc$'
which OS are you running on, anyway?
 
Old 01-17-2013, 02:29 AM   #5
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
The full PATH can be used too, like this example :


/usr/lib/openmpi/bin/mpicc -o hello hello.c
 
Old 01-17-2013, 05:04 AM   #6
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
I am using fedora 17
 
Old 01-17-2013, 05:15 AM   #7
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
Ok. And what is the output of the previously suggested command?
Code:
rpm -ql openmpi-devel | grep 'bin/mpicc$'
 
Old 01-17-2013, 05:39 AM   #8
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
Nothing shown up by the command "rpm -ql openmpi-devel | grep 'bin/mpicc$'"
But the problem is resolved as suggested in the tutorial site (suggested me install "mpich2")
site "http://www.mpitutorial.com/installing-mpich2/"

Last edited by jayeshsharma52; 01-17-2013 at 05:42 AM.
 
  


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
mpicc command not found with openmpi Aqua_Regia Linux - Software 12 10-28-2011 09:27 AM
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

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

All times are GMT -5. The time now is 12:18 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