Re: [mpich-discuss] using alternate mpi on osx from xcode
Re: [mpich-discuss] using alternate mpi on osx from xcode
- Subject: Re: [mpich-discuss] using alternate mpi on osx from xcode
- From: "Eric A. Borisch" <email@hidden>
- Date: Fri, 23 Jan 2009 10:46:59 -0600
[I usually avoid cross-posting, but this _is_ relevant to both lists,
so I'm replying to both.]
Your which mpicxx in the terminal is probably picking up a modified
PATH from your .bash_rc [...] file. XCode doesn't have this modified
path, so it's not finding your desired mpicxx.
There are two ways to change this:
1) Change your execution environment for all processes launched by
your user. This is set in ~/.MacOSX/environment.plist -- See
http://developer.apple.com/qa/qa2001/qa1067.html for more info. You'll
need to log out and log back in to see changes. You'll probably want
to make sure (if you set a custom PATH here) that you include
/usr/bin:/bin and potentially in the listing...
2) Change the environment within XCode for this build. Double-click on
your target in XCODE. In the build settings, add a new variable called
PATH and set it to something like /yourmpichinstall/bin:$(PATH)
Either one should do the trick; I prefer #2 as it is less global, but
#1 may be what you want just want to change it in one place.
This way you can user the mpicc/mpicxx wrapper scripts from your
makefiles the way they were intended to be used. No "hiding" of
various things required.
Eric
On Thu, Jan 8, 2009 at 4:45 PM, wrote:
>
> Hello,
>
> I'm building a test app via makefile on osx that uses mpich2 (which I compiled from source and whose binaries end up in /usr/local/bin).
>
> It is a trivial mpi app and builds via this trivial makefile:
>
> test : main.cpp
> mpicxx -g main.cpp -o testmpi
>
> From a terminal window, I can make and execute it with the expected results, with one or multiple processes.
>
> --
>
> If I create an "External Build System" project in Xcode and point to this makefile and try to build the target, XCode tries to use the mpicxx that is located in /Developer/usr/bin despite the fact that from a commad prompt, "which mpicxx" reports /usr/local/bin/mpicxx.
>
> So one can go to /Developer/usr/bin and mv all the mpi* binaries into mpi_hidden or some such, at which point Xcode will complain that it can't find mpicxx. So one can create a link from /Developer/usr/bin that references the mpich2 binary /usr/local/bin/mpicxx. Now things will build and work as desired.
>
> My question, then... What is the recommended practice to get Xcode to use the mpicxx I want without all this problematic moving around/hiding of binaries? One option would be to cleanly remove the openmpi that comes with osx; a better option would be a way to spec the path that Xcode will search for binaries, but I don't know how to do either.
>
> thanks,
> thomas blom,
> ut austin
--
Eric A. Borisch
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden