Index: palm/trunk/SCRIPTS/palmbuild
===================================================================
--- palm/trunk/SCRIPTS/palmbuild	(revision 4302)
+++ palm/trunk/SCRIPTS/palmbuild	(revision 4303)
@@ -27,4 +27,7 @@
 # -----------------
 # $Id$
+# Abort if SOURCES_FOR_RUN catalog cannot be created
+# 
+# 4082 2019-07-10 14:42:00Z raasch
 # bugfix for executing module commands and for interpreting linker options
 # on local machines
@@ -682,5 +685,12 @@
           printf "\n  *** copy MAKE_DEPOSITORY_${configuration_identifier} on remote host to $sources_for_run_catalog \n"
        fi
-       ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}; mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}; cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}; cd ${fast_io_catalog}/${sources_for_run_catalog}; tar xf ${program_name}_current_version.tar"  2>&1
+       ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}; mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}; [[ \$? != 0 ]] && exit 1; cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}; cd ${fast_io_catalog}/${sources_for_run_catalog}; tar xf ${program_name}_current_version.tar"  2>&1
+       if [[ $? != 0 ]]
+       then
+          printf "\n  +++ SOURCES_FOR_RUN catalog cannot be created."
+          printf "\n      Check setting of variable fast_io_catalog in your config file."
+          locat=temporary_working_directory
+          exit
+       fi
 
 
@@ -916,4 +926,11 @@
        rm -rf ${fast_io_catalog}/${sources_for_run_catalog}
        mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}
+       if [[ $? != 0 ]]
+       then
+          printf "\n  +++ SOURCES_FOR_RUN catalog cannot be created."
+          printf "\n      Check setting of variable fast_io_catalog in your config file."
+          locat=execution
+          exit
+       fi
        cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}
        cd $fast_io_catalog/${sources_for_run_catalog}
Index: palm/trunk/SCRIPTS/palmrun
===================================================================
--- palm/trunk/SCRIPTS/palmrun	(revision 4302)
+++ palm/trunk/SCRIPTS/palmrun	(revision 4303)
@@ -27,4 +27,7 @@
 # -----------------
 # $Id$
+# Abort if temporary working catalog cannot be created
+# 
+# 3982 2019-05-16 11:07:31Z raasch
 # bugfix: -b is not added in automatically generated batch jobs for remote hosts
 # 
@@ -1989,4 +1992,11 @@
           # CREATE THE DIRECTORY
        mkdir -p  $tempdir
+       if [[ $? != 0 ]]
+       then
+          printf "\n  +++ temporary working directory cannot be created."
+          printf "\n      Check setting of variable fast_io_catalog in your config file."
+          locat=execution
+          exit
+       fi
        chmod  go+rx  $tempdir
        cd  $tempdir
@@ -2995,4 +3005,10 @@
     then
        echo  "mkdir  $tempdir"           >>  $jobfile
+       echo  "if [[ \$? != 0 ]]"         >>  $jobfile
+       echo  "then"                      >>  $jobfile
+       echo  "   echo \"+++ temporary working directory cannot be created.\" "  >>  $jobfile
+       echo  "   echo \"    Check setting of variable fast_io_catalog in your config file.\" "  >>  $jobfile
+       echo  "   exit"                   >>  $jobfile
+       echo  "fi"                        >>  $jobfile
        echo  "chmod  go+rx  $tempdir"    >>  $jobfile
     else
@@ -3001,4 +3017,11 @@
           # BATCH DIRECTIVE -wd AND MUST ALREADY EXIST WHEN THE JOB IS SUBMITTED)
        mkdir  $tempdir
+       if [[ $? != 0 ]]
+       then
+          printf "\n  +++ temporary working directory cannot be created."
+          printf "\n      Check setting of variable fast_io_catalog in your config file."
+          locat=execution
+          exit
+       fi
        chmod  go+rx  $tempdir
     fi
