Commit fa11f653 authored by ulrich_y's avatar ulrich_y
Browse files

Image can take argument for user file

parent 1638e2d7
......@@ -136,7 +136,7 @@ def rm_main(parsed):
runfiles = set(
i
for i in files
if os.path.splitext(i)[1] in ['.menu', '.sh', '.conf']
if os.path.splitext(i)[1] in ['.menu', '.sh', '.conf', '.f95']
)
for fn in files - runfiles:
......
......@@ -243,9 +243,17 @@ do
echo "Using Docker image $img"
containerid=$(udocker create $img)
echo "Created container $containerid"
userpath=`dirname $this`/user-$img-${SLURM_JOB_ID}.f95.gz
echo udocker run $containerid cat /monte-carlo/src/user.f95
udocker run $containerid cat /monte-carlo/src/user.f95 | gzip > $userpath
udocker protect $containerid
if [ -n "$2" ]; then
userpath=$2
echo "Copy user file $userpath"
cat $userpath | udocker run $containerid sh -c "cat > /monte-carlo/src/user.f95"
udocker run $containerid sh -c "cd /monte-carlo && touch src/mat_el.f95 && make" || exit
else
userpath=`dirname $this`/user-$img-${SLURM_JOB_ID}.f95.gz
echo udocker run $containerid cat /monte-carlo/src/user.f95
udocker run $containerid cat /monte-carlo/src/user.f95 | gzip > $userpath
fi
patchpath=`dirname $this`/diff-$img-${SLURM_JOB_ID}.patch.gz
echo udocker run $containerid sh -c "cd /monte-carlo && git diff"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment