Skip to content

Commit

Permalink
Fix naming and paths of Advection Miniapp
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovarese committed Aug 13, 2024
1 parent 756072c commit 895ee40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions advection/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### README for Running `advection_example.jl`
### README for Running `advection_miniapp.jl`

This README provides instructions on how to run the `advection_example.jl` script for simulating advection using the Atlas library. The script allows for terminal visualization, which can be enabled as described below.
This README provides instructions on how to run the `advection_miniapp.jl` script for simulating advection using the Atlas library. The script allows for terminal visualization, which can be enabled as described below.

#### Prerequisites

Expand All @@ -15,23 +15,23 @@ This README provides instructions on how to run the `advection_example.jl` scrip
```

2. **Enabling Visualization** (optional):
- The script has a `VISUALIZATION_FLAG` that can be set to enable or disable visualization on the terminal. Ensure that this flag is set to `true` in the `advection_example.jl` script if you wish to enable visualization.
- The script has a `VISUALIZATION_FLAG` that can be set to enable or disable visualization on the terminal. Ensure that this flag is set to `true` in the `advection_miniapp.jl` script if you wish to enable visualization.
- Note: Other parameters such as the number of iterations can be changed in the `# Simulation Parameters` section of the script.

#### Running the Simulation

1. **Running the Script**:
- Use the following command to run the `advection_example.jl` script with Julia:
- Use the following command to run the `advection_miniapp.jl` script with Julia:
```sh
julia --color=yes --project=$GRIDTOOLS_JL_PATH/GridTools.jl $GRIDTOOLS_JL_PATH/GridTools.jl/src/examples/advection/advection_example.jl
julia --color=yes --project=$GRIDTOOLS_JL_PATH/GridTools.jl $GRIDTOOLS_JL_PATH/GridTools.jl/src/examples/advection/advection_miniapp.jl
```

#### Example

Here is an example of how to set the `VISUALIZATION_FLAG` in the `advection_example.jl` script and run the simulation:
Here is an example of how to set the `VISUALIZATION_FLAG` in the `advection_miniapp.jl` script and run the simulation:

1. **Setting the Visualization Flag**:
- Open the `advection_example.jl` script.
- Open the `advection_miniapp.jl` script.
- Set the `VISUALIZATION_FLAG` to `true`:
```julia
const VISUALIZATION_FLAG = true
Expand All @@ -42,7 +42,7 @@ Here is an example of how to set the `VISUALIZATION_FLAG` in the `advection_exam
- Run the script with the following command:
```sh
export GRIDTOOLS_JL_PATH=...
julia --color=yes --project=. $GRIDTOOLS_JL_PATH/src/examples/advection/advection_example.jl
julia --color=yes --project=. $GRIDTOOLS_JL_PATH/src/examples/advection/advection_miniapp.jl
```

By following these steps, you should be able to run the `advection_example.jl` script and visualize the advection simulation results on your terminal.
By following these steps, you should be able to run the `advection_miniapp.jl` script and visualize the advection simulation results on your terminal.
2 changes: 1 addition & 1 deletion advection/advection_miniapp.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Advection Example
# Advection Miniapp
# This script demonstrates an advection simulation using the Atlas library.

using Printf
Expand Down
4 changes: 2 additions & 2 deletions notes/Benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ using Profile

# Benchmark for Julia and Python implementations of advection ##############################################################################################################

include("../src/atlas/advection_test.jl")
include("../advection/advection_miniapp.jl")

println("Starting julia embedded benchmark")

Expand All @@ -81,7 +81,7 @@ bench_julia_embedded = @benchmark upwind_scheme(

println("Finished Julia embedded benchmark")

include("../src/atlas/advection_test.jl")
include("../advection/advection_miniapp.jl")

println("Starting julia python benchmark")

Expand Down

0 comments on commit 895ee40

Please sign in to comment.