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?

1 Answer 1

1

Just kidding: I should've used

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

rather than

PATH=$PATH:~/opt/local/lib/openmpi/bin
Sign up to request clarification or add additional context in comments.

2 Comments

This resets for me every time I close the terminal, is there a more permanent solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.