diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0e8d7d625..7853b3007 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -8,7 +8,7 @@ concurrency: jobs: build_gcc: - name: GCC w/ MPI + name: GCC w/ MPI w/ Python runs-on: ubuntu-20.04 if: github.event.pull_request.draft == false env: @@ -39,8 +39,10 @@ jobs: run: | cmake -S . -B build \ -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DImpactX_PYTHON=ON cmake --build build -j 2 + cmake --build build --target pip_install - name: run ImpactX run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index b2e53aa44..76e9c5ba4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -385,8 +385,13 @@ if(ImpactX_PYTHON) ) # this will also upgrade/downgrade dependencies, e.g., when the version of numpy changes + if(ImpactX_MPI) + set(pyImpactX_REQUIREMENT_FILE "requirements_mpi.txt") + else() + set(pyImpactX_REQUIREMENT_FILE "requirements.txt") + endif() add_custom_target(${ImpactX_CUSTOM_TARGET_PREFIX}pip_install_requirements - ${Python_EXECUTABLE} -m pip install ${PYINSTALLOPTIONS} -r "${ImpactX_SOURCE_DIR}/requirements.txt" + ${Python_EXECUTABLE} -m pip install ${PYINSTALLOPTIONS} -r "${ImpactX_SOURCE_DIR}/${pyImpactX_REQUIREMENT_FILE}" WORKING_DIRECTORY ${ImpactX_BINARY_DIR} ) diff --git a/requirements_mpi.txt b/requirements_mpi.txt new file mode 100644 index 000000000..c444bff9b --- /dev/null +++ b/requirements_mpi.txt @@ -0,0 +1,2 @@ +-r requirements.txt +mpi4py>=2.1.0