Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
HPC - JGU - Physics Simulations
ab-initio Simulations
Commits
72142522
Commit
72142522
authored
Dec 22, 2018
by
Christian Meesters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working version
parent
3a18acfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
orca_wrap.sh
orca_wrap.sh
+10
-14
No files found.
orca_wrap.sh
100644 → 100755
View file @
72142522
...
...
@@ -202,8 +202,8 @@ do
shift
done
_positional_names
=(
'_arg_inputdir'
)
for
((
ii
=
0
;
ii <
2
;
ii++
))
;
do
_positional_names
=(
'_arg_inputdir'
)
for
((
ii
=
0
;
ii <
1
;
ii++
))
;
do
eval
"
${
_positional_names
[ii]
}
=
\$
{_positionals[ii]}"
||
die
"Error during argument parsing, possibly an Argbash bug."
1
done
...
...
@@ -241,37 +241,33 @@ if [ -z "$SLURM_JOB_ID" ]; then
### check if output directory already exists
if
[[
!
-d
"
${
_arg_outdir
//
}
"
]]
;
then
_arg_outdir
=
"
$(
pwd
)
/
${
_arg_tag
}
"
mkdir
-p
"
${
_arg_outdir
}
"
mkdir
-p
"
${
_arg_outdir
/%j/
}
"
else
error
"
${
_arg_outdir
//
}
exists already! Possibly over overwrite of results. Cowardly giving up."
fi
sbatch
-A
"
${
_arg_assoc
}
"
-p
parallel
-J
"
${
_arg_tag
}
"
-o
"
${
_arg_outdir
}
"
-n
40
-t
120:00:00
--signal
=
B:SIGUSR2@600
-N
1
--wrap
"
$(
cat
<<
EOF
set -x
cleanup(){
cp /localscratch/
${
SLURM_JOB_ID
}
/* "
\$
{_arg_outdir}"
}
trap 'cleanup' SIGUSR2
cp
$sample
/localscratch/
\$
{SLURM_JOB_ID}
scratch=/localscratch/
\$
{SLURM_JOB_ID}
cp
$sample
"
\$
scratch"
# Go to jobdir and start the program
cd /localscratch/
\$
{SLURM_JOB_ID}
set OMPI_MCA_btl=self,sm
orca
$sample
eval
$(
which orca
)
"
\$
scratch"/
$(
basename
$sample
)
cleanup
EOF
)
"
done
fi
https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
EOF
)
#./orca.sh ${sample}
done
fi
#
done
#
fi
https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
#
https://stackoverflow.com/questions/53071681/use-of-a-heredoc-with-slurm-sbatch-wrap
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment