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

Add mapping tester reference results #212

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions .github/workflows/aste_ci_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Setup system
run: |
brew update
brew install cmake eigen boost openmpi pkg-config ninja gnu-time vtk
brew install cmake eigen boost openmpi pkg-config ninja gnu-time vtk metis
- name: Install preCICE
run: |
git clone https://github.com/precice/precice.git
cd precice
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
cmake --preset=production \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DPRECICE_FEATURE_MPI_COMMUNICATION=ON \
-DPRECICE_FEATURE_PETSC_MAPPING=OFF \
-DPRECICE_FEATURE_PYTHON_ACTIONS=OFF \
Expand Down Expand Up @@ -71,3 +71,9 @@ jobs:
run: |
source ${{ env.VIRTUAL_ENV }}/bin/activate
ctest
- name: Sanity
if: always()
uses: actions/upload-artifact@v4
with:
name: SerialCase
path: examples/mapping_tester_serial/case/
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ add_test(NAME read_write_test COMMAND test-precice-aste WORKING_DIRECTORY "${CM

# Detect and register examples as tests

set(_examples lci_2d lci_3d nn nng_scalar nng_vector mapping_tester replay_mode)
set(_examples lci_2d lci_3d nn nng_scalar nng_vector mapping_tester mapping_tester_serial replay_mode)

foreach(example IN LISTS _examples)
add_test(NAME aste.example.${example}.setup
Expand Down
2 changes: 2 additions & 0 deletions changelog-entries/212.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Changed metis partitioning to use a fixed seed, making it deterministic
- Changed mapping tester to use metis partitioning by default
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The python tools require
- sympy (optional)
- jinja2 (optional)
- scipy (optional)
- polars (optional)

which can be installed directly using pip and the `requirements.txt` file in the repository

Expand Down
3 changes: 3 additions & 0 deletions examples/mapping_tester/reference-statistics.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
count,abs_min,abs_max,signed_min:,signed_max,median(abs),relative-l2,99th percentile(abs),95th percentile(abs),90th percentile(abs),mapping,constraint,mesh A,mesh B,ranks A,ranks B,globalTime,mapDataTime,initializeTime,computeMappingTime,peakMemA,peakMemB
3458,0.0,0.30692922919422094,-0.30692922919422094,0.24061844202860838,0.04128682075571033,0.07155821185793043,0.19914987149239097,0.14571976813321605,0.12332753716546282,nn,consistent,coarse_mesh,fine_mesh,2,2,426799.0,152.0,247645.0,77724.0,115100.0,122380.0
3458,1.9984014443252818e-15,0.015823902672544188,-0.015823902672544188,0.015021340046327936,0.00040468910963686877,0.0025420451904765258,0.011347271673681693,0.0059278315196862165,0.0037941465905990636,tps,consistent,coarse_mesh,fine_mesh,2,2,999330.0,9689.0,811718.0,4203.0,116504.0,133780.0
2 changes: 2 additions & 0 deletions examples/mapping_tester/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ cd "${TEST_LOCATION}"

# Gather the generated statistics
python3 "${MAPPING_TESTER}"/gatherstats.py --outdir "${TEST_CASE_LOCATION}" --file test-statistics.csv

python3 "${MAPPING_TESTER}"/compare.py reference-statistics.csv test-statistics.csv
4 changes: 2 additions & 2 deletions examples/mapping_tester/setup-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"executor": "cpu",
"executor-options": ""
},
"np": {
"kind": "nearest-projection"
"nn": {
"kind": "nearest-neighbor"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions examples/mapping_tester_serial/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
case/
test-statistics.csv
4 changes: 4 additions & 0 deletions examples/mapping_tester_serial/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

rm -f test-statistics.csv
rm -fr ./case/
Loading
Loading