Installation
Installing LaMEM can simply be done through the package manager:
julia>]
pkg>add LaMEM
which will download the binaries along with PETSc and mpiexec for your system.
You can test if it works on your machine with
pkg> test LaMEM
Running LaMEM from the julia REPL
Running LaMEM from within julia can be done with the run_lamem
function:
LaMEM.Run.run_lamem
— Functionrun_lamem(ParamFile::String, cores::Int64=1, args:String=""; wait=true, deactivate_multithreads=true)
This starts a LaMEM simulation, for using the parameter file ParamFile
on cores
number of cores. Optional additional command-line parameters can be specified with args
.
Example:
You can call LaMEM with:
julia> using LaMEM
julia> ParamFile="../../input_models/BuildInSetups/FallingBlock_Multigrid.dat";
julia> run_lamem(ParamFile)
Do the same on 2 cores with a command-line argument as:
julia> ParamFile="../../input_models/BuildInSetups/FallingBlock_Multigrid.dat";
julia> run_lamem(ParamFile, 2, "-nstep_max = 1")
run_lamem(model::Model, cores::Int64=1, args:String=""; wait=true)
Performs a LaMEM run for the parameters that are specified in model
Running LaMEM from outside julia
If you, for some reason, do not want to run LaMEM through julia but instead directly from the terminal or powershell, you will have to add the required dynamic libraries and executables. Do this with:
LaMEM.Run.show_paths_LaMEM
— Functionshow_paths_LaMEM()
The downloaded LaMEM
binaries can also be called from outside julia (directly from the terminal). In that case, you will need to set load correct dynamic libraries (such as PETSc) and call the correct binaries.
This function shows this for your system.