File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 327327set +o errtrace
328328set +o errexit
329329if " ${cafc} " " ${compiler_args[@]} " ; then
330- exit 0
330+ exit $?
331331else
332+ return_code=$?
332333 echo " Error: comand:" >&2
333334 echo " \` ${cafc} ${compiler_args[*]} \` " >&2
334335 echo " failed to compile." >&2
335- exit 12
336+ exit " ${return_code} "
336337fi
Original file line number Diff line number Diff line change @@ -262,7 +262,15 @@ elif [[ "${1}" == -np || "${1}" == -n ]]; then
262262 mpiexec_args+=(" ${@: 4: $((${# } - 3))} " )
263263 fi
264264
265- " ${CAFRUN} " " ${mpiexec_args[@]// ' ' / } "
265+ if " ${CAFRUN} " " ${mpiexec_args[@]// ' ' / } " ; then
266+ exit $?
267+ else
268+ return_code=$?
269+ echo " Error: Command:" >&2
270+ echo " \` ${CAFRUN} " " ${mpiexec_args[*]// ' ' / } \` " >&2
271+ echo " failed to run." >&2
272+ exit " ${return_code} "
273+ fi
266274 else
267275 echo " You must pass \" -np\" , \" <number_of_images>\" , \" /path/to/coarray_Fortran_program\" as the first 3 arguments to ${cmd} ."
268276 exit 1
You can’t perform that action at this time.
0 commit comments