Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sergey Kireev
nle
Commits
43146375
Commit
43146375
authored
Oct 24, 2021
by
Sergey Kireev
Browse files
gst script added
parent
c7e5faaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
nle_cpp/scripts/run_multiple/do_datfin2gst.sh
0 → 100755
View file @
43146375
#!/bin/bash
source
./do_parameters.sh
min_group_size
=
10
fromdir
=
"dat_
${
nt
}
"
target
=
"gst.txt"
# Check if executable is present
[
-x
$executable
]
||
{
echo
"Error: executable file '
${
executable
}
' not found!"
;
exit
;
}
# Check if source directory is present
[
!
-d
${
fromdir
}
]
&&
{
echo
"Directory
${
fromdir
}
does not exist!"
;
exit
;
}
# Check if target is present
[
-f
${
target
}
]
&&
{
echo
"Terget file
${
target
}
already exist!"
;
exit
;
}
init_iteration
while
next_iteration
;
do
name
=
$(
get_name
)
source
=
$fromdir
/
${
name
}${
suffix
}
tmpfile
=
`
mktemp
-u
-p
.
`
#echo ${name}
# Run simulation
${
executable
}
-
$cell
-nsize
$nsize
-nx
$nx
-ny
$ny
-it
$nt
-nt
0
-load
$source
\
-en
$en
-enl
$enl
-el
$el
-kt
$kt
-mu
$mu
-g
$pgroup
\
-evap
$evap
-cond
$cond
-ipn
$ipn
-ipl
$ipl
-ipe
$ipe
\
-gstlog
$tmpfile
-gstmin
$min_group_size
\
-short
${
nle_args
}
|
tee
${
name
}
.txt
# check exit code
[
${
PIPESTATUS
[0]
}
-eq
0
]
||
{
rm
-r
$name
;
exit
;
}
post_run
$name
line
=
`
grep
"^
$nt
"
$tmpfile
`
echo
"
$en
$enl
$el
$line
"
>>
$target
rm
${
name
}
.txt
rm
$tmpfile
done
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