I'm running scientific simulation software (lammps) and whenever I try to submit the job by using a shell script which contains...

mpirun -np 2 /Users/mustafaaslamy/Downloads/lammps-16Mar18/src/lmp_serial -in in.airebo

...it throws the error of mpirun:command not found.

How do I resolve this?

I'm using a MacBook Air (early 2014), processor 1.4 GHz Intel Core i5, software OS X 10.9.5 (13F34).

  • Command not found means it can't find the software you're trying to run. I don't think you're going to find anyone who wants to search the Internet for mpirun, and what it is/does, you need to state what program it is, how/if you installed it and what response you got from the developer of this software.
    – Allan
    May 23, 2018 at 21:18
  • the program is lammps and im using linux to compile the software but in order to run certain shell commands i need to download an open mpi for mac but im not sure what version??? May 24, 2018 at 5:38
  • Ok...I hear you, but that doesn't change the fact that "command not found" means it can't find the command/program you're trying to run. We still don't know how or if you even installed it. Secondly, with that clarification, I can't see this as on topic - maybe Super User or Unix & Linux(unix.stackexchange.com) would be better sites?
    – Allan
    May 24, 2018 at 12:02
  • Install home-brew (see brew.sh) and write brew install open-mpi in the Terminal. Apr 1, 2020 at 17:43

1 Answer 1


You are trying to use a program but the Mac does not find the program. It's probably because it's not installed. The program you are trying to use is called Open MPI, here is how to install it: https://intothewave.wordpress.com/2011/12/27/install-open-mpi-on-mac-os-x/

After installing it you will be able to use the mpirun command. Because Open MPI isn't an Apple product, I recommend you to go to stackoverflow.com if you have questions regarding Open MPI.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .