[slurm-users] Question about gdb sbatch

102 views
Skip to first unread message

mohammed shambakey

unread,
Oct 20, 2023, 11:28:36 AM10/20/23
to Slurm User Community List
Hi

Is it possible to debug "sbatch" itself when submitting a script? For example, I want to debug the following command:
sbatch -Mall some_script.sh

I don't want to debug the "some_script.sh". I want to debug the "sbatch" itself when submitting the "some_script.sh". I tried to use "gdb" but I'm not an expert, and it didn't work for me. I wonder if anyone did something like this? and how?

Regards


--
Mohammed

Davide DelVento

unread,
Oct 20, 2023, 5:35:36 PM10/20/23
to Slurm User Community List
Have you compiled slurm yourself or have you installed binaries? If the latter, I speculate this is not possible, in that it would not have been compiled with the required symbols (above all "-g" but probably others depending on your platform). 

If you compiled slurm yourself, and assuming you have included all the necessary symbols (or will re-compile appropriately and replace the binaries and libraries), then it'd be like debugging any other thing: just make sure to point gdb at the location of the source code, and then follow any of the gazillion tutorials around about gdb. If you are not familiar with gdb already, I strongly recommend that you start with some simpler program before attempting something as big as slurm.

Have a great weekend

mohammed shambakey

unread,
Oct 21, 2023, 4:24:56 AM10/21/23
to Slurm User Community List
Thank you very much. I'm compiling from the source code.

Another question please about the proper location for the "-g" option, because I see options like CFLAGS="-g" in slurm/configure file, and I wonder if I should add the "-g" to  some other locations?

Regards
--
Mohammed

Davide DelVento

unread,
Oct 23, 2023, 8:33:51 AM10/23/23
to Slurm User Community List
I think that should be sufficient.
Reply all
Reply to author
Forward
0 new messages