Repast/repast4py

docs: installation should mention usage of openmpi instead?

Opened this issue · 3 comments

I could not get repast4py working with mpich and libmpich-dev installed only.
See here: mpi4py/mpi4py#335 (comment) for more information.

I could build repast4py using pip though when having libopenmpi-dev and openmpi-bin installed.

conda create -n repast python=3.10
conda activate repast
rm $(dirname $(which python))/../compiler_compat/ld
env CC=mpicxx pip install repast4py worked.

So the docs should maybe switch to openmpi instead? :)

Tested on
Linux 6.7.12
Debian 12
conda 24.5.0

➜  ~ mpicc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14) 

A comment related to this post: I have problems with running repast4py with python 3.10.14 on Ubuntu 22.04 (kernel 6.5.0-45) with both the global approach installing mpich (sudo apt install ...) and using an anaconda (v.2.6.2) environment applying the default mpich-mpicxx (v.4.2.2). It catches an undefined symbol: MPI_Allgather error when running the Walker-example. Strangely, when first applying mpich only and next adding mpich-mpicxx works and run the Walker-example without the above error.

Setting up with python 3.9.19 and adding mpich-mpicxx (v.4.2.2) directly (installs mpich) and then installing repast4py worked fine. No errors running the Walker example in this setting.

As a newbe using repast4py I would like the installation instructions to cover protected environment installs like anaconda. I did not find any help on the error above, so this became a trial-and-error search.

Any way, thanks for your contributions, I am looking forward to exploring repast4py!

Thanks for the report. I think the issue here is that anaconda typically installs its own MPI when installing mpi4py via conda, and that leads to various library dependency and loading issues. I have some notes about how to avoid this when using anaconda. I'll try to integrate these into the install docs.

Using the info in the comments above experiment with different install configurations and update install docs appropriately.