Resource for common modifiers for HPC Load Sharing Facility (LSF): https://hpc-wiki.info/hpc/LSF
Recourse for common Linux commands: https://drive.google.com/file/d/1V4Fv7V1yQopjDt-kTcKWEgDNxo3swsVs/view?usp=sharing
HPC tutorials: https://projects.ncsu.edu/hpc/Documents/hpc_links.php
Text in bold green represent code options that must be user specified
Red text represents dire warnings that must be heeded!
Reminder, if working off campus you MUST be connected to NCSU SSL VPN.
To login to HPC using a terminal you will need to use your unique NC State Unity ID to adapt the following command:
ssh YourUnityID@login.hpc.ncsu.edu
Once you have submitted this command, you will be prompted to enter your NCSU password. Do not be alarmed when you do not see any characters typed
This will set you in you home space (where you cannot do work because it has basically no storage space). You can confirm your location by using the command 'pwd' to print your working directory
You should get a response of /home/YourUnityID
YourUnityID must be customized to your actual UnityID. Ex: Dr. Sjogren's UnityID is casjogre.
Do not do any work in your home directory or on the head node. Only use our class directory and submit work as a job to the scheduler.
To edit a file that is uploaded to the HPC you can use the command vi:
vi NameOfFile
To use the functionality of vi to edit:
i = edit mode
Ecs = stop edit mode
:wq = quit with save changes
:q! = quit without saving
:noh = clear yellow highlighting within the script
If you are having issues with hidden characters (like ^M) you can view those by vi -b:
vi -b NameOfFile
See more about this here: https://sites.google.com/ncsu.edu/bitcpt-spring23/begin-using-the-hpc-at-ncsu/m-bad-interpreter
Both of these options are written out as being run on your local machine.
Send files from your local machine to the HPC
scp /local_machine_path/filename UnityID@login.hpc.ncsu.edu:/share/bitcpt/Fall2022/UnityID
scp is the command
The next two arguments are the addresses of the file to be sent (FROM) and where it is being sent (TO):
FROM: /local_machine_path/filename is the source path ending in your filename.
On you desktop, the path is often /Users/username/Desktop/ where your username is whatever your PC/Mac device is named
TO: UnityID@login.hpc.ncsu.edu:/share/bitcpt/Fall2022/UnityID is the delivery path ending in the directory you want your file delivered to.
Send files from the HPC to your local machine
scp UnityID@login.hpc.ncsu.edu:/share/bitcpt/Fall2022/UnityID /local_machine_path/filename
scp is the command
The next two arguments are the addresses of the file to be sent (FROM) and where it is being sent (TO):
FROM: TO: UnityID@login.hpc.ncsu.edu:/share/bitcpt/Fall2022/UnityID is the delivery path ending in the directory you want your file delivered to.
TO: /local_machine_path/filename is the source path ending in your filename.
On you desktop, the path is often /Users/username/Desktop/ where your username is whatever your PC/Mac device is named
In the directory where you want to make the script type
vi jobname.sh
hit the 'i' key to enter insert mode
Paste the script with right click
Hit 'esc' to exit insert mode
Type :wq to save and exit
Make sure to view your script and make sure it copies and pasted correctly. Common issues to check for are:
1) If you forget to hit 'i' before pasting, then the shebang header is almost always cut off. So check the very first line.
2) Depending on where the code is copied from, arguments longer than one line can be broken into two lines instead of one. Make sure arguments are all together in one line.
In the directory where you want to make the script type
cat > jobname.sh
Hint enter. There should appear a blank space.
You can now paste the script from your clipboard with right click.
Once the script is pasted in, hit the 'ctrl' and 'c' keys at the same time to save and exit.
Change directory
cd path/to/desired/directory
Copy a file
cp path/to/desired/SourceDirectory/FileToCopy path/to/desired/CopyToDirectory/FileToCopy
Move a file
mv path/to/desired/SourceDirectory/FileToMove path/to/desired/MoveToDirectory/FileToMove
List contents of current working directory
ls
list short
ll
list long
Submitting a job to the LSF
bsub < job.sh
(example: bsub < starindex.sh)
bsub without <job.sh will take you into a loop where you will need to "kill" your job
Killing a errant job
bkill JOBID#
(example: bkill 267358)
Check the status of your jobs
bjobs
To read a file
more
To change modifications of a directory for read write execute permissions to your Linux group
chmod g=rwx yourdirectory/