From 8800eb93377914656bcea7f6b4016f07b4173b1e Mon Sep 17 00:00:00 2001 From: Benjamin Wibking Date: Tue, 21 Mar 2023 11:52:50 -0500 Subject: [PATCH 1/4] reproducer for ascent slice GPU issue --- inputs/precipitator_ascent_broken.yaml | 34 ++++++++++++ inputs/precipitator_ascent_simple.yaml | 18 +++++++ inputs/rand_blast_ascent.in | 72 ++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 inputs/precipitator_ascent_broken.yaml create mode 100644 inputs/precipitator_ascent_simple.yaml create mode 100644 inputs/rand_blast_ascent.in diff --git a/inputs/precipitator_ascent_broken.yaml b/inputs/precipitator_ascent_broken.yaml new file mode 100644 index 00000000..7521d3ec --- /dev/null +++ b/inputs/precipitator_ascent_broken.yaml @@ -0,0 +1,34 @@ +- + action: "add_pipelines" + pipelines: + pl1: + f2: + type: "slice" + params: + point: + x: 0.0 + y: 0.0 + z: 0.0 + normal: + x: 0.0 + y: 1.0 + z: 0.0 +- + action: "add_scenes" + scenes: + s1: + plots: + p1: + type: "pseudocolor" + field: "Density" + pipeline: "pl1" + color_table: + name: "Viridis" + renders: + r1: + image_prefix: "dens%05d" + annotations: "true" + camera: + look_at: [0.0, 0.0, 0.0] + position: [0.0, -200.0, 0.0] + up: [0.0, 0.0, 1.0] diff --git a/inputs/precipitator_ascent_simple.yaml b/inputs/precipitator_ascent_simple.yaml new file mode 100644 index 00000000..d950998d --- /dev/null +++ b/inputs/precipitator_ascent_simple.yaml @@ -0,0 +1,18 @@ +- + action: "add_scenes" + scenes: + s1: + plots: + p1: + type: "pseudocolor" + field: "Density" + color_table: + name: "Viridis" + renders: + r1: + image_prefix: "dens%05d" + annotations: "true" + camera: + look_at: [0.0, 0.0, 0.0] + position: [0.0, -200.0, 0.0] + up: [0.0, 0.0, 1.0] diff --git a/inputs/rand_blast_ascent.in b/inputs/rand_blast_ascent.in new file mode 100644 index 00000000..277a9fc7 --- /dev/null +++ b/inputs/rand_blast_ascent.in @@ -0,0 +1,72 @@ +# AthenaPK - a performance portable block structured AMR MHD code +# Copyright (c) 2021, Athena Parthenon Collaboration. All rights reserved. +# Licensed under the BSD 3-Clause License (the "LICENSE"); + + +problem = 3D Random blasts +reference = Balsara and Kim 2004 ApJ 602:1079–1090 + + +problem_id = rand_blast + + +rho0 = 1.0 # initial mean density +p0 = 0.3 # initial mean pressure +Bx0 = 0.056117 # initial magnetic field (x-direction) + + +refinement = none +nghost = 2 + +nx1 = 128 +x1min = -0.1 +x1max = 0.1 +ix1_bc = periodic +ox1_bc = periodic + +nx2 = 128 +x2min = -0.1 +x2max = 0.1 +ix2_bc = periodic +ox2_bc = periodic + +nx3 = 128 +x3min = -0.1 +x3max = 0.1 +ix3_bc = periodic +ox3_bc = periodic + + +nx1=64 +nx2=64 +nx3=64 + + +integrator = vl2 +cfl = 0.3 +tlim = 0.03 +nlim = 100000 +perf_cycle_offset = 2 # number of inital cycles not to be included in perf calc + + +fluid = glmmhd +glmmhd_source = dedner_extended +eos = adiabatic +reconstruction = plm +riemann = hlle +gamma = 1.666666666666667 # gamma = C_p/C_v +scratch_level = 0 # 0 is actual scratch (tiny); 1 is HBM + + +file_type = hdf5 +dt = 0.003 +variables = prim + + +file_type = hst +dt = 0.0003 + + +file_type = ascent +dt = 0.003 +actions_file = inputs/precipitator_ascent_broken.yaml From 4366136972767d5ec6e2037959be3ca06c0e73e1 Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Tue, 21 Mar 2023 13:07:08 -0400 Subject: [PATCH 2/4] adjust camera params --- ...ecipitator_ascent_broken.yaml => ascent_broken_on_gpu.yaml} | 2 +- ...cipitator_ascent_simple.yaml => ascent_working_on_gpu.yaml} | 2 +- inputs/rand_blast_ascent.in | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) rename inputs/{precipitator_ascent_broken.yaml => ascent_broken_on_gpu.yaml} (93%) rename inputs/{precipitator_ascent_simple.yaml => ascent_working_on_gpu.yaml} (89%) diff --git a/inputs/precipitator_ascent_broken.yaml b/inputs/ascent_broken_on_gpu.yaml similarity index 93% rename from inputs/precipitator_ascent_broken.yaml rename to inputs/ascent_broken_on_gpu.yaml index 7521d3ec..f29fe796 100644 --- a/inputs/precipitator_ascent_broken.yaml +++ b/inputs/ascent_broken_on_gpu.yaml @@ -30,5 +30,5 @@ annotations: "true" camera: look_at: [0.0, 0.0, 0.0] - position: [0.0, -200.0, 0.0] + position: [0.0, -0.25, 0.0] up: [0.0, 0.0, 1.0] diff --git a/inputs/precipitator_ascent_simple.yaml b/inputs/ascent_working_on_gpu.yaml similarity index 89% rename from inputs/precipitator_ascent_simple.yaml rename to inputs/ascent_working_on_gpu.yaml index d950998d..68859b62 100644 --- a/inputs/precipitator_ascent_simple.yaml +++ b/inputs/ascent_working_on_gpu.yaml @@ -14,5 +14,5 @@ annotations: "true" camera: look_at: [0.0, 0.0, 0.0] - position: [0.0, -200.0, 0.0] + position: [0.0, -0.25, 0.0] up: [0.0, 0.0, 1.0] diff --git a/inputs/rand_blast_ascent.in b/inputs/rand_blast_ascent.in index 277a9fc7..19d44491 100644 --- a/inputs/rand_blast_ascent.in +++ b/inputs/rand_blast_ascent.in @@ -69,4 +69,5 @@ dt = 0.0003 file_type = ascent dt = 0.003 -actions_file = inputs/precipitator_ascent_broken.yaml +actions_file = inputs/ascent_broken_on_gpu.yaml + From 7bb86ffc8a743fe5d059b10d7723e2bbc2cfd2fd Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Sat, 8 Jul 2023 19:23:02 -0400 Subject: [PATCH 3/4] update actions --- inputs/ascent_broken_on_gpu.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inputs/ascent_broken_on_gpu.yaml b/inputs/ascent_broken_on_gpu.yaml index f29fe796..b87b097f 100644 --- a/inputs/ascent_broken_on_gpu.yaml +++ b/inputs/ascent_broken_on_gpu.yaml @@ -32,3 +32,13 @@ look_at: [0.0, 0.0, 0.0] position: [0.0, -0.25, 0.0] up: [0.0, 0.0, 1.0] +- + action: "add_extracts" + extracts: + yslice_extract: + type: "relay" + pipeline: "pl1" + params: + path: "yslice" + protocol: "blueprint/mesh/hdf5" + num_files: 2 From 4d82e4305a33f68d28b868e3ecd066176f8b35ee Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Sat, 8 Jul 2023 19:51:03 -0400 Subject: [PATCH 4/4] add extract of full dataset --- inputs/ascent_broken_on_gpu.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inputs/ascent_broken_on_gpu.yaml b/inputs/ascent_broken_on_gpu.yaml index b87b097f..cfa88678 100644 --- a/inputs/ascent_broken_on_gpu.yaml +++ b/inputs/ascent_broken_on_gpu.yaml @@ -42,3 +42,8 @@ path: "yslice" protocol: "blueprint/mesh/hdf5" num_files: 2 + e1: + type: "relay" + params: + path: "blueprint" + protocol: "blueprint/mesh/hdf5"