Tech Ref
Electronic Submission
You should make a cs377 directory under your home directory on your CS account, and protect it:
$ cd $ mkdir cs377 $ chmod 700 cs377
Your programming assignments should each be saved in a subdirectory named cs377. This makes it easy to use the submit377 script for each individual assignment, as well as keeps your assignments organized.
$ cd cs377 $ mkdir prog1 $ cd prog1 ~~~ repeat: edit, compile, run ~~~ until: your program is ready to submit $ cd .. $ submit377 asmt1 prog1
Concurrent Languages
Here is a technical reference for setting up language environments on spaceserver, then compiling and running your programs. Be sure you have a home bin directory, and if you don't, create one via:
$ cd $ mkdir bin $ cd bin
Next, use the following commands to copy the scripts you'll need to use concurrent programming languages on your CS linux account:
$ cp ~mlsmith/bin/set-upc-env ./
kroc
To set up kroc's environment:
$ source /usr/local/bin/kroc-setup.sh
To compile and run a kroc (occam) program:
$ kroc myprog.occ $ ./myprog
To compile a program that uses the course library: (like the ones we'll be compiling in class)
$ kroc myproc.occ -lcourse
UPC
To set up UPC's environment:
$ source ~/bin/set-upc-env
To compile and run a UPC program:
$ upcc -T n myprog.upc $ upcrun myprog
(where n is the number of threads you would like myprog.upc to spawn at runtime)
CUDA
Vassar CS Department's GPGPU cluster: hpc
- hpc is the cluster's head node and a virtual machine (VM)
- webpage: https://hpc.cs.vassar.edu/ (accessible only behind CS firewall)
- uses Slurm (Simple Linux Resource Manager) to run jobs (interactive or batch)
Compiling and running CUDA programs
Must ssh to hpc (from behind the CS firewall):
$ ssh vassarID@hpc.cs.vassar.edu
To compile (using Nvidia C compiler):
$ nvcc -o my-cuda-prog my-cuda-prog.cu
To run interactive: (using slurm)
$ srun my-cuda-prog
To run batch: (using slurm–requires script)
$ sbatch my-cuda-script