-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
118 lines (110 loc) · 5.49 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="generator" content="jemdoc, see http://jemdoc.jaboc.net/" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="jemdoc.css" type="text/css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<title>Some Examples</title>
</head>
<body>
<table summary="Table for page layout." id="tlayout">
<tr valign="top">
<td id="layout-menu">
<div class="menu-category">Home</div>
<div class="menu-item"><a href="index.html">About</a></div>
<div class="menu-item"><a href="term-of-service.html">Term of Service</a></div>
<div class="menu-item"><a href="quick-start.html">Quick Start</a></div>
<div class="menu-item"><a href="web-portal.html">Web Portal</a></div>
<div class="menu-category">Features</div>
<div class="menu-item"><a href="login.html">Log In</a></div>
<div class="menu-item"><a href="env-setting.html">Environment</a></div>
<div class="menu-item"><a href="interactive-task.html">Interactive Task</a></div>
<div class="menu-item"><a href="batch-task.html">Batch Task</a></div>
<div class="menu-item"><a href="example.html" class="current">Job Example</a></div>
<div class="menu-item"><a href="installation.html">Installation</a></div>
<div class="menu-item"><a href="transferfile.html">File Transfer</a></div>
<div class="menu-category">Quick Link</div>
<div class="menu-item"><a href="https://hpc.uicstat.com/codehub">Code-Hub</a></div>
<div class="menu-category">Maintenance Group</div>
<div class="menu-item"><a href="recruit.html">Join Us</a></div>
</td>
<td id="layout-content">
<div id="toptitle">
<h1>Some Examples</h1>
</div>
<p>In this page, we provide some script examples to illustrate how to submit a job. User can customize the script with these examples.</p>
<h3>For MATLAB user</h3>
<p>For now, MATLAB is no supported via the web portal, thus, user can only submit their MATLAB jobs via the terminal.Here is an example:</p>
<div class="codeblock">
<div class="blocktitle">MATLAB job script</div>
<div class="blockcontent"><pre>
#!/bin/bash
#SBATCH -J test # The job's name is test
#SBATCH -N 1 # allocate 1 node
#SBATCH -p CPU-Compute-1 # submit the job to cpu partition
#SBATCH --cpus-per-task=4 # allocate 4 cpu cores
#SBATCH -t 1-00:00:00 # runtime: 1 day
module load computing/MATLAB/2021b # activate the MATLAB-R2018a/MATLAB-R2020b PATH
# use MATLAB to run the "Test.m" file
proxychains4 matlab -nodesktop -nosplash -nodisplay -r "Test"
</pre></div></div>
<p>Since the MATLAB is authenticated via the ITSC MATLAB License Server, <tt>proxychains4</tt> is needed before we run the MATLAB; <tt>matlab -nodesktop -nosplash -nodisplay</tt> means disable the MATLAB GUI and welcome page, <tt>-r</tt> means excecute the MATLAB command. The file name is “Test.m”, however, in the script, we need to remove the “.m”</p>
<p><tt>Attention: the node: Compute2030005000 CANNOT run the MATLAB code with symbolic variables, please submit your task to other nodes</tt></p>
<h2>For GPU user</h2>
<div class="codeblock">
<div class="blocktitle">GPU job script</div>
<div class="blockcontent"><pre>
#!/bin/bash
#SBATCH -J gpu-job # The job's name gpu-job
#SBATCH --cpus-per-task=8 # allocate 8 cpu cores
#SBATCH -p GPU-Compute-1 # submit the job to gpu partition
#SBATCH --gres=gpu:1 # allocate 1 graphic card
#SBATCH -t 1-00:00:00 # runtime: 1 day
module load compiler/cuda/10.2 # activate CUDA PATH
nvcc --arch=sm_60 code.cu -o output
</pre></div></div>
<h2>For R user</h2>
<p>It is easy for you run the <tt>R</tt> script with SLURM, here is an example, assumes that we want to run <tt>job.R</tt>, with conda-based R environment:</p>
<div class="codeblock">
<div class="blocktitle">R job script</div>
<div class="blockcontent"><pre>
#!/bin/bash
#SBATCH -J R-job # The job's name R-job
#SBATCH --cpus-per-task=8 # allocate 8 cpu cores
#SBATCH -p CPU-Compute-1 # submit the job to CPU partition
#SBATCH --gres=gpu:1 # allocate 1 graphic card
#SBATCH -t 1-00:00:00 # runtime: 1 day
module load computing/conda/5.3.1
source activate environment_name
Rscript --vanilla job.R
</pre></div></div>
<h2>For Python User</h2>
<p>It is easy for you to run the <tt>Python</tt> Script with SLURM, here is an example, assumes that we want to run <tt>job.py</tt>, with conda-based Python environment:</p>
<div class="codeblock">
<div class="blocktitle">R job script</div>
<div class="blockcontent"><pre>
#!/bin/bash
#SBATCH -J R-job # The job's name R-job
#SBATCH --cpus-per-task=8 # allocate 8 cpu cores
#SBATCH -p CPU-Compute-1 # submit the job to CPU partition
#SBATCH --gres=gpu:1 # allocate 1 graphic card
#SBATCH -t 1-00:00:00 # runtime: 1 day
module load computing/conda/5.3.1
source activate environment_name
python job.py
</pre></div></div>
<h2>For others</h2>
<p>You can also use the script generator we provide to generate a runable script, <tt>HOWEVER, the generator is in testing</tt>, this means it may generate a un-runable script!</p>
<iframe width="800" height="500" src="https://uicstat.com/Slurm-Script-Generator/" frameborder="0" allowfullscreen></iframe>
<div id="footer">
<div id="footer-text">
Page generated 2022-03-07 11:28:46 CST, by USBC Maintenance Group
</div>
</div>
</td>
</tr>
</table>
</body>
</html>