Compiling Quantum ESPRESSO for parallel execution on Mac OS X
Channel: Phys Whiz
Date: 2019-08-03

in this tutorial I explain how to compile the latest version of Quantum ESPRESSO 6.4.1 on a Macbook or iMac running Mac OS X Mojave.

Firstly you need Gfortran or any other Fortran compiler to compile QE. 

Then you need Open MPI to compile QE for parallel  execution. 

We can install both gfortran and open-mpi using Homebrew (https://brew.sh).

First check if Homebrew is installed using the command in the terminal: 
brew --version

If it doesn't return anything then install Homebrew by typing the following command in the terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once homebrew is installed, you can install fortran using the command:
brew install gcc

and install open-mpi using the command:
brew install open-mpi

After, that download the latest Quantum ESPRESSO release package from the following link: https://github.com/QEF/q-e/releases

Extract the contents and in your terminal go to the directory where the extracted contents of QE are.

Once there, give the command :
./configure

This should run smoothly and at the end say that the parallel environment was detected successfully.

Now you can compile various packages of QE using the commands"
make pw, make pp, etc.

Or compile everything at once using:
make all

This would take a lot of time.

Once compiled you can run a sample scf calculation by downloading the sample scf.in input file and pseudo potentials from here:

To run the calculation, go to the directory where you have the scf input file and pseudo potentials in the terminal.

Once there, give the command:
mpirun -np 4 /address/on/your/machine/of/pw.x - inp scf.in

Hope you find it useful!

Follow me on:
FB Page: https://facebook.com/bragitoff/
FB Profile: https://facebook.com/ducktape07/
FB Page2: https://facebook.com/physwhizforum/

IG: https://instagram.com/___physwhiz___/
IG2: https://instagram.com/ducktape07/

BLOG: http://bragitoff.com

FORUM: http://physwhiz.bragitoff.com

ANDROID APPS:
CrysX: https://www.bragitoff.com/crysx/

Others: https://play.google.com/store/apps/developer?id=Manas+Sharma