Amarel Set up and Test

 ssh-copy-id -i ~/.ssh/id_ed25519_amarel.pub syh35@amarel-new.hpc.rutgers.edu


ssh -i ~/.ssh/id_ed25519_amarel syh35@amarel-new.hpc.rutgers.edu



ssh-add --apple-use-keychain ~/.ssh/id_ed25519_amarel


nano ~/.ssh/config


Host amarel

    HostName amarel-new.hpc.rutgers.edu

    User syh35

    IdentityFile ~/.ssh/id_ed25519_amarel

    IdentitiesOnly yes

    AddKeysToAgent yes

    UseKeychain yes


Then:

  1. Press Control + O
  2. Press Enter to save
  3. Press Control + X to exit

After returning to the Mac prompt, run:



chmod 600 ~/.ssh/config

ssh amarel

ssh amarel


Perfect—the command-line setup is complete. ssh amarel now works without asking for a password or passphrase.

Next, connect through VS Code:

  1. Open VS Code.
  2. Open Extensions with Command + Shift + X.
  3. Search for Remote - SSH and install the Microsoft extension.
  4. Press Command + Shift + P.
  5. Select Remote-SSH: Connect to Host…
  6. Choose amarel.
  7. If asked for the remote operating system, select Linux.
  8. Let VS Code open a new window and install its remote server components.

When connected, the lower-left corner should indicate SSH: amarel. Open VS Code’s terminal and run:




Great — that means the maintenance issue that blocked you is over. Your account is already confirmed active.

Go back to VS Code and connect again:

Bottom-left >< → Connect to Host → amarel

Once the connection succeeds, choose Terminal → New Terminal. You should see something like:

[syh35@amarel3 ~]$

Then paste only this command:

sacctmgr show assoc where user=$USER format=Cluster,Account,User,Partition,QOS



sacctmgr show assoc where user=$USER format=Cluster,Account,User,Partition,QOS




Cluster Account User Partition QOS amarel general syh35 normal


pwd ls -la df -h ~


hese tell us:

  • pwd → where your home directory actually is
  • ls -la → what's currently in it
  • df -h ~ → information about the filesystem containing your home directory

[syh35@amarel4 ~]$ pwd
ls -la
df -h ~
/home/syh35
total 264
drwx------    8 syh35 syh35   4096 Sep 14 14:25 .
drwxr-xr-x 6946 root  root  262144 Sep 16 15:48 ..
-rw-------    1 syh35 syh35    149 Sep 14 14:44 .bash_history
-rw-r--r--    1 syh35 syh35     18 Feb 15  2024 .bash_logout
-rw-r--r--    1 syh35 syh35    141 Feb 15  2024 .bash_profile
-rw-r--r--    1 syh35 syh35    492 Feb 15  2024 .bashrc
drwxr-xr-x    4 syh35 syh35   4096 Sep 14 14:25 .cache
drwxr-xr-x    3 syh35 syh35   4096 Sep 14 14:25 .config
drwx------    4 syh35 syh35   4096 Sep 14 14:25 .copilot
-rw-r--r--    1 syh35 syh35    334 May 21  2025 .emacs
-rw-r--r--    1 syh35 syh35    172 Oct 14  2025 .kshrc
drwxr-xr-x    4 syh35 syh35   4096 Aug 17 14:26 .mozilla
drwx------    2 syh35 syh35   4096 Sep 14 12:04 .ssh
drwxr-x---    5 syh35 syh35   4096 Sep 17 08:21 .vscode-server
-rw-r--r--    1 syh35 syh35    183 Sep 14 14:24 .wget-hsts
-rw-r--r--    1 syh35 syh35    658 Feb 23  2022 .zshrc
Filesystem      Size  Used Avail Use% Mounted on
cache           201T  118T   83T  59% /cache
[syh35@amarel4 ~]$ 



Access to f_wj183_1 file system in the /projects space

EvanJohnson

OARC Help

Samuel Huang

Hello!

Can you please give Samuel Huang (syh35) access to my project space: /projects/f_wj183_1?

Thanks!

Evan

----
W. Evan Johnson, PhD
Professor of Medicine, Division of Infectious Disease
Director, Center for Data Science
Rutgers University - New Jersey Medical School
225 Warren Street
Newark, NJ 07103

Exequiel Punzalan

Evan Johnson

**OARC Help;**Samuel Huang

Hello Evan,

 

The user has been added.

 

Best,

Exequiel

 

Exequiel Punzalan

Senior Scientist, Research Computing

Office of Advanced Research Computing (OARC)

Rutgers, The State University of New Jersey

EvanJohnson

Exequiel Punzalan

**OARC Help;**Samuel Huang

thank you! 


Excellent — this is the access we were waiting for. OARC has now added you to Dr. Johnson's project space:

/projects/f_wj183_1


cd /projects/f_wj183_1 pwd ls -lah


syh35@amarel4 ~]$ cd /projects/f_wj183_1

pwd

ls -lah

/projects/f_wj183_1

total 300K

drwxrws---+  10 wj183  g_wj183_1 4.0K Aug 25 20:16 .

drwxr-xr-x  101 root   root      256K Jul  9 14:09 ..

drwx--S---.   3 root   g_wj183_1 4.0K Dec 23  2023 .afm

drwxrwsr-x   24 sl1729 g_wj183_1 4.0K Jun  3 22:43 apps

drwxrwsr-x    9 sl1729 g_wj183_1 4.0K Aug 28 09:15 code

drwxrwsr-x   58 sl1729 g_wj183_1 4.0K Sep  8 20:47 data

drwxrwsr-x.   2 sl1729 g_wj183_1 4.0K Dec 20  2025 .ipynb_checkpoints

drwxrwsr-x   42 wj183  g_wj183_1 8.0K Sep  1 19:33 reflib

-rw-r--r--    1 xw488  g_wj183_1 7.0K Jun  3 22:38 Rplots.pdf

drwxr-sr-x    2 xw488  g_wj183_1 4.0K Jun  3 22:52 .vscode

drwxrwsr-x   15 sl1729 g_wj183_1 4.0K Sep  1 15:31 work

[syh35@amarel4 f_wj183_1]$ 





mkdir /projects/f_wj183_1/work/Samuel ls -ld /projects/f_wj183_1/work/Samuel



[syh35@amarel3 ~]$ cd /projects/f_wj183_1 pwd ls -lah


bash: cd: too many arguments

[syh35@amarel3 ~]$ d /projects/f_wj183_1

bash: d: command not found

[syh35@amarel3 ~]$ cd /projects/f_wj183_1

[syh35@amarel3 f_wj183_1]$ pwd

/projects/f_wj183_1

[syh35@amarel3 f_wj183_1]$ ls -lah

total 300K

drwxrws---+  10 wj183  g_wj183_1 4.0K Aug 25 20:16 .

drwxr-xr-x  101 root   root      256K Jul  9 14:09 ..

drwx--S---.   3 root   g_wj183_1 4.0K Dec 23  2023 .afm

drwxrwsr-x   24 sl1729 g_wj183_1 4.0K Jun  3 22:43 apps

drwxrwsr-x    9 sl1729 g_wj183_1 4.0K Aug 28 09:15 code

drwxrwsr-x   58 sl1729 g_wj183_1 4.0K Sep  8 20:47 data

drwxrwsr-x.   2 sl1729 g_wj183_1 4.0K Dec 20  2025 .ipynb_checkpoints

drwxrwsr-x   42 wj183  g_wj183_1 8.0K Sep  1 19:33 reflib

-rw-r--r--    1 xw488  g_wj183_1 7.0K Jun  3 22:38 Rplots.pdf

drwxr-sr-x    2 xw488  g_wj183_1 4.0K Jun  3 22:52 .vscode

drwxrwsr-x   15 sl1729 g_wj183_1 4.0K Sep  1 15:31 work

[syh35@amarel3 f_wj183_1]$ mkdir /projects/f_wj183_1/work/Samuel

ls -ld /projects/f_wj183_1/work/Samuel

drwxr-sr-x 2 syh35 g_wj183_1 4096 Sep 17 09:43 /projects/f_wj183_1/work/Samuel

[syh35@amarel3 f_wj183_1]$ ls -lah /projects/f_wj183_1/work

total 143K

drwxrwsr-x  16 sl1729 g_wj183_1 4.0K Sep 17 09:43 .

drwxrws---+ 10 wj183  g_wj183_1 4.0K Aug 25 20:16 ..

drwxrwsr-x   5 ajv120 g_wj183_1 4.0K Jun 11 09:41 avanva

drwxrwsr-x  14 as2654 g_wj183_1 4.0K Aug  8 22:39 Avi

drwxrwsr-x  20 hf268  g_wj183_1 128K May 13 18:48 Howard

drwxrwsr-x.  2 sl1729 g_wj183_1 4.0K Oct  7  2025 .ipynb_checkpoints

drwxrwsr-x   2 kq85   g_wj183_1 4.0K Jan  3  2025 Kiloni

drwxrwsr-x   8 en366  g_wj183_1 4.0K Aug 25 20:19 Nasinghe

drwxr-sr-x.  4 np1112 g_wj183_1 4.0K Apr 17 09:10 Nikhil

drwxr-sr-x   2 ph461  g_wj183_1 4.0K Sep  1 15:31 Paige

-rw-rw-r--.  1 yl2800 g_wj183_1    0 Jun 12 05:16 runinfo.csv

drwxr-sr-x   2 syh35  g_wj183_1 4.0K Sep 17 09:43 Samuel

drwxrwsr-x  19 sl1729 g_wj183_1 4.0K Aug  9 19:49 Sean

drwxr-sr-x   3 sg2225 g_wj183_1 4.0K Nov 10  2025 sgrover

drwxrwsr-x   5 sj1136 g_wj183_1 4.0K Aug 15 16:18 Solomon

-rw-rw-r--.  1 yl2800 g_wj183_1    0 Jun 12 05:16 SRR_Acc_List.txt

drwxr-s--t  17 xw488  g_wj183_1 8.0K Sep  8 13:27 Xutao

drwx--S---. 20 yl2800 g_wj183_1 4.0K Sep  9 11:20 Yaoan

[syh35@amarel3 f_wj183_1]$ 



Let's do a tiny R project in your own Johnson lab workspace. We'll keep it simple so you learn what each piece is doing.

First, in your Amarel terminal, run these one line at a time:


cd /projects/f_wj183_1/work/Samuel 

mkdir -p amarel_test 

cd amarel_test 

pwd



[syh35@amarel3 f_wj183_1]$ cd /projects/f_wj183_1/work/Samuel 


[syh35@amarel3 Samuel]$ mkdir -p amarel_test 


[syh35@amarel3 Samuel]$ cd amarel_test 


[syh35@amarel3 amarel_test]$ pwd

/projects/f_wj183_1/work/Samuel/amarel_test

[syh35@amarel3 amarel_test]$ module avail R


--------------------------------------------------------- /opt/sw/modulefiles/Core ----------------------------------------------------------

   ARACNE/20200620        MATLAB/R2025b    STAR/2.7.5a        gaussian/09revD01        modeller/9.16        trinityrnaseq/2.1.1

   MATLAB/R2024a   (D)    RSEM/1.3.3       Trinotate/2.0.2    gaussian/16revA03 (D)    singularity/3.1.0


------------------------------------------------ /opt/ohpc/admin/lmod/lmod/modulefiles/Core -------------------------------------------------

   settarg


  Where:

   D:  Default Module


If the avail list is too long consider trying:


"module --default avail" or "ml -d av" to just list the default modules.

"module overview" or "ml ov" to display the number of modules for each name.


Use "module spider" to find all possible modules and extensions.

Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".



[syh35@amarel3 amarel_test]$ 




Perfect. Your workspace is set up correctly:

/projects/f_wj183_1/work/Samuel/amarel_test

And we learned something important: module avail R did not show the R programming language. RSEM is a bioinformatics program, not R itself. That doesn't mean R isn't installed—on module-based HPC systems, software can be hidden behind prerequisite modules or other module paths.

Let's ask Amarel specifically where R is. Run just:

module spider R

module spider searches Amarel's full module hierarchy rather than only the modules currently available to load.

Paste the output here. Don't install R yourself yet. Once we find Amarel's R installation, we'll load it and then create your first hello.R in VS Code.



[syh35@amarel3 amarel_test]$ module avail R


--------------------------------------------------------- /opt/sw/modulefiles/Core ----------------------------------------------------------

   ARACNE/20200620        MATLAB/R2025b    STAR/2.7.5a        gaussian/09revD01        modeller/9.16        trinityrnaseq/2.1.1

   MATLAB/R2024a   (D)    RSEM/1.3.3       Trinotate/2.0.2    gaussian/16revA03 (D)    singularity/3.1.0


------------------------------------------------ /opt/ohpc/admin/lmod/lmod/modulefiles/Core -------------------------------------------------

   settarg


  Where:

   D:  Default Module


If the avail list is too long consider trying:


"module --default avail" or "ml -d av" to just list the default modules.

"module overview" or "ml ov" to display the number of modules for each name.


Use "module spider" to find all possible modules and extensions.

Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".



[syh35@amarel3 amarel_test]$ module spider R


------------------------------------------------------------------------------------------------------------------------------------------

  ARACNE: ARACNE/20200620

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      ARACNE: an algorithm for the reconstruction of gene regulatory networks in a mammalian cellular context



    This module can be loaded directly: module load ARACNE/20200620


    Help:

       

      This module loads the environment for ARACNE.

      



------------------------------------------------------------------------------------------------------------------------------------------

  HMMER: HMMER/3.1b2

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      HMMER: biosequence analysis using profile hidden Markov models



    You will need to load all module(s) on any one of the lines below before the "HMMER/3.1b2" module is available to load.


      intel/16.0.3  mvapich2/2.1

 

    Help:

      This module loads the environment to run HMMER 3.1b2 compiled with the Intel Compilers 16.0.3 and MVAPICH2 2.1. 

      



------------------------------------------------------------------------------------------------------------------------------------------

  MATLAB:

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      MATLAB: The Language of Technical Computing


     Versions:

        MATLAB/R2024a

        MATLAB/R2025b


------------------------------------------------------------------------------------------------------------------------------------------

  For detailed information about a specific "MATLAB" package (including how to load the modules) use the module's full name.

  Note that names that have a trailing (E) are extensions provided by other modules.

  For example:


     $ module spider MATLAB/R2025b

------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------

  R-Project:

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      R: The R Project for Statistical Computing


     Versions:

        R-Project/3.2.5

        R-Project/3.3.3

        R-Project/3.4.1


------------------------------------------------------------------------------------------------------------------------------------------

  For detailed information about a specific "R-Project" package (including how to load the modules) use the module's full name.

  Note that names that have a trailing (E) are extensions provided by other modules.

  For example:


     $ module spider R-Project/3.4.1

------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------

  RSEM: RSEM/1.3.3

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      RSEM: a software package for estimating gene and isoform expression levels from RNA-Seq data.



    This module can be loaded directly: module load RSEM/1.3.3


    Help:

      This module loads the installation of RSEM.

      



------------------------------------------------------------------------------------------------------------------------------------------

  STAR: STAR/2.7.5a

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      STAR: "Spliced Transcripts Alignment to a Reference" RNA-seq aligner



    This module can be loaded directly: module load STAR/2.7.5a


    Help:

      This module loads the installation of STAR.

      



------------------------------------------------------------------------------------------------------------------------------------------

  Trinotate: Trinotate/2.0.2

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      Trinotate: Transcriptome Functional Annotation and Analysis



    This module can be loaded directly: module load Trinotate/2.0.2


    Help:

      This module loads the environment to run Trinotate 2.0.2 compiled with the system GCC 4.8.3 compilers.

      



------------------------------------------------------------------------------------------------------------------------------------------

  amber:

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      AMBER: Assisted Model Building with Energy Refinement


     Versions:

        amber/14

        amber/16

        amber/20

        amber/24


------------------------------------------------------------------------------------------------------------------------------------------

  For detailed information about a specific "amber" package (including how to load the modules) use the module's full name.

  Note that names that have a trailing (E) are extensions provided by other modules.

  For example:


     $ module spider amber/24

------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------

  gaussian:

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      Gaussian: state-of-the-art capabilities for electronic structure modeling


     Versions:

        gaussian/09revD01

        gaussian/16revA03


------------------------------------------------------------------------------------------------------------------------------------------

  For detailed information about a specific "gaussian" package (including how to load the modules) use the module's full name.

  Note that names that have a trailing (E) are extensions provided by other modules.

  For example:


     $ module spider gaussian/16revA03

------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------

  gromacs: gromacs/2016.1

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      GROMACS: A molecular dynamics package primarily designed for biomolecular systems such as proteins and lipids. 



    You will need to load all module(s) on any one of the lines below before the "gromacs/2016.1" module is available to load.


      intel/17.0.1  mvapich2/2.2

 

    Help:

       

      This module loads the installation of GROMACS 2016.1 compiled with MVAPICH2 2.2 and the Intel 17.0.1.

      



------------------------------------------------------------------------------------------------------------------------------------------

  modeller: modeller/9.16

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      MODELLER: A Program for Protein Structure Modeling



    This module can be loaded directly: module load modeller/9.16


    Help:

       

      This module loads the installation Modeller 9.16 compiled with the system GCC 4.8.3 compilers.

      

      For more information about Modeller, see: https://salilab.org/modeller/

      



------------------------------------------------------------------------------------------------------------------------------------------

  orca: orca/4.0.1.2

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      ORCA: An ab initio, DFT and semiempirical SCF-MO package



    You will need to load all module(s) on any one of the lines below before the "orca/4.0.1.2" module is available to load.


      openmpi/2.1.1

 

    Help:

       

      This module loads the environment for the ORCA electronic structure program package.

      



------------------------------------------------------------------------------------------------------------------------------------------

  settarg: settarg

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      The settarg module provides a way to connect the loaded modules with your build system by setting environment variables. 



    This module can be loaded directly: module load settarg


    Help:

      The settarg module dynamically and automatically updates "$TARG" and a

      host of other environment variables. These new environment variables

      encapsulate the state of the modules loaded.

      

      For example, if you have the settarg module and gcc/4.7.2 module loaded

      then the following variables are defined in your environment:

      

         TARG=OBJ/_x86_64_06_1a_gcc-4.7.3

         TARG_COMPILER=gcc-4.7.3

         TARG_COMPILER_FAMILY=gcc

         TARG_MACH=x86_64_06_1a

         TARG_SUMMARY=x86_64_06_1a_gcc-4.7.3

      

      If you change your compiler to intel/13.1.0, these variables change to:

      

         TARG=OBJ/_x86_64_06_1a_intel-13.1.0

         TARG_COMPILER=intel-13.1.0

         TARG_COMPILER_FAMILY=intel

         TARG_MACH=x86_64_06_1a

         TARG_SUMMARY=x86_64_06_1a_intel-13.1.0

      

      If you then load mpich/3.0.4 module the following variables automatically

      change to:

      

         TARG=OBJ/_x86_64_06_1a_intel-13.1.0_mpich-3.0.4

         TARG_COMPILER=intel-13.1.0

         TARG_COMPILER_FAMILY=intel

         TARG_MACH=x86_64_06_1a

         TARG_MPI=mpich-3.0.4

         TARG_MPI_FAMILY=mpich

         TARG_SUMMARY=x86_64_06_1a_dbg_intel-13.1.0_mpich-3.0.4

      

      You also get some TARG_* variables that are always available, independent

      of what modules you have loaded:

      

         TARG_MACH=x86_64_06_1a

         TARG_MACH_DESCRIPT=...

         TARG_HOST=...

         TARG_OS=Linux-3.8.0-27-generic

         TARG_OS_FAMILY=Linux

      

      One way that these variables can be used is part of a build system where

      the executables and object files are placed in $TARG.  You can also use

      $TARG_COMPILER_FAMILY to know which compiler you are using so that you

      can set the appropriate compiler flags.

      

      If the environment variable LMOD_SETTARG_FUNCTIONS is set to "yes"

      then helpful aliases are defined to set the debug/optimize/max debug

      build scenerio

      

      If the environment variable LMOD_SETTARG_IN_PROMPT is NOT set to "no",

      then the settarg module will define the PROMPT_COMMAND in bash and

      precmd in zsh

      

      If the environment variable LMOD_SETTARG_TITLE_BAR is set to "yes" and

      LMOD_SETTARG_IN_PROMPT is not "no", then the xterm title will be set with

      along with important modules like the compiler and mpi stack.

      

      

      

      Settarg can do more.  Please see the Lmod website for more details.

      



------------------------------------------------------------------------------------------------------------------------------------------

  singularity: singularity/3.1.0

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      Singularity: Application containers for Linux



    This module can be loaded directly: module load singularity/3.1.0


    Help:

      This module loads the environment necessary to use Singularity. 

      



------------------------------------------------------------------------------------------------------------------------------------------

  trinityrnaseq: trinityrnaseq/2.1.1

------------------------------------------------------------------------------------------------------------------------------------------

    Description:

      Trinity: RNA-Seq de novo transcriptome assembly



    This module can be loaded directly: module load trinityrnaseq/2.1.1


    Help:

       

      This module loads the installation of Trinity RNA-Seq 2.1.1 compiled with the system GCC 4.8.3 compilers.

      




clinical/ICU data: R + likely Python/Conda
microbiome/genomics: STAR + HMMER + containers + whatever additional sequencing tools are installed
transcriptomics: STAR → RSEM → downstream statistical analysis
gene networks: ARACNE
ML: likely Python/Conda/PyTorch/TensorFlow, but we haven't searched for those yet.


Python ↓ CUDA + cuDNN ↓ GPU compute ↓ MIMIC / other deidentified datasets






FASTQ
 ↓
FastQC                  quality control
 ↓
Bowtie2 / BWA           host/decontamination alignment
 ↓
STAR / HISAT2           RNA alignment
 ↓
RSEM                    expression quantification
 ↓
Python/R                statistics

And BLAST, bedtools, bamtools, seqtk, etc. support the surrounding workflow.

The presence of Singularity may be particularly important. The globally installed R versions we found are only 3.2–3.4, which I would not choose as the foundation for a new 2026 analysis. But Singularity can potentially let us run a modern, reproducible R or Python environment without depending on those old system R modules.

Before choosing a project, let's finish the inventory


Yes. Let's do the simplest possible test first and actually execute something on Amarel.

You're already in:

/projects/f_wj183_1/work/Samuel/amarel_test

First we'll use Python, since we already know Amarel has Python and don't need to deal with the old R setup yet.

1. Check Python

Run:

python --version

If that returns a Python version, create a test script:

nano test.py

You'll enter a text editor. Type:

import socket
import os

print("Hello from Amarel!")
print("Computer:", socket.gethostname())
print("Working directory:", os.getcwd())

numbers = [1, 2, 3, 4, 5]
print("Mean:", sum(numbers) / len(numbers))

Then save it:

Control + OEnterControl + X

You'll return to:

[syh35@amarel3 amarel_test]$

Then verify the file exists:

ls -l

Don't run python test.py yet. You're on amarel3, the login node. Once the script exists, I'll show you your first Slurm compute job, so the first program you actually execute follows the proper HPC workflow.

Start with:

python --version

and tell me what it returns.

[syh35@amarel3 amarel_test]$ python --version Python 3.9.21


Perfect — Python 3.9.21 is already available without loading a module. That's enough for our first test.

Now let's create the script. Since you're using VS Code, we can skip nano and use the actual VS Code editor.

Create test.py

In VS Code, click the Explorer/files icon on the far left.

If you don't already see your amarel_test folder there, go to File → Open Folder… and enter:

/projects/f_wj183_1/work/Samuel/amarel_test

Click OK.

Then create a new file named:

test.py

Paste this into it:

import socket
import os
import statistics

print("Hello from Amarel!")
print("Computer:", socket.gethostname())
print("Working directory:", os.getcwd())

numbers = [10, 20, 30, 40, 50]
print("Numbers:", numbers)
print("Mean:", statistics.mean(numbers))

Save with Cmd + S.

Then, back in your Amarel terminal, run:

ls -l







You're in the right place. I can see SSH: amarel in the bottom-left, so this entire VS Code window is connected to Amarel. Your test.py is also ready.

To open the Amarel terminal:

At the very top of your Mac screen, click:

Terminal → New Terminal

Or use the keyboard shortcut:

Control + ` (the backtick key, usually just below Esc).

A terminal panel should appear across the bottom of VS Code. Because this VS Code window says SSH: amarel, that terminal will automatically be an Amarel terminal, not your Mac terminal.

You should see something similar to:

[syh35@amarel3 amarel_test]$

Then type:

pwd

It should say:

/projects/f_wj183_1/work/Samuel/amarel_test





Perfect. You're in exactly the right place, and test.py is stored on Amarel.

Now we'll learn the key HPC concept: your terminal is on amarel3, a login node. We want Python to execute on a compute node.

For this tiny test, request an interactive compute session. Run:

srun --account=general --time=00:10:00 --mem=1G --cpus-per-task=1 --pty bash

It may take a few seconds. When it succeeds, your prompt should change from something like:

[syh35@amarel3 amarel_test]$

to a different machine name, for example:

[syh35@computeXXX amarel_test]$

Then run:

hostname

Stop there and send me what hostname returns.

Once we confirm you're actually on a compute node, we'll run:

python test.py




syh35@hal0322 amarel_test]$ srun: error: hal0322: task 0: Killed [syh35@amarel3 amarel_test]$ srun --account=general --time=00:15:00 --mem=1G --cpus-per-task=1 --pty bash srun: job 61672039 queued and waiting for resources srun: job 61672039 has been allocated resources



[syh35@hal0322 amarel_test]$

So don't type srun again. At that exact prompt, run these two lines:

hostname
python test.py


Mac ↓ VS Code Remote-SSH ↓ amarel3 ← login node ↓ srun hal0322 ← compute node ↓ python test.py ↓ Mean: 30


[syh35@amarel3 amarel_test]$ srun --account=general --time=00:15:00 --mem=1G --cpus-per-task=1 --pty bash srun: job 61672039 queued and waiting for resources srun: job 61672039 has been allocated resources [syh35@hal0322 amarel_test]$ hostname python test.py hal0322.amarel.rutgers.edu Hello from Amarel! Computer: hal0322.amarel.rutgers.edu Working directory: /projectsp/f_wj183_1/work/Samuel/amarel_test Numbers: [10, 20, 30, 40, 50] Mean: 30


/projects/f_wj183_1/work/Samuel/amarel_test




Comments