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

(WIP) update centos7 installer #1110

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

d-a-v
Copy link
Contributor

@d-a-v d-a-v commented Jan 28, 2020

update:

The below error, shown after installing on centos7 using the contributed installer, shown by #1140,
is solved in this pull request. It also adds

  • installer for ubuntu 16.04
  • docker image (ubuntu 18.04)
  • docker image (centos 7)

was:

The change in python/meep.i provides a detailed error message that allows to find out causes of installation issues:

**
** failed to load python MPI module (mpi4py)
** /usr/local/lib64/python3.6/site-packages/mpi4py/MPI.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ompi_mpi_logical8 
**

as compared to previously:

**
** failed to load python MPI module (mpi4py)
**

The updated installer builds a working version of meep inside a bare centos:7 docker image.
The above error is solved by using LD_PRELOAD system environment variable.

@d-a-v d-a-v changed the title improve mpi4py error message and update centos7 installer (WIP) improve mpi4py error message and update centos7 installer Jan 29, 2020
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib64/python3.6/site-packages
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib64/python3.6/site-packages/mpi4py
export LD_LIBRARY_PATH=${DESTDIR}/lib64:/usr/lib64/openmpi/lib:/usr/local/lib64/python3.6/site-packages/mpi4py/lib-pmpi:/usr/local/lib64/python3.6/site-packages/mpi4py
export LD_PRELOAD=/usr/lib64/openmpi/lib/libmpi.so
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is preloading needed?

Copy link
Contributor Author

@d-a-v d-a-v Mar 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is preloading needed?

I don't know the reason TBH but I can show the effect of not using it with centos 7.

If I'm missing something I don't know yet where. This is not needed for ubuntu.

[root@771c413e32e4 /]# python3 /tmp/test-meep.py 

**
** failed to load python MPI module (mpi4py)
** /usr/local/lib64/python3.6/site-packages/mpi4py/MPI.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ompi_mpi_logical8 
**

Vector3<16.0, 8.0, 0.0>

Elapsed run time = 0.0002 s
[root@771c413e32e4 /]# export LD_PRELOAD=/usr/lib64/openmpi/lib/libmpi.so
[root@771c413e32e4 /]# python3 /tmp/test-meep.py 
Using MPI version 3.0, 1 processes
Vector3<16.0, 8.0, 0.0>

Elapsed run time = 0.0002 s
[root@771c413e32e4 /]# 

(It is a docker build <= me trying to explain 'root' :)

edit: details of this error message is visible thanks to #1140 (already applied in this PR)

contrib/build-meep.sh Outdated Show resolved Hide resolved
contrib/build-meep.sh Outdated Show resolved Hide resolved
python/meep.i Outdated Show resolved Hide resolved
@d-a-v d-a-v changed the title (WIP) improve mpi4py error message and update centos7 installer (WIP) update centos7 installer Apr 14, 2020
@d-a-v
Copy link
Contributor Author

d-a-v commented May 13, 2020

My conclusion on this script is that it is easier to install everything in a docker environment (same OS and same destination directory as with native host), then copy the installed directories to the final host.
That was the only way I found really working without threat.
Otherwise libraries / binaries can be linked with several equivalent libraries at the same time. For example I saw openblas and atlas linked in libmpb.so even though --with-blas=openblas was passed to configure. It cannot happen when using the optional docker option for building.

I am opened to comments. This script was initially proposed to help meep users as it helped me to install meep for my users. Maintainers may have a different vision on how to build meep. I am OK if this appears too difficult to maintain in this repository, and removed, or if it should be improved in some way.

Note that I still have no answer about the bizarre need for LD_PRELOAD in the complex python interaction with all the dependencies on CentOS. I would be happy to get rid of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants