diff --git a/scripts/Subduction3D.jl b/scripts/Subduction3D.jl index 71498ae..6e02803 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 e672a4a..572553f 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