Skip to content

Commit

Permalink
add dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus committed May 24, 2024
1 parent f56ad3e commit c8850c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/Subduction3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions scripts/TM_Subduction_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c8850c3

Please sign in to comment.