Skip to content

Commit

Permalink
Update howto-install-AMUSE.rst (#987)
Browse files Browse the repository at this point in the history
* Update howto-install-AMUSE.rst

Added, at the bottom, how to install AMUSE in user space on Snellius (SURF)

* Update howto-install-AMUSE.rst

Prefer a virtual environment over user install
fix some typos

---------

Co-authored-by: Steven Rieder <[email protected]>
  • Loading branch information
spzwart and rieder committed Oct 2, 2023
1 parent 6510b63 commit 81fa76a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions doc/install/howto-install-AMUSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,56 @@ individual codes can be build with:
make {code}.code
with {code} the name of the code in lower case.
Installation on HPC systems using modules (tested for Snellius)
***************************************************************
Note that the modules on your local HPC system may be differently named.
.. code-block:: sh
module load 2022
module load foss/2022a
Load python.
.. code-block:: sh
module load Python/3.10.4-GCCcore-11.3.0 # or another version of python, 3.7 or higher
Following AMUSE documentation (see above), download/upgrade the python package: (--user is required by Snellius)
.. code-block:: sh
mkdir MY_PROJECT_DIR
cd MY_PROJECT_DIR
python3 -m venv env # initialise a Python virtual environment, which will contain all the packages we install
source env/bin/activate # activate the virtual environment - this must be repeated every time you log in
pip install --upgrade pip
cd AMUSE_DIR # change to where you downloaded AMUSE
pip install -r requirements.txt --upgrade # install/upgrade all required packages
pip install matplotlib # not required but highly recommended
pip install -e .
Now you can build the AMUSE framework with
.. code-block:: sh
make framework
Finally, build AMUSE individual codes by running from the AMUSE directory:
.. code-block:: sh
make {code}.code
When you log in again (and in your SLURM scripts), you will need to load the same modules and activate the same environment:
.. code-block:: sh
module load 2022
module load foss/2022a
module load Python/3.10.4-GCCcore-11.3.0 # or another version of python, 3.7 or higher
cd MY_PROJECT_DIR
source env/bin/activate

0 comments on commit 81fa76a

Please sign in to comment.