Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psydac on fedora:latest, import problem #323

Closed
spossann opened this issue Jul 20, 2023 · 9 comments
Closed

Psydac on fedora:latest, import problem #323

spossann opened this issue Jul 20, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@spossann
Copy link
Collaborator

spossann commented Jul 20, 2023

I am trying to run Psydac on the latest Fedora docker image, which uses Python 3.11 by default. Here is the image I use:

FROM fedora:latest

# install linux packages 
RUN dnf install -y python3-pip \
    && dnf install -y gcc \
    && dnf install -y gfortran \ 
    && dnf install -y blas-devel lapack-devel \ 
    && dnf install -y openmpi openmpi-devel \
    && dnf install -y libgomp \
    && dnf install -y git \
    && dnf install -y environment-modules \
    && dnf install -y python3-mpi4py-openmpi \
    && dnf install -y python3-devel \
    && dnf install -y python3.10 \
    && dnf install -y python3.10-devel 

After launching a container like

docker run -it  fedora_img

I first run

[...]# . /etc/profile.d/modules.sh && module load mpi/openmpi-$(arch) && module list

to import the mpi module. After cloning the repo, the installation from devel works fine. However, when launching Python and trying to import, I get (note that the numpy import works, I tested also several other imports, such as struphy):

[...]# python3
Python 3.11.4 (main, Jun  7 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import psydac
dd1baa5f5873:pid267.python3: Failed to get eth0 (unit 0) cpu set
dd1baa5f5873:pid267: PSM3 can't open nic unit: 0 (err=23)
PMIx Log Report:[267]: (nic/PSM)[267]: PSM3 can't open nic unit: 0 (err=23)
dd1baa5f5873:pid267.python3: Failed to get eth0 (unit 0) cpu set
dd1baa5f5873:pid267: PSM3 can't open nic unit: 0 (err=23)
PMIx Log Report:[267]: (nic/PSM)[267]: PSM3 can't open nic unit: 0 (err=23)

I have tried also a virtual environment (even launched with python3.10 -m venv env), but get the same errors.

@spossann spossann added the bug Something isn't working label Jul 20, 2023
@yguclu
Copy link
Member

yguclu commented Jul 20, 2023

I have never seen an error like this before! 😅 For what it's worth, my intuition suggests that this is an MPI problem. Have you tried to import mpi4py?

@spossann
Copy link
Collaborator Author

import mpi4py works.

@yguclu
Copy link
Member

yguclu commented Jul 24, 2023

Nice that the import of mpi4py works. Have you tried to use it together with mpirun? At a minimum you should write from mpi4py import MPI, and try some basic instructions (e.g. having each process write their MPI rank to the terminal, in order).

@yguclu
Copy link
Member

yguclu commented Sep 20, 2023

@spossann Do you have any updates on this issue?

@spossann
Copy link
Collaborator Author

spossann commented Oct 9, 2023

I have created an issue on this in the fedora-image Github page. Let's see.

@spossann
Copy link
Collaborator Author

spossann commented Oct 9, 2023

import mpi4py works.

However, from mpi4py import MPI leads to the mentioned crash.

@richardvanderburgh
Copy link

Adding these environment variables seemed to resolve this issue for me.
OMPI_MCA_pml=ob1
OMPI_MCA_btl=tcp,self

@yguclu
Copy link
Member

yguclu commented Jan 11, 2024

@spossann Have you tried the suggestion posted above?

@spossann
Copy link
Collaborator Author

@spossann Have you tried the suggestion posted above?

@richardvanderburgh used this in his testing branch and the job for the Fedora_38 test passed. Here are the job commands.

@yguclu yguclu closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants