LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2011, 02:40 PM   #1
Ztif
LQ Newbie
 
Registered: Jun 2011
Posts: 3

Rep: Reputation: Disabled
Compiling another program with mpicc using a non default compiler


I am trying to compile a program with mpicc. To compile I use:
CC=/usr/bin/mpicc ./configure

However mpicc's default C compiler is gcc 4.4.2 and I need to use 4.0.0 which I have installed in another directory. I do not (nor can get) root privileges so I cannot edit mpicc's default compiler. Is there an option I can set while configuring?

Thanks
 
Old 07-02-2011, 08:33 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
If you are using mpich, you should be able to use -cc=name on the command line or the environment variable MPICH_CC to select a different compiler. If using OpenMPI, setting the environment variable OMPI_CC should select a different compiler. However, gcc-4.4.2 was probably the compiler MPI was built with and using a different compiler can cause problems.
 
Old 07-06-2011, 09:07 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Suggest : Build a new locale openmpi, mpicc, with your local gcc-4.0 :

Something like :
cd openmpi(-1.4.3)/ && ./configure CC=gcc-4.0 CXX=g++-4.0 --prefix=/home/Ztif


..

Last edited by knudfl; 07-06-2011 at 09:09 AM.
 
  


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
cannot find mpicc libraries KBriggs Linux - Software 4 01-06-2011 01:01 PM
checking for C compiler default output... configure: error: C compiler cannot create clubbing80s Linux - Software 3 07-05-2010 09:17 PM
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
mpicc: command not found ArthurHuang Programming 1 08-05-2006 05:51 PM
qmake with non-default compiler werewolfolondon Linux - Software 0 02-21-2005 12:14 AM


All times are GMT -5. The time now is 06:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration