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 327
327
set +o errtrace
328
328
set +o errexit
329
329
if " ${cafc} " " ${compiler_args[@]} " ; then
330
- exit 0
330
+ exit $?
331
331
else
332
+ return_code=$?
332
333
echo " Error: comand:" >&2
333
334
echo " \` ${cafc} ${compiler_args[*]} \` " >&2
334
335
echo " failed to compile." >&2
335
- exit 12
336
+ exit " ${return_code} "
336
337
fi
Original file line number Diff line number Diff line change @@ -262,7 +262,15 @@ elif [[ "${1}" == -np || "${1}" == -n ]]; then
262
262
mpiexec_args+=(" ${@: 4: $((${# } - 3))} " )
263
263
fi
264
264
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
266
274
else
267
275
echo " You must pass \" -np\" , \" <number_of_images>\" , \" /path/to/coarray_Fortran_program\" as the first 3 arguments to ${cmd} ."
268
276
exit 1
You can’t perform that action at this time.
0 commit comments