Title | Exam March 2019 |
---|---|
Course | Chemical Thermodynamics |
Institution | Εθνικό Μετσόβιο Πολυτεχνείο |
Pages | 2 |
File Size | 106.5 KB |
File Type | |
Total Downloads | 75 |
Total Views | 153 |
FGFGFGFG ...
ACCRE Cheat Sheet Guide to Linux, Lmod and SLURM commands
Viewing and editing text files cat filePrint entire content of filename more f ileIncrementally display content of filename less f ileSimilar to more, but with additional features
Accessing ACCRE
head f ileDisplay file header tail f ileDisplay file footer emacsExtensible and customizable text editor
Logging in from a terminal login.accre.vanderbilt.edu ssh vunetid@ Transferring files between ACCRE and your system scp source v unetid@ login.accre.vanderbilt.edu:destination login.accre.vanderbilt.edu:source d scp vunetid@ estination
vimMinimalist yet powerful text editor nanoSimple text editor
More advanced file management chmodChanges read/write/execute permissions
Windows/Mac clients: PuTTY SSH client for Windows WinSCPSCP client for Windows FileZilla FTP client for Linux, Windows, Mac
which cmdLists the full file path of a command whereis cmd Lists possible file paths of a command du dirLists size of directory dir and its subdirectories
Xming/XQuartz X11 server for Windows/Mac
Basic Linux file management
findFinds files in a directory
Aliases and system variables
man command Displays the manual page for command
aliasAutomatically replace one command with another
pwd Prints out the present working directory lsLists the files in the current directory ls -lh Show long listing of files ls -a Show hidden files as well
envLists all system variables export v ar = valCreate environment variable $var and set value to val echoPrint text to the screen
ls d ir Lists files inside directory dir rm file Deletes file mkdir d ir Creates empty directory called dir rmdir d ir Removes empty directory dir
nd all of its content rm -r d ir Removes directory dir a cd d ir Changes directory to dir cd .. Changes working directory to parent
echo $varPrint the value of variable var .bashrc Define default aliases and system variables
Input and output redirection $(command)Runs the command inside $() first, then inserts the output to the rest of the command. Same as putting grave marks (`) between the command
cd Changes working directory to home
Standard output redirection
cp f ile d ir Makes a copy of file file inside directory dir
2>Standard error redirection
mv f ile1 f ile2 Renames file file1 as file2 mv f ile d ir Moves file file inside directory dir cp -i, mv -i Display a warning before copying or moving to an existing file path rm -i Display a warning before removal ~ (tilde)Home directory . (period) Current directory .. (double dot) Parent directory wget URL Downloads a file from URL in Internet unzip f ile .zipExtract a ZIP file tar xzf Extract a gz compressed tarball file.tar.gz
2>&1Standard error and output redirection
cmd1 | cmd2Pipe command; redirects output of command cmd1 to input of cmd2
Filters wcWord count grepGets a regular expression and prints it sortSort input uniqFilter duplicate lines cutCuts specific fields or columns sedStream editor for search and replace awkExtensive tool for complex filtering tasks
vanderbilt.edu/accre ● Hill Center Suite 201 ● 1231 18th Ave. South, Nashville, TN 37212-2807
Revised 3/2019
Cluster directories /home GPFS, backed up nightly /data GPFS, backed up nightly /dors GPFS, backed up nightly /scratch GPFS, higher quotas, not backed up /tmpTemporary local storage for I/O intensive tasks
Lmod
#SBATCH directives (continued) --time= minTime limit; either min or dd-hh:mm:ss --mem= count RAM per node; e.g. 5G --output= file Standard output; defaults to slurm-jobid. out if omitted --error=fileWrite standard error to file --array= arrayspecDefine job array
module availShows all available modules module load moduleLoads module in the environment module spider stringSearches for module names matching string module keyword stringSearches for modules containing string in name or description module listList currently loaded modules module unload moduleRemoves module from environment module purgeRemoves all modules from environment module save collectionSaves currently loaded modules to collection module savelist Returns all saved modules collections module describe Get modules in a saved collection module restore Restore modules from collection collection
--gres=gpu: cores GPUs per process --mail-user= emailEmail for job alerts --mail-type= type Email alert types: BEGIN, END, FAIL, REQUEUE, ALL --account= accountAccount to charge --depend= state :j obidJob dependency. state = after, afterok, afterany, afternotok --job-name= nameJob name --constrain=attribute Request CPU type: westmere, sandy_bridge, haswell, eight, twelve, sixteen --partition= name Submit to partition: production, debug, maxwell, pascal
SLURM Environment Variables SLURM_JOBID Job ID SLURM_SUBMIT_DIR Job submission directory SLURM_SUBMIT_HOST Name of host from which job was submitted
SLURM sbatch filenameSubmits a job script filename squeue -u vunetidShow job queue for user vunetid scancel jobidDeletes the job with jobid scontrol hold jobidHold job jobid scontrol release jobidRelease job jobid sinfo Cluster status sallocStarts an interactive job xallocStarts an interactive job with X window support
SLURM_JOB_NODELIST Names of nodes allocated to job SLURM_ARRAY_TASK_ID Task id within job array SLURM_JOB_CPUS_PER_NODE CPU cores per node allocated to job SLURM_NNODESNumber of nodes allocated to job
ACCRE-specific utilities accre_storage Check storage quota usage rtracejob jobidCheck resources utilization for job jobid q3Get recent jobs by user, group and account
srunLaunch parallel job step sacct Display job accounting information
#SBATCH directives --nodes=count Number of nodes --tasks-per-node= countProcesses per node --ntasks= countTotal processes --cpus-per-task=count CPU cores per process --nodelist=nodes Preferred nodes --exclude= nodesNodes to avoid
qSummary -g groupQueue summary for group and its users showLimits -g groupGet resource limits for specific group SlurmActive Show cluster’s CPU/node utilization gpustateShow GPU cluster utilization sinfofeatures Get node availability based on features slurm_groupsList your SLURM group membership
vanderbilt.edu/accre ● Hill Center Suite 201 ● 1231 18th Ave. South, Nashville, TN 37212-2807
Revised 3/2019...