I am running Python code containing print instructions through SLURM. Usually, when I run Python code directly through "python program.py", print statements appear in the terminal. When I run my program through SLURM, as expected, print statements do not appear in the terminal. How to save print instructions to a file so that I can check them as the program starts? Below is my script message, which I send via "sbatch submit.sh". Note that I have already tried two methods to write the output of either test1.out or test2.out. Please let me know where I am going wrong!
#!/bin/bash
module load gnu python
python program.py > test2.out
source
share