Carriage return not working in slurm output file when running with sbatch

Viewed 12

I'm running a job in slurm with sbatch.

In job.sh

#!/bin/bash
#SBATCH -o out.txt
python test.py

In test.py I'm printing a lot of intermediate information with print(message +' \r', end='')

I run the job.. sbatch job.sh

However in the output file out.txt will have all the lines, slurm is not respecting the carriage return... Is there anyway to prevent this and make slurm understand carriage return?

0 Answers
Related