Skip to main content

750 Machines

Executable Environment. For this C homework, the executables needs to run on a course machine. In particular, you will need to compile your source by SSH’ing into the course machine or using the VM provided. We will only support the course machines and will not be supporting any other machines. Grads To connect to the course machines you need to have VPN set up. Ugrads. You need to be logged into one of the CSIL gateway.

WARNING: As SFU has migrated to VPN, the instructions may be updated. THE CMPT 750 STAFF DO NOT CONTROL RDPing or SSHing to CSIL

IF YOU HAVE ANY QUESTIONS ABOUT CONNECTING TO CSIL PLEASE CONTACT THE DEPARTMENT TECH STAFF helpdesk@cs.sfu.ca The instructions for CSIL/RDP may be updated constantly as SFU provides more information. Please keep track of this section

RDP Access

Follow in order.

After you have remote desktop. Open Applications>Utilities>Terminal You can SSH or complete assignment tasks from terminal

  • Available Servers
  • Unselect MAC and Windows. Only have Unix selected. WARNING: DO NOT USE Connect Link

Campus/CSIL/VPN Machine to server

If you are a grad student with access already to a SFU machine you can also follow these instructions

We will be referring the 750 machines as 750-IP Host here will be the csil machine. This step assumes you have already used guacamole to connect to the csil machine

The most convenient option is to use guacamole to get yourself a virtual desktop on a csil machine and them set up remote access to the server

[750-IP]=199.60.17.236 below. You can also use 199.60.17.247 as the debugging machine.

# Instructions below assume 750-ip=199.60.17.236
# On csil rdp, any campus machine, or VPNed machine
mkdir -p ~/.ssh
chmod 700 ~/.ssh
wget "https://cmpt-7arch-sfu.github.io/website/cmpt750_rsa" -O ~/.ssh/cmpt750_rsa
chmod 600 ~/.ssh/cmpt750_rsa
ssh -i ~/.ssh/cmpt750_rsa [SFU_ID]@[750-ip]
# on 750 server
cd ~/.ssh/
ssh-keygen -t rsa
cat id_rsa.pub >> ~/.ssh/authorized_keys
exit
# On csil rdp, any campus machine, or VPNed machine
scp -i ~/.ssh/cmpt750_rsa [SFU_ID]@[750-IP]:~/.ssh/id_rsa new_rsa
ssh -i new_rsa [SFU_ID]@[750-IP]

If above steps work then you will be able to add the following to your ~/.ssh/config

# ssh/config
Host ARCH-750-1
HostName [750-IP]
IdentityFile ~/.ssh/new_rsa
User [SFUID]

You can now use remote vscode with remote ssh extension to access files on the server.

Vscode Remote You will use the ARCH-750-1 for vscode connections.

Host[Desktop/Laptop] - gateway.csil - server

Gateway access may not work if you are on VPN or in campus. If you have machine already on VPN; follow advice above Campus/CSIL/VPN Machine to server

These instructions are for students without access to VPN And trying to connect their mac/linux laptop to server

WARNING: You have to first ssh using instructions below to connect to a gateway server If unable to connect to gateway that means SFU has blocked access. Please contact helpdesk@cs.sfu.ca.

The SSH command will be like this:

# on laptop/desktop
$ ssh -p 24 [SFU_ID]@gateway.csil.sfu.ca
# This will prompt for password and OTP (one time password)
# For password use your csil/sfu password
# For OTP use MFA set up above
# On gateway
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ wget "https://cmpt-7arch-sfu.github.io/website/cmpt750_rsa" -O ~/.ssh/cmpt750_rsa
$ chmod 600 ~/.ssh/cmpt750_rsa
$ ssh -i ~/.ssh/cmpt750_rsa [SFU_ID]@[750-IP]
# on 750 server
cd ~/.ssh/
ssh-keygen -t rsa
cat id_rsa.pub >> ~/.ssh/authorized_keys
exit
# on gateway
scp -i cmpt750_rsa [SFU_ID]@[750-IP]:~/.ssh/id_rsa ~/.ssh/new_rsa
ssh -i ~/.ssh/new_rsa [SFU_ID]@[750-IP]

To access server from laptop/desktop follow instructions below after completing gateway step.

# First copy new_rsa from gateway to your local ssh
# These are instructions for mac and linux; adapt it for windows
# On laptop/desktop
$ mkdir -p ~/.ssh; chmod 700 ~/.ssh
$ scp -P 24 gateway.csil.sfu.ca:~/.ssh/new_rsa ~/.ssh/
$ chmod 600 ~/.ssh/new_rsa

# Add the following to your ~/.ssh/config file
# If it does not exist create one.
Host csil-bounce
HostName gateway.csil.sfu.ca
User [CSIL ID]
ServerAliveInterval 120
Port 24

Host ARCH-750-1
HostName [750-IP]
User [CSIL ID]
IdentityFile ~/.ssh/new_rsa
ProxyCommand ssh csil-bounce nc %h 22

# Now you can ssh directly to csil machine
# with the gateway implicitly forwarding connections.
$ ssh ARCH-750-1

You can now use remote vscode with remote ssh extension to access files on the server. https://code.visualstudio.com/docs/remote/ssh You will use the ARCH-750-1 for vscode connections.

WARNING: Pre-requistes are expected to let you know how pull up a terminal in linux If not, read tutorials below and self-learn

Campus/CSIL/VPN Machine to server

In addition to ARCH-750-1 we have also included access to another server. This server you can access using your SFU login. From within SFU network you can access this server using the following command. We would advise that you have set up ssh keys to access this server immediately after you obtain access

ssh [SFU_ID]@cs-arch-srv03.cmpt.sfu.ca

Running jobs on server

All jobs on server will be submitted through slurm

Working remotely

Warning: Instructions in this section are for self learning They are provided here without any additional support We will not respond to any questions on piazza

Follow instructions to connect using gateway before this step

Also the video instructions assume here you are trying to connect to CSIL If you followed gateway steps then simply use the ARCH-750-1 setup

Overview. We will be tunnelling our edits to files and commands over ssh in particular over remote ssh extension under vscode. Figure below provides an overview. This permits us to locally run the vscode editor (on your laptop) while editing files on remote csil machines and running commands remotely on linux.

Modules

CMPT 750 relies on a set of customized compilers and software. We uses modules to manage the user environment for different third-party software versions. The advantage of the modules approach is that the user is no longer required to explicitly specify paths for different executable versions. If custom modules are required then they will be specified in the assignment If you do not want to. Add the following commands below to your .bashrc or .zshrc found in your home directory ~/ .

# on 750 machine
# Add the following to your path
$ export MODULE_HOME=/data/.local/modules/Modules/4.3.0/modulefiles
$ export PACKAGE_HOME=/data/.local/packages
$ export PATH=$PATH:/data/.local/environment-modules/Modules/4.3.0/bin
$ export LD_LIBRARY_PATH=/data/.local/Tcl/lib:$LD_LIBRARY_PATH
$ source /data/.local/modules/init/zsh
# list available software
$ module avail
# Load compilers
$ module load [Module name]

Linux Cheats

Your home directory is shared between the CPU servers, so you can copy files to or from there by connecting to one of the CPU servers. The files will be available on the workstations. Copying files to CSIL will be something like:

Linux Interactions

These assignments may need you to navigate through multiple source files. If you do not have a favorite editor then I would highly recommend the following. [emacs] is already installed in CSIL and VM. vscode, installed in your VM.

Gem5 Simulator