-
Notifications
You must be signed in to change notification settings - Fork 637
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
fix failing tests for GitHub Actions CI #1608
Conversation
According to the CI logs, there is a segmentation fault occurring for meep/.github/workflows/build-ci.yml Line 40 in f528873
The fix likely involves installing MPB from source following a similar procedure to the one outlined in the user manual for Ubuntu 18.04. |
To keep the worfklow readable, we could set up a separate build process for MPB. |
…e when building Meep
7552b5e
to
a96dae3
Compare
Seems to be finally working. All unit tests for C++ and Python (3.6 and 3.9) for serial and MPI builds are passing. The unit tests are all executed as part of |
echo "HDF5_SERIAL_CPPFLAGS=${HDF5_BASE_CPPFLAGS}/serial" >> $GITHUB_ENV | ||
echo "HDF5_PARALLEL_CPPFLAGS=${HDF5_BASE_CPPFLAGS}/openmpi" >> $GITHUB_ENV | ||
echo "HDF5_SERIAL_LDFLAGS=${HDF5_BASE_LDFLAGS}/serial" >> $GITHUB_ENV | ||
echo "HDF5_PARALLEL_LDFLAGS=${HDF5_BASE_LDFLAGS}/openmpi" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can update-alternatives
in conjunction with pkg-config
not be used here?
(cd libctl-src && git checkout master && sh autogen.sh --prefix=${HOME}/local --enable-shared && make -j 2 && make install) | ||
git clone https://github.com/NanoComp/harminv.git | ||
(cd harminv && git checkout master && sh autogen.sh --prefix=${HOME}/local --enable-shared && make -j 2 && make install) | ||
git clone https://github.com/NanoComp/mpb.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider the checkout action instead of cloning the full repo:
https://github.com/actions/checkout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also just do a git clone --depth 1
(shallow clone).
git clone https://github.com/HomerReid/libGDSII.git | ||
(cd libGDSII && git checkout master && sh autogen.sh --prefix=${HOME}/local && make install) | ||
|
||
- name: Define environment variables for serial build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-j$(nproc) seems better than hardcoding
python-version: "3.6" | ||
- name-prefix: "Python 3.9 with MPI" | ||
enable-mpi: true | ||
configure-options: "--with-mpi" | ||
python-version: "3.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a true Cartesian product of MPI x Python version, you don't have to rely on include
to build the four cases manually: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
Merging now since it is urgent to get CI working on other PRs, and this is in working state. Please open a separate PR with additional cleanups. |
* fix failing tests for GitHub Actions CI * reduce tolerances for python/tests/test_mode_coeffs.py * install libctl and MPB from source and use autogen.sh rather configure when building Meep * run autogen.sh for libGDSII source repository * add back libtool to common dependencies * revamp matrix to include C++ and Python tests for serial and MPI * use env context when defining environment variables in workflow file * leave a space between curly brackets of workflow variables * create workflow environment variables and explicitly define /home/oskooi directory * define environment variables using an environment file for correct parsing * escape double quotes to preserve spaces * install dependencies before defining environment variables * define GEN_CTL_IO env variable before building libctl from source * separate step for mpi4py install * fix configure option for Meep related to MPI * replace out-of-tree with in-tree build * run Python tests as a separate step and output logs at the end * remove misplaced - from run lines in Output logs * revert python/tests/test_mode_coeffs.py * remove output logs step
Initial attempt to eventually get all unit tests of the
make check
suite to pass on GitHub Actions CI (which was recently set up in #1596).