PMI2 initialization failure

Issue #31 resolved
derekmacklin created an issue

I've just installed petsc and petsc4py on a cluster.

When, in an interactive session on a compute node, I run:

$ python -c "import petsc4py; petsc4py.init()"

I get the error message:

--------------------------------------------------------------------------
PMI2 failed to initialize, returning an error code of 14.
We cannot use PMI2 at this time, and your job will
likely abort.
--------------------------------------------------------------------------

As an aside, the system's /etc/slurm/slurm.conf does have the setting "MpiDefault=pmi2".

Not sure how to fix this--any advice? Can I initialize petsc4py without mpi (though I'd like to use mpi going forward)?

I'm happy to provide more output as needed.

Comments (3)

  1. derekmacklin reporter

    Upon further digging, this appears to be related to mpi4py:

    $ python -c "from mpi4py import MPI"
    
    --------------------------------------------------------------------------
    PMI2 failed to initialize, returning an error code of 14.
    We cannot use PMI2 at this time, and your job will
    likely abort.
    --------------------------------------------------------------------------
    
  2. derekmacklin reporter

    The fix: on the cluster I'm using apparently I just need to call:

    mpirun python -c "import petsc4py; petsc4py.init()"
    
  3. Log in to comment