-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored between picksample and runsample.
- Loading branch information
1 parent
0a71323
commit d541b33
Showing
5 changed files
with
96 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,48 @@ | ||
#!/usr/bin/bash | ||
|
||
# First stage will be RunSamples, which will produce parameter point files in hdf5 format. | ||
check_result () { | ||
# $1: Result output of the previous command ($?) | ||
# $2: Name of the previous command | ||
if [ $1 -eq 0 ]; then | ||
echo "$2 succeeded" | ||
else | ||
echo "$2 failed" | ||
exit -1 | ||
fi | ||
} | ||
|
||
# First stage will be PickSample, which will produce parameter point files in hdf5 format. | ||
# Each lasdi command will save a restart file, which will be read on the next lasdi command. | ||
# So all stages are run by the same command, directed differently by the restart file. | ||
lasdi burgers1d.offline.yml | ||
check_result $? initial-picksample | ||
|
||
# Run/save FOM solution with offline FOM solver. | ||
burgers1d burgers1d.offline.yml | ||
check_result $? initial-runsample | ||
|
||
# Collect FOM solution. | ||
lasdi burgers1d.offline.yml | ||
check_result $? initial-collect | ||
|
||
# Train latent dynamics model. | ||
lasdi burgers1d.offline.yml | ||
check_result $? initial-train | ||
|
||
for k in {0..8} | ||
do | ||
# Pick a new sample from greedy sampling | ||
lasdi burgers1d.offline.yml | ||
check_result $? pick-sample | ||
|
||
# A cycle of RunSamples/offline FOM/CollectSamples | ||
lasdi burgers1d.offline.yml | ||
# A cycle of offline FOM/CollectSamples | ||
burgers1d burgers1d.offline.yml | ||
check_result $? run-sample | ||
|
||
lasdi burgers1d.offline.yml | ||
check_result $? collect-sample | ||
|
||
# Train latent dynamics model. | ||
lasdi burgers1d.offline.yml | ||
check_result $? train | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters