From c8850c3706655c43ae6a28dd7a38acd41df7f47c Mon Sep 17 00:00:00 2001 From: Boris Kaus Date: Fri, 24 May 2024 10:39:54 +0200 Subject: [PATCH] add dirs --- scripts/Subduction3D.jl | 6 ++++++ scripts/TM_Subduction_example.jl | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/scripts/Subduction3D.jl b/scripts/Subduction3D.jl index 71498ae0..6e028031 100644 --- a/scripts/Subduction3D.jl +++ b/scripts/Subduction3D.jl @@ -89,12 +89,18 @@ end # Add this stage, we are ready to run the simulation. On my machine it takes around 4 seconds per timestep on 8 cores: try testing == true + curdir = pwd() + pkg_dir = pkgdir(LaMEM) + cd(joinpath(pkg_dir,"test")) + # if we run this as part of the test suite, use fewer timesteps if !Sys.iswindows() run_lamem(model, 8, "-nstep_max 2 -nstep_out 1") else run_lamem(model, 1, "-nstep_max 2 -nstep_out 1") end + cd(curdir) + catch run_lamem(model, 8) # run on 8 cores (if possible) end diff --git a/scripts/TM_Subduction_example.jl b/scripts/TM_Subduction_example.jl index e672a4a8..572553fe 100644 --- a/scripts/TM_Subduction_example.jl +++ b/scripts/TM_Subduction_example.jl @@ -236,12 +236,17 @@ model.Solver = Solver( SolverType = "multigrid", try testing == true + curdir = pwd() + pkg_dir = pkgdir(LaMEM) + cd(joinpath(pkg_dir,"test")) + # if we run this as part of the test suite, use fewer timesteps if !Sys.iswindows() run_lamem(model, 8, "-nstep_max 2 -nstep_out 1") else run_lamem(model, 1, "-nstep_max 2 -nstep_out 1") end + cd(curdir) catch run_lamem(model, 8) end \ No newline at end of file