mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
problems: make the name() methods static
this allows to retrieve the name of the problem before it is instantiated. this is required to be able to print the "Initializing problem" message at the correct point (i.e., before instantiating the problem).
This commit is contained in:
@@ -12,7 +12,7 @@ usage() {
|
||||
echo "Usage:"
|
||||
echo
|
||||
echo "runTest.sh TEST_TYPE TEST_BINARY [TEST_ARGS]"
|
||||
echo "where TEST_TYPE can either be --plain or --simulation=\$NUM_CORES (is '$TEST_TYPE')."
|
||||
echo "where TEST_TYPE can either be --plain, --simulation or --parallel-simulation=\$NUM_CORES (is '$TEST_TYPE')."
|
||||
};
|
||||
|
||||
validateResults() {
|
||||
@@ -90,7 +90,7 @@ case "$TEST_TYPE" in
|
||||
echo "######################"
|
||||
echo "RND: '$RND'"
|
||||
|
||||
SIM_NAME=$(grep "Initializing problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
SIM_NAME=$(grep "Initializing the problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
NUM_TIMESTEPS=$(grep "Writing result" "test-$RND.log" | wc -l)
|
||||
TEST_RESULT=$(printf "%s-%05i" "$SIM_NAME" "$NUM_TIMESTEPS")
|
||||
TEST_RESULT=$(ls "$TEST_RESULT".*)
|
||||
@@ -119,8 +119,8 @@ case "$TEST_TYPE" in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
grep "Initializing problem" "test-$RND.log"
|
||||
SIM_NAME=$(grep "Initializing problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
grep "Initializing the problem" "test-$RND.log"
|
||||
SIM_NAME=$(grep "Initializing the problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
NUM_TIMESTEPS=$(grep "Writing result" "test-$RND.log" | wc -l)
|
||||
rm "test-$RND.log"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user