Build SAM
Prerequisites
SAM relies on the MOOSE framework. We build MOOSE by following the instructions on the MOOSE website first.
Install Mambaforge3
For Linux users:
|
|
After installing, put Mambaforge’s path to system environment PATH
:
|
|
so that the system recognizes the mamba
command.
Then initialize mambaforge by
|
|
This command will append several mamba initialization to your ~/.bashrc
file. Since I use zsh
, I moved those lines from ~/.bashrc
to ~/.zshrc
.
Then restart the terminal.
Install MOOSE
-
Add the INL public channel to Conda:
1
conda config --add channels https://conda.software.inl.gov/public
-
Create moose environment in Conda
1
mamba create -n moose moose-dev
-
Activate the environment
1
mamba activate moose
Clone SAM and Build
Clone SAM from ANL’s GitLab
-
Get an access token to the GitLab repository.
GitLab -> Settings -> Access Tokens
-
Clone the SAM repository to your computer or cluster
1 2 3
mkdir ~/Documents cd ~/Documents git clone https://git-nse.egs.anl.gov/*YourUserName_or_SAM*/SAM.git
It will ask you for the GitLab username and password. Use the access token you generated for the password.
Build libmesh
-
Get moose submodule
1 2 3
cd SAM git submodule init git submodule update --recursive
Build SAM
-
Build SAM
1 2
cd ~/Documents/SAM make -j4
-
Run the tests
1
./run_tests -j4
If SAM was built correctly, all the tests will pass.