Hello @Azadeh.MoradinezhadDizgah I’ve installed Valgrind for you New software installed Valgrind.
To use GDB on a compute node, you can launch your job as usual, and connect to the node where it is executed using ssh. And from here you attach gdb to your process (google for attach). For debugging mpi stuff, this is another story, and maybe valgrind may help you more.