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 Weak Scale Test #163

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Add Weak Scale Test #163

wants to merge 6 commits into from

Conversation

kursatyurt
Copy link
Collaborator

Main changes of this PR

This PR extends the mapping tester to a weak scaling test. New scripts are added.

The number of grid points can be specified using the Halton Mesh generator for each rank of participants A and B.
The memory usage and time for mapping vs the number of ranks can be plotted.
An example is also provided in the examples directory.

Author's checklist

  • I used the pre-commit hook and used pre-commit run --all to apply all available hooks.
  • I added a test to cover the proposed changes in our test suite.
  • I updated the documentation in docs/README.md.
  • I updated potential breaking changes in the tutorial precice/tutorials/aste-turbine.

@kursatyurt kursatyurt requested a review from davidscn December 12, 2022 16:13
Copy link
Member

@davidscn davidscn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the effort, the tester works as expected.

Our GH CI should work an pass by now, please rebase the changes here.

We need to add the small example test case ('weak_scaling_tester) here:

aste/CMakeLists.txt

Lines 102 to 119 in d698831

set(_examples lci_2d lci_3d nn nng_scalar nng_vector mapping_tester replay_mode)
foreach(example IN LISTS _examples)
add_test(NAME aste.example.${example}.setup
COMMAND clean.sh
FIXTURE_SETUP ${example})
add_test(NAME aste.example.${example}
COMMAND run.sh
FIXTURE_REQUIRES ${example})
set_tests_properties(aste.example.${example} aste.example.${example}.setup
PROPERTIES
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/examples/${example}"
ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_BINARY_DIR}"
LABELS example
RUN_SERIAL ON)
endforeach()

I could imagine that the GitHub runner has not enough resources to cope with the test case here, we should consider to use ASTE_A_MPIARGS=--oversubscribe (in the test script).

Could you also provide an example for a strong scaling. Should only be a new config, right?

Comment on lines +27 to +29
"tps": {
"kind": "rbf-thin-plate-splines",
"options": "use-qr-decomposition=\"1\""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is by far the most expensive variant. Which might take too much time.

Suggested change
"tps": {
"kind": "rbf-thin-plate-splines",
"options": "use-qr-decomposition=\"1\""
"Wendland-C6": {
"kind": "rbf-compact-polynomial-c6",
"options": "use-qr-decomposition=\"true\" support-radius=\"1\""

"function": "x+y^2+z^3",
"ranks": {
"A": [
1,2,3,4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1,2,3,4
1,2,4

1,2,3,4
],
"B": [
1,2,3,4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1,2,3,4
1,2,4

1,2,3,4
]
},
"network": "lo0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"network": "lo0",

This will only work on some systems. I would recommend to not specify any network here. preCICE has a few decent defaults which should be sufficient here.

"-m",
"--mode",
default="mapping",
choices=["weak_scale", "mapping"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
choices=["weak_scale", "mapping"],
choices=["weak_scaling", "mapping"],

?
How/ do these scripts work for a strong scaling?

plt.gca().invert_xaxis()
plt.grid()
plt.savefig(prefix + "-mapt.pdf")


def plot_scale_memory(df, prefix, participant):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could imagine that the plotting functions here can be further simplified by adding one 'low-level' and parametrized plotting function and calling this function for each variable?!

plt.savefig(f"{prefix}-peakMem{participant}.pdf")


def plot_scale_map_time(df, prefix, participant):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the plotting scripts should use log axis as well.

# The mapping-tester location
WEAK_SCALING_TESTER="${TEST_LOCATION}"/../../tools/mapping-scaling-tester/

GENERATOR="${TEST_LOCATION}"/../../tools/mesh-generators/generate_halton_mesh.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just using default arguments here? Can you pass the arguments here explicitly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants