LAMMPS on mac

Dear Michael,

I am also a LAMMPS-user on a Mac (10.6.8), and I use the attached makefile to make LAMMPS on my machine. This requires that you have installed Xcode (which I assume you have).
In general, it sounds like you should try to ask some local "expert" who has some knowledge about compiling and making software in a Unix-environment, because this seems to be where your problem mostly lies.

The attached makefile is nothing but the original Makefile.mac_mpi from the LAMMPS source code, but slightly modified so it works on my Mac. You should consider commenting out or edit the lines regarding FFTW, unless you have a FFTW library installed by the Fink package manager.

You should also, as Axel suggested, remove packages that you don't need that use external libraries. Examples of packages that use external libraries are gpu, meam and reax.

Try this: 1: put the attached Makefile.mac_mpi in your src/MAKE folder. 2: go to the /src folder. 3: from /src, type the following commands:
make clean-all
make no-all
make yes-standard
make no-gpu
make no-meam
make no-reax
make no-poems
make -j 2 mac_mpi (if you have a Mac with a dual-core processor. if not, just write make mac_mpi)

This should (hopefully) work. If it compiles nicely, you can run LAMMPS on multiple cores by running a command like:
mpirun -np 2 lmp_mac_mpi < in.example
where you should put the full path of the LAMMPS executable if running this command from another folder.

For instance, go to /examples/crack in the LAMMPS folder, and try to run this command (if the executable is still in the /src folder):
mpirun -np 2 ../../src/lmp_mac_mpi < in.crack

Good luck!

Sincerely,
Christer H. Ersland.

Makefile.mac_mpi (3.3 KB)