1

I have installed OpenMPI via MacPorts on my OSX system (running Version 10.8.3). I found the C wrapper compiler in /opt/local/lib/openmpi/bin/mpicc, and

/opt/local/lib/openmpi/bin/mpicc test.c

compiles normally. Following the ideas in this post, I issued the following command

PATH=$PATH:~/opt/local/lib/openmpi/bin

which I thought would allow me to compile with

mpicc test.c

However, this gives the following error:

-bash: mpicc: command not found

What have I done wrong?

4

1 回答 1

1

Just kidding: I should've used

PATH=$PATH:/opt/local/lib/openmpi/bin

rather than

PATH=$PATH:~/opt/local/lib/openmpi/bin
于 2013-03-30T20:33:41.683 回答