Skip to content

Commit ee5a34c

Browse files
committed
Merge branch 'mpirun_output_take_2' into file_staging
2 parents d6455aa + 0a62a3c commit ee5a34c

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/psij/launchers/scripts/mpi_launch.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,22 @@ fi
1616
pre_launch
1717

1818
filter_out() {
19-
sed -nE 's/^\[[^]]+\]<stdout>:(.*)/\1/p'
20-
}
21-
22-
filter_err() {
23-
sed -nE 's/^\[[^]]+\]<stderr>:(.*)/\1/p'
19+
# must start with [n,n]<stdout>:
20+
# may contain one or more [n,n]<stdout>: lodged into the line
21+
sed -nE 's/^\[[^]]+\]<std[oe][ur][tr]>:(.*)/\1/p' | sed -E 's/\[[^]]+\]<std[oe][ur][tr]>://g'
2422
}
2523

2624
filter_out_5() {
27-
sed -nE 's/^\[[^]]+\]<stdout>: (.*)/\1/p'
28-
}
29-
30-
filter_err_5() {
31-
sed -nE 's/^\[[^]]+\]<stderr>: (.*)/\1/p'
25+
sed -nE 's/^\[[^]]+\]<std[oe][ur][tr]>: (.*)/\1/p'
3226
}
3327

3428
set +e
3529
if [ "$IS_OPENMPI_5" == "1" ]; then
3630
mpirun --oversubscribe --output TAG -n $_PSI_J_PROCESS_COUNT "$@" \
37-
1> >(filter_out_5 > $_PSI_J_STDOUT) 2> >(filter_err_5 > $_PSI_J_STDERR) <$_PSI_J_STDIN
31+
1> >(filter_out_5 > $_PSI_J_STDOUT) 2> >(filter_out_5 > $_PSI_J_STDERR) <$_PSI_J_STDIN
3832
elif [ "$IS_OPENMPI" == "1" ]; then
3933
mpirun --oversubscribe --tag-output -q -n $_PSI_J_PROCESS_COUNT "$@" \
40-
1> >(filter_out > "$_PSI_J_STDOUT") 2> >(filter_err > $_PSI_J_STDERR) <$_PSI_J_STDIN
34+
1> >(filter_out > "$_PSI_J_STDOUT") 2> >(filter_out > $_PSI_J_STDERR) <$_PSI_J_STDIN
4135
else
4236
mpirun -n $_PSI_J_PROCESS_COUNT "$@" 1>$_PSI_J_STDOUT 2>$_PSI_J_STDERR <$_PSI_J_STDIN
4337
fi

0 commit comments

Comments
 (0)