Zhiguang Huo (Caleb)
Wednesday September 15, 2021
Acceptable Use Policy
I acknowledge that the access to the HPC resources operated by UF Research Computing is subject to the UF Acceptable Use Policy at https://it.ufl.edu/policies/acceptable-use/acceptable-use-policy/ and the Research Computing policies at http://www.rc.ufl.edu/services/procedures/ and that I am responsible for following these policies.
I also certify that using restricted data and software on the HPC resources requires extra steps described at UFRC Policies and at UFRC Export Policies, and that I will notify both my account sponsor and the Office of Research (Research Compliance) and Research Computing at support.rc.ufl.edu when I am working with such data.
These usages can be applied to other Linux machines.
You can transfer files between your local computer and hiperGator
## open interactive R session
module load ufrc
srundev --account=phc6068 --qos=phc6068 --time=04:00:00
module load R ## load R
R
## open interactive R session
srun --account=phc6068 --qos=phc6068 --ntasks=1 --cpus-per-task 1 --mem=8gb --time=04:00:00 --pty bash -i
module load R ## load R
R
## do the following on hiperGator
getwd()
dir()
head(cars)
mycars <- cars
write.csv(mycars, "mycars.csv")
dir()
#!/bin/sh
#SBATCH --job-name=serial_job_test # Job name
#SBATCH --account=phc6068 # your own sponser or account from this class
#SBATCH --qos=phc6068 # your own sponser or account from this class
#SBATCH --mail-type=ALL # Mail events
#SBATCH --mail-user=xx@xx.xx # Where to send email
#SBATCH --ntasks=1 # Run on a single machine (node)
#SBATCH --cpus-per-task 1 # Run on a single CPU
#SBATCH --mem=8gb # Memory limit
#SBATCH --time=04:00:00 # Time: hrs:min:sec
#SBATCH --output=serial_test_%j.out # Output and error log
pwd; hostname; date
module load R
echo "Running save cars script on a single CPU core"
R CMD BATCH saveCars.R ## make sure saveCars.R is at your current working directory
## R --no-save --quiet --slave < saveCars.R ## alternative way
date
cd /blue/phc6068/share/zhuo/example/testR
sbatch saveCars.slurm ## submit job
cd /blue/phc6068/share/zhuo/example/testR
cat serial_test_25280301.out ## you may have your own log file name
head serial_test_25280301.out ## you may have your own log file name
more serial_test_25280301.out ## you may have your own log file name
cd /blue/phc6068/share/zhuo/example/testR
cat saveCars.Rout
cd /blue/phc6068/share/zhuo/example/testR
cat mycars.csv
#!/bin/sh
#SBATCH --job-name=serial_job_test # Job name
#SBATCH --account=phc6068 # your own sponser or account from this class
#SBATCH --qos=phc6068 # your own sponser or account from this class
#SBATCH --mail-type=ALL # Mail events
#SBATCH --mail-user=xx@xx.xx # Where to send email
#SBATCH --ntasks=1 # Run on a single machine (node)
#SBATCH --cpus-per-task 1 # Run on a single CPU
#SBATCH --mem=8gb # Memory limit
#SBATCH --time=04:00:00 # Time: hrs:min:sec
#SBATCH --output=serial_test_%j.out # Output and error log
pwd; hostname; date
module load R
echo "Running save cars script on a single CPU core"
R --no-save --quiet --slave --args 1 < saveCarsArgs.R ## again, make sure the R file is at your current working directory.
date
cd /blue/phc6068/share/zhuo/example/testR2
sbatch saveCarsArgs.slurm ## submit job
cd /blue/phc6068/share/zhuo/example/testR2
cat serial_test_25280860.out ## you may have your own log file name
R --no-save --quiet --slave --args 1 < saveCarsArgs.R
cd /blue/phc6068/share/zhuo/example/testR2
cat arg1.csv
#!/bin/sh
#SBATCH --job-name=serial_job_test # Job name
#SBATCH --account=phc6068 # your own sponser or account from this class
#SBATCH --qos=phc6068 # your own sponser or account from this class
#SBATCH --mail-type=ALL # Mail events
#SBATCH --mail-user=xx@xx.xx # Where to send email
#SBATCH --ntasks=1 # Run on a single machine (node)
#SBATCH --cpus-per-task 1 # Run on a single CPU
#SBATCH --mem=8gb # Memory limit
#SBATCH --time=04:00:00 # Time: hrs:min:sec
#SBATCH --output=serial_test_%j.out # Output and error log
pwd; hostname; date
module load R
for i in {2..10}
do
echo "Running save cars" $i
R --no-save --quiet --slave --args $i < saveCarsArgs.R
done
date
cd /blue/phc6068/share/zhuo/example/testR3
sbatch saveCarsArgsLoops.slurm ## submit a loop job
Since our entire class share these resouces, please plan ahead when you work on your HWs. Using the hiperGator at the last minute may make you compete with other students for resources.
If all computing resources are occupied