Skip to content

Commit 80d9f33

Browse files
2026022 - clean up
1 parent 94a4503 commit 80d9f33

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

hpc.qmd

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,22 @@ Mac OS Terminal:
7171
`ssh -p 40 itpetersen@argon.hpc.uiowa.edu` (off campus without VPN)
7272

7373
# General Commands
74-
```
75-
- `pwd` print current working directory
76-
- `cd path/to/directory` sets working directory
77-
- `ls` print files in directory
78-
- `module load moduleName` loads modules required for analyses; necessary to complete prior to submitting jobs involving R
79-
- `module list` lists downloaded modules
80-
- `qsub` submit a job script to Argon processing
81-
- `R CMD BATCH` submit a single R script to Argon processing
74+
75+
- `pwd` print current working directory
76+
- `cd path/to/directory` sets working directory
77+
- `ls` print files in directory
78+
- `module load moduleName` loads modules required for analyses; necessary to complete prior to submitting jobs involving R
79+
- `module list` lists downloaded modules
80+
- `qsub` submit a job script to Argon processing
81+
- `R CMD BATCH` submit a single R script to Argon processing
8282
Argon requires Linux-compatible file endings, which is problematic for files created outside Argon (using DOS or CRLF file endings). Use the following commands to check if your files are Argon compatible (i.e., Unix LF) and resolve incompatible file endings:
83-
- `file myfile.job | grep CRLF` checks if a file ending uses the incompatible CRLF format. Remember to check the ending of your file; this script assumes it is .job
84-
- `dos2unix myfile.job` converts CRLF file endings to Argon-compatible LF endings
85-
- `find ~/DirectoryName -name '*job' -exec dos2unix "{}" \;` converts all files in a directory that end with .job to LF format; change '*job' to change other file types
86-
```
83+
- `file myfile.job | grep CRLF` checks if a file ending uses the incompatible CRLF format. Remember to check the ending of your file; this script assumes it is .job
84+
- `dos2unix myfile.job` converts CRLF file endings to Argon-compatible LF endings
85+
- `find ~/DirectoryName -name '*job' -exec dos2unix "{}" \;` converts all files in a directory that end with .job to LF format; change '*job' to change other file types
8786

8887
# Access Project Directories
8988

90-
```
89+
```bash
9190
cd /Users/itpetersen/Documents/Projects/Bayesian_IRT/
9291
cd /Users/itpetersen/Documents/Projects/EXT_pilot/
9392
cd /Users/itpetersen/Documents/Projects/Multiple_Imputation/
@@ -241,17 +240,17 @@ Steps:
241240
apptainer exec r_argon.sif R
242241
```
243242
- Check `R` version:
244-
```R
243+
```r
245244
version
246245
```
247246
- Check `R` packages:
248-
```R
247+
```r
249248
library("brms")
250249
library("cmdstanr")
251250
library("petersenlab")
252251
```
253252
- Exit `R`
254-
```R
253+
```r
255254
q()
256255
```
257256
1. Copy the Container to Your Computer
@@ -267,17 +266,17 @@ Steps:
267266
apptainer exec r_argon.sif R
268267
```
269268
- Check `R` version:
270-
```R
269+
```r
271270
version
272271
```
273272
- Check `R` packages:
274-
```R
273+
```r
275274
library("brms")
276275
library("cmdstanr")
277276
library("petersenlab")
278277
```
279278
- Exit `R`
280-
```R
279+
```r
281280
q()
282281
```
283282
1. Submit a Job Using the Container on Argon
@@ -399,19 +398,20 @@ apptainer exec /Users/itpetersen/Documents/Containers/r_argon.sif \
399398

400399
### qsub options
401400

402-
`-pe smp 4`: specify a parellel environment and number of cores to be used (`smp` = shared memory parallel environment)
403-
- The `OMP_NUM_THREADS` variable is set to '1' by default.
401+
`-pe smp 4`: specify a parallel environment and number of cores to be used (`smp` = shared memory parallel environment)
402+
403+
- The `OMP_NUM_THREADS` variable is set to '1' by default.
404404
If your code can take advantage of the threading then specify `OMP_NUM_THREADS` to be equal to the number of job cores per node requested.
405405

406406
`-M isaac-t-petersen@uiowa.edu`: Set the email address to receive email about jobs. This must be your University of Iowa email address.
407407

408408
`-m eas`: Specify when to send an email message (; ; ; ; )
409409

410-
- `b` = beginning of job
411-
- `e` = end of job
412-
- `a` = when job is aborted
413-
- `s` = when job is suspended
414-
- `n` = no mail is sent
410+
- `b` = beginning of job
411+
- `e` = end of job
412+
- `a` = when job is aborted
413+
- `s` = when job is suspended
414+
- `n` = no mail is sent
415415

416416
`-l mf=512G`: request a particular quantity of memory you expect to use (to be available for your computation to start; the request is only applicable at scheduling time. It is not a limit.)
417417

@@ -485,8 +485,8 @@ Job dependency (run `Job B` when `Job A` is finished):
485485

486486
## Job Time and Memory
487487

488-
- Terminated jobs: `qacct -j JOB_ID`
489-
- Jobs in progress: `qstat -j JOB_ID | grep usage`
488+
- Terminated jobs: `qacct -j JOB_ID`
489+
- Jobs in progress: `qstat -j JOB_ID | grep usage`
490490

491491
## Cancel Job
492492

@@ -523,7 +523,7 @@ If you want to compile a more recent version of `R` than is available in the sof
523523
- If using `packrat`, it is preferable to install packages by source, if possible, but you can remove `type = source` if you want to install binaries
524524
- Assuming that you do not have a personal library directory you will see
525525

526-
```
526+
```r
527527
Warning in install.packages("package_name", repos = "http://cran.r-project.org") :
528528
lib = "/opt/R/3.0.2/lib64/R/library"' is not writable
529529
@@ -597,7 +597,7 @@ If you want to control which packages are installed in a `renv` project, you can
597597
598598
1. Create a `DESCRIPTION` file in the project directory with the following format:
599599
600-
```
600+
```yaml
601601
Type: project
602602
Description: My project.
603603
Depends:
@@ -747,7 +747,7 @@ install.packages(verbose = 1, "tkrplot")
747747
748748
## Error Reading from Connection
749749
750-
```
750+
```r
751751
Error in unserialize(node$con) : error reading from connection
752752
Calls: parlmice ... FUN -> recvData -> recvData.SOCK0node -> unserialize
753753
```

0 commit comments

Comments
 (0)