Skip to content
Snippets Groups Projects
Commit 069877be authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Merge branch 'slurm-generator' into 'preview'

Fix Slurm Generator Issues

Closes #380 and #376

See merge request zih/hpcsupport/hpc-compendium!668
parents f38724ab 538be2f3
No related branches found
No related tags found
2 merge requests!673Automated merge from preview to main,!668Fix Slurm Generator Issues
/* universal style */
body {
margin: auto;
width: 90%;
}
img {
display: block;
}
pre {
background-color: lightgrey;
border-color: black;
border-width: 1pt;
}
.header {
background-color: #002557;
}
label.header {
color: white;
font-size: 40px;
margin: 15px;
}
.hidden {
display: none !important;
}
.info-img {
height: 20px;
width: 20px;
}
.info-pre {
display: flex;
padding: 5px;
}
.limits {
color: red;
display: none;
margin-left: 10px;
}
button.output {
padding: 8px;
background-color: rgba(231, 231, 231, 0.726);
border-color: rgba(124, 119, 119, 0.541);
border-radius: .25rem;
}
button.output:hover, button.output:focus {
background-color: #ddd;
}
div.output {
margin: 15px 0px;
}
/* tablelike layout */
.input {
display: block;
width: 70%;
}
.row {
align-items: center;
display: flex;
width: 100%;
}
.cell-name {
display: flex;
height: 25px;
justify-content: center;
align-items: center;
width: 125px;
}
.cell-tooltip {
align-items: center;
display: flex;
height: 25px;
justify-content: center;
width: 25px;
}
.cell-input {
display: flexbox;
vertical-align: middle;
}
.partition-input {
float: left;
width: 650px;
}
.partition-info {
display: flex;
float: left;
width: calc(30%);
}
/* collapsible */
.active {
background-color: #5a7094 !important;
}
.active:after {
content: "-" !important;
}
.collapsible {
background-color: #274275;
border: none;
color: #fff;
cursor: pointer;
font-size: 20px;
outline: none;
padding: 18px;
text-align: left;
width: 100%;
}
.collapsible:hover, .collapsible:focus {
text-decoration: underline;
}
.collapsible:after {
color: #fff;
content: '+';
float: right;
font-size: 20px;
font-weight:900;
margin-left: 5px;
}
.content {
background-color: #f1f1f1;
display: block;
overflow: hidden;
padding: 0 18px;
}
\ No newline at end of file
......@@ -18,21 +18,21 @@
<div class="row">
<label class="cell-name">Job name</label>
<div class="cell-tooltip">
<img class="info-img" src="../misc/info.png" title="help">
<img id="job-name-info" class="info-img" src="../misc/info.png" title="help">
</div>
<input id="job-name" class="cell-input" type="text">
</div>
<div class="row">
<label class="cell-name">Account</label>
<div class="cell-tooltip">
<img class="info-img" src="../misc/info.png" title="help">
<img id="account-info" class="info-img" src="../misc/info.png" title="help">
</div>
<input id="account" class="cell-input" type="text">
</div>
<div class="row">
<label class="cell-name">Email</label>
<div class="cell-tooltip">
<img class="info-img" src="../misc/info.png" title="help">
<img id="mail-info" class="info-img" src="../misc/info.png" title="help">
</div>
<div class="cell-input">
<input id="mail" class="mail" type="mail">
......@@ -275,7 +275,7 @@
<div class="output">
<button id="generate-button" class="output" type="button">Generate</button>
<div class="code">
<label id="output-text" class="limits">Output requieres update</label>
<label id="output-text" class="limits">Output requires update</label>
<pre id="output"></pre>
</div>
<button id="copy-button" class="output" type="button">Copy to Clipboard</button>
......@@ -288,7 +288,6 @@
'gpu2' : gpu2 = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -302,7 +301,6 @@
'gpu2-interactive' : gpu2_interactive = {
'MaxTime' : 480,
'DefaultTime' : 10,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -316,7 +314,6 @@
'haswell' : haswell = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -330,7 +327,6 @@
'haswell64' : haswell64 = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -344,7 +340,6 @@
'haswell128' : haswell128 = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -358,7 +353,6 @@
'haswell256' : haswell256 = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -372,7 +366,6 @@
'haswell64long' : haswell64long = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -386,7 +379,6 @@
'haswell64extralong' : haswell64extralong = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -400,7 +392,6 @@
'haswell64ht' : haswell64ht = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 2,
......@@ -414,7 +405,6 @@
'interactive' : interactive = {
'MaxTime' : 480,
'DefaultTime' : 30,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 12,
'threads' : 1,
......@@ -428,7 +418,6 @@
'smp2' : smp2 = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 4,
'cpu/socket' : 14,
'threads' : 1,
......@@ -442,7 +431,6 @@
'broadwell' : broadwell = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 14,
'threads' : 1,
......@@ -456,7 +444,6 @@
'ifm' : ifm = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 60,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 8,
'threads' : 2,
......@@ -470,7 +457,6 @@
'hpdlf' : hpdlf = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 60,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 6,
'threads' : 1,
......@@ -484,7 +470,6 @@
'ml-all' : ml_all = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 60,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 22,
'threads' : 4,
......@@ -498,7 +483,6 @@
'ml' : ml = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 60,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 22,
'threads' : 4,
......@@ -512,7 +496,6 @@
'ml-interactive' : ml_interactive = {
'MaxTime' : 480,
'DefaultTime' : 10,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 22,
'threads' : 4,
......@@ -526,7 +509,6 @@
'nvme' : nvme = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 60,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 8,
'threads' : 2,
......@@ -538,7 +520,6 @@
'gpu/node' : 0
},
'datamover' : datamover = {
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 8,
'threads' : 1,
......@@ -552,7 +533,6 @@
'romeo' : romeo = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 64,
'threads' : 2,
......@@ -566,7 +546,6 @@
'romeo-interactive' : romeo_interactive = {
'MaxTime' : 480,
'DefaultTime' : 10,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 64,
'threads' : 2,
......@@ -580,7 +559,6 @@
'julia' : julia = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 32,
'cpu/socket' : 28,
'threads' : 1,
......@@ -594,7 +572,6 @@
'alpha' : alpha = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 24,
'threads' : 2,
......@@ -608,7 +585,6 @@
'alpha-interactive' : alpha_interactive = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 24,
'threads' : 2,
......@@ -622,7 +598,6 @@
'htw-gpu' : htw_gpu = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 24,
'threads' : 2,
......@@ -636,7 +611,6 @@
'beaker-interactive' : beaker_interactive = {
'MaxTime' : 480,
'DefaultTime' : 10,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 16,
'threads' : 2,
......@@ -650,7 +624,6 @@
'beaker' : beaker = {
'MaxTime' : 'INFINITE',
'DefaultTime' : 480,
'info' : 'help',
'Sockets' : 2,
'cpu/socket' : 16,
'threads' : 2,
......@@ -666,27 +639,18 @@
// dictionary containing the limits for the different workspaces
const limitsWorkspace = {
'scratch' : scratch = {
'info' : 'help',
'duration' : 100,
'extensions' : 10
},
'warm_archive' : warm_archive = {
'info' : 'help',
'duration' : 365,
'extensions' : 2
},
'ssd' : ssd = {
'info' : 'help',
'duration' : 30,
'extensions' : 2
},
'beegfs_global0' : beegfs_global0 = {
'info' : 'help',
'duration' : 30,
'extensions' : 2
},
'beegfs' : beegfs = {
'info' : 'help',
'duration' : 30,
'extensions' : 2
}
......@@ -718,9 +682,13 @@
outputText.innerText += '\n#SBATCH --array='
+ document.getElementById('array').value;
}
outputText.innerText += '\n#SBATCH --time='
+ document.getElementById('time').value;
+ limits[document.getElementById('partition').value]['DefaultTime']
if (document.getElementById('time').value !== '') {
outputText.innerText += '\n#SBATCH --time='
+ document.getElementById('time').value;
} else {
outputText.innerText += '\n#SBATCH --time='
+ limits[document.getElementById('partition').value]['DefaultTime'];
}
outputText.innerText += '\n#SBATCH --partition='
+ document.getElementById('partition').value;
if (document.getElementById('nodes').value !== '') {
......@@ -820,6 +788,9 @@
outputText.innerText += '\n\n# Execute parallel application '
outputText.innerText += '\nsrun '
+ document.getElementById('executable').value;
} else {
outputText.innerText += '\n\n# Execute parallel application '
outputText.innerText += '\n# srun <file to execute>'
}
if (document.getElementById('check-workspace').checked && document.getElementById('check-delete').checked) {
......@@ -1297,6 +1268,12 @@
select.appendChild(option);
}
// set up info texts
// const infoMap = JSON.parse(text);
// for (const [key, value] of Object.entries(infoMap)) {
// document.getElementById(key + '-info').title = value['text'];
// }
// initialize UI
partitionLimitChange();
fillInfo();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment