Skip to content

Commit

Permalink
More small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tovrstra committed Oct 17, 2023
1 parent 0a31a01 commit cc2efa7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
4 changes: 2 additions & 2 deletions job_install_hpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforg
bash Mambaforge-Linux-x86_64.sh -bfp ${MSBS_ROOT}/mambaforge

# Activate Mamba-forge.
eval "$(${ROOT}/mambaforge/bin/conda shell.bash hook)"
eval "$(${MSBS_ROOT}/mambaforge/bin/conda shell.bash hook)"

# Make sure your base environment is up-to-date.
mamba update --all -y
Expand All @@ -34,7 +34,7 @@ mamba update --all -y
mamba create -n openmm python cudatoolkit git jupyterlab numpy pandas scipy matplotlib ipympl rdkit openbabel openmm mdtraj nglview pymbar pdbfixer parmed

# Activate the OpenMM environment
conda activate openmm
mamba activate openmm

# Test the installation
python -m openmm.testInstallation
39 changes: 17 additions & 22 deletions setup_hpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,28 @@ We assume the following:
The last part should be something along the following lines:

```
OpenMM Version: 7.7
Git Revision: 130124a3f9277b054ec40927360a6ad20c8f5fa6
OpenMM Version: 8.0
Git Revision: a7800059645f4471f4b91c21e742fe5aa4513cda

There are 2 Platforms available:
There are 4 Platforms available:

1 Reference - Successfully computed forces
2 CPU - Successfully computed forces
3 CUDA - Successfully computed forces
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
4 OpenCL - Successfully computed forces

Median difference in forces between platforms:

Reference vs. CPU: 6.30535e-06
Reference vs. CPU: 6.2894e-06
Reference vs. CUDA: 6.74325e-06
CPU vs. CUDA: 7.39638e-07
Reference vs. OpenCL: 6.74399e-06
CPU vs. OpenCL: 7.76254e-07
CUDA vs. OpenCL: 2.11141e-07

All differences are within tolerance.
```
Expand All @@ -80,7 +91,7 @@ Submit a simple job script on the queue, in which you perform the same test.
# Activate the OpenMM software.
MSBS_ROOT=${VSC_DATA}
eval "$(${MSBS_ROOT}/mambaforge/bin/conda shell.bash hook)"
conda activate openmm
mamba activate openmm
# Set the number of threads
export OPENMM_CPU_THREADS=${SLURM_CPUS_ON_NODE}
# Run the test.
Expand All @@ -103,23 +114,7 @@ Submit a simple job script on the queue, in which you perform the same test.
After the job is submitted, you can safely log out (type `exit`), even switch off your laptop, and connect later to check the status of the job.
When the job status is `C` (completed), or it is no longer present in the output of `squeue`, the job was executed and corresponding output files will be created.

1. The output of the test job should be similar to:

```
OpenMM Version: 7.7
Git Revision: 130124a3f9277b054ec40927360a6ad20c8f5fa6

There are 2 Platforms available:

1 Reference - Successfully computed forces
2 CPU - Successfully computed forces

Median difference in forces between platforms:

Reference vs. CPU: 6.30535e-06

All differences are within tolerance.
```
1. The output of the test job should be the same as that of the previous test.

1. Add the following to your `.bashrc` file, if you want to facilitate the activation of Mamba-forge, without having it always active:

Expand Down
10 changes: 5 additions & 5 deletions setup_laptop.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Setup of OpenMM and Jupyterlab on your laptop

To run OpenMM simulations on your laptop, we will work with a standardized Python environment, Anaconda, which is supported on all major operating systems.
For reasons of efficiency and robustness, we will in fact use a derivative of Anaconda, called Mamba-forge.
For reasons of efficiency and robustness, we will in fact use a derivative of Anaconda, called Mambaforge.

:warning: **As of May 2022, the installation of OpenMM on Windows is broken.**
Technical details of this issue can be found below.
Expand All @@ -15,7 +15,7 @@ Most of the simulation software is developed for Unix platforms (macOS and Linux

Take the following steps:

1. Download the [Mamba-forge installer](https://conda-forge.org/miniforge/)
1. Download the [Mambaforge installer](https://conda-forge.org/miniforge/)
that matches the operating system and CPU architecture of your laptop.

1. Run the Mambaforge installer.
Expand All @@ -28,7 +28,7 @@ Take the following steps:
```bash
bash Mambaforge*.sh -b -p ${HOME}/mambaforge
```
Add the following line to your `~/.bashrc` file, which makes it convenient to activate the Mamba-forge installation:
Add the following line to your `~/.bashrc` file, which makes it convenient to activate the Mambaforge installation:
```bash
alias m='eval "$(${HOME}/mambaforge/bin/conda shell.bash hook)"'
```
Expand All @@ -45,7 +45,7 @@ Take the following steps:
- **Linux and WSL.**
Open your preferred virtual terminal and enter the command alias `m`.

1. Configure conda and install OpenMM (and other useful tools).
1. Configure Mambaforge and install OpenMM (and other useful tools).

In this step, you all need to enter commands in a virtual terminal, the software equivalent of terminal computers from the 70s.
Every command you enter will be executed after you press `Enter`.
Expand Down Expand Up @@ -75,7 +75,7 @@ Take the following steps:
```

You may have to close your terminal and re-open a new one,
run the commands `m` (Linux and macOS only) and `conda activate openmm` again before the following steps work.
run the commands `m` (Linux and macOS only) and `mamba activate openmm` again before the following steps work.

1. Test your OpenMM installation by entering the following command on the command prompt:

Expand Down

0 comments on commit cc2efa7

Please sign in to comment.