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

Update CI #168

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
platform: [ ubuntu-latest, macos-latest ]
mpilib: [null, mpich, openmpi]
plugins: [OFF, ON]
exclude:
- platform: macos-latest
mpilib: openmpi

# The type of runner that the job will run on
runs-on: ${{ matrix.platform }}
Expand Down Expand Up @@ -74,11 +77,12 @@ jobs:
sudo apt-get update
sudo apt-get install gfortran
sudo apt-get install valgrind
sudo apt-get install libsqlite3-dev

# Custom build Python with Valgrind compatibility
git clone https://github.com/python/cpython.git
cd cpython
git checkout v3.9.6
git checkout v3.12.8
./configure --with-pydebug --without-pymalloc --enable-shared --prefix /opt/debugpython
make OPT=-g
make install
Expand Down Expand Up @@ -116,7 +120,7 @@ jobs:
run: |
source env.source
sudo apt-get install python3-dev
sudo apt-get install libpython3.10-dev
sudo apt-get install libpython3.12-dev
python -m pip install --upgrade pip
[ ! "${{ matrix.mpilib }}" == "" ] && python -m pip install mpi4py
python -m pip install numpy
Expand Down Expand Up @@ -158,7 +162,12 @@ jobs:
if: matrix.platform == 'macos-latest' && matrix.mpilib == 'openmpi'
run: |
source env.source
brew install openmpi
brew install open-mpi@4
echo 'export OMPI_MCA_rmaps_base_oversubscribe=1' >> env.source
: # OpenMPI needs access to a temporary directory
mkdir -p ~/tempdir_${{ github.run_id }}
echo "export TMPDIR=~/tempdir_${{ github.run_id }}" >> env.source
echo 'ulimit -n 4096' >> env.source

- name: Create and activate a virtual environment (MacOS)
if: matrix.platform == 'macos-latest'
Expand Down
7 changes: 7 additions & 0 deletions MDI_Library/mdi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,17 @@
int exists_flag;
ret = file_exists( plugin_path, &exists_flag );
if ( ret != 0 ) {
free( plugin_path );
free( plugin_init_name );

Check warning on line 357 in MDI_Library/mdi_lib.c

View check run for this annotation

Codecov / codecov/patch

MDI_Library/mdi_lib.c#L356-L357

Added lines #L356 - L357 were not covered by tests
mdi_error("Error in library_load_init: file_exists failed");
return ret;
}
if ( exists_flag ) {

ret = mdi_debug("[MDI:library_load_init] Attempting to load a python plugin\n");
if ( ret != 0 ) {
free( plugin_path );
free( plugin_init_name );

Check warning on line 366 in MDI_Library/mdi_lib.c

View check run for this annotation

Codecov / codecov/patch

MDI_Library/mdi_lib.c#L365-L366

Added lines #L365 - L366 were not covered by tests
mdi_error("Error in library_load_init: mdi_debug failed");
return ret;
}
Expand All @@ -368,6 +372,8 @@
libd->shared_state->engine_language = MDI_LANGUAGE_PYTHON;
ret = python_plugin_init( plugin_name, plugin_path, mpi_comm_ptr, libd->shared_state, mode );
if ( ret != 0 ) {
free( plugin_path );
free( plugin_init_name );

Check warning on line 376 in MDI_Library/mdi_lib.c

View check run for this annotation

Codecov / codecov/patch

MDI_Library/mdi_lib.c#L375-L376

Added lines #L375 - L376 were not covered by tests
mdi_error("Error in python_plugin_init");
return -1;
}
Expand All @@ -382,6 +388,7 @@
if ( ! libd->plugin_handle ) {
// Unable to find the plugin library
free( plugin_path );
free( plugin_init_name );
mdi_error("Unable to open MDI plugin");
return -1;
}
Expand Down
12 changes: 11 additions & 1 deletion tests/valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@
fun:main
}

{
OMPI writev
Memcheck:Param
writev(vector[1])
fun:__writev
fun:writev
...
fun:start_thread
fun:clone
}

{
PMIX server fence cond
Memcheck:Cond
Expand Down Expand Up @@ -185,7 +196,6 @@
fun:_PyMem_RawMalloc
fun:PyObject_Malloc
...
fun:PyModule_ExecDef
}


Expand Down
Loading