[Pw_forum] PW is frozen

Lorenzo Paulatto lorenzo.paulatto at impmc.upmc.fr
Tue Apr 16 00:11:53 CEST 2013


On 04/02/2013 09:43 PM, Paolo Giannozzi wrote:
>   you might consider a poor-man (or poor-woman)
> debugging by inserting print statements in the main program until
> you figure out where it hangs

When the program has already hung, you can still examine it with a 
debugger: you get the process id (let's say it's 12345) then you attach 
the debugger with this syntax:
   gdb /path/to/pw.x 12345
do a nice "bt full" to get the exact line of code and value of the 
variables and eventually post it to the forum for advice.

If I'm not mistaken, pw.x is compiled with debug symbols by default; 
otherwise, you'll have to add "-g" to the FFLAGS and recompile.

BTW, this is also a very convenient way to debug MPI code as you can 
attach to any of the parallel processes, after they have been started by 
the queue system. After you have finished examining a process you can 
detach the debugger and proceed with the next one.

best regards

-- 
Dr. Lorenzo Paulatto
IdR @ IMPMC -- CNRS & Université Paris 6
phone:+33 (0)1 44275 084 / skype: paulatz
www:  http://www-int.impmc.upmc.fr/~paulatto/
mail: 23-24/4é16 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 5




More information about the users mailing list