The problem is that Slurm scripts do not write into stdout.
If I, for example, execute the following script:
$more myScript.sh
!/bin/sh
set -x
echo "execute hostname"
hostname
echo "now create file with hostname as content"
hostname > /home/slurm/host
$sbatch myScript.sh
$more slurm-49.out
echo 'execute hostname'
execute hostname
hostname
echo 'now create file with hsotname as content'
now create file with hsotname as content
hostname
$more /home/slurm/host
(created but empty)
If I manually execute the script, either in the master or the computing node, the result is succesful and /home/slurm/host contains the name of the host.
I realize two things that don't make much sense
-apparently, "stdout" is broken and nothing is wirtten into it
-however, "print" commands work OK.
I have tried to sumbit with different sbatch options but all my attempts have been unsuccesful.
The problem is that Slurm scripts do not write into stdout.
If I, for example, execute the following script:
$more myScript.sh
!/bin/sh
set -x echo "execute hostname" hostname echo "now create file with hostname as content" hostname > /home/slurm/host
$sbatch myScript.sh
$more slurm-49.out
hostname $more /home/slurm/host (created but empty)
If I manually execute the script, either in the master or the computing node, the result is succesful and /home/slurm/host contains the name of the host.
I realize two things that don't make much sense -apparently, "stdout" is broken and nothing is wirtten into it -however, "print" commands work OK.
I have tried to sumbit with different sbatch options but all my attempts have been unsuccesful.