Psi4 Conda Environment MPI Init Error

Hello,

I hope you are doing well. I’ve been working on a python package that uses psi4 (called through ase) to run electronic structure calculations. Things were working well on my local machine; however, when I try to run on our cluster (the Rutgers Community Cluster, Amarel) I get an MPI Init error for some reason.

*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
*** and potentially your MPI job)

I can avoid this error by calling mpirun -np 1; however, this limits me to one core and ideally I would be able to use something like set_num_threads to 8 or so. When I do mpirun -np 8 instead, along with set_num_threads, the output seems to be suggesting that it is launching 8 independent copies rather than a single copy using 8 threads. Without the mpirun command, the program throws the error that I included above.

Even the example from the ase website for the psi4 calculator reproduces this error (on one thread). psi4 — ASE documentation


from ase.calculators.psi4 import Psi4
from ase.build import molecule
import numpy as np

atoms = molecule('H2O')

calc = Psi4(atoms = atoms,
method = 'b3lyp',
memory = '500MB',
basis = '6-311g_d_p_')

atoms.calc = calc
print(atoms.get_potential_energy())
print(atoms.get_forces())

I was wondering if anyone has experienced this before, and if anyone had a solution? Thank you!