[Pw_forum] Inconsistent behaviour of check_stop_init

Riccardo Di Meo dimeo at democritos.it
Fri Feb 5 12:33:33 CET 2010


** I apologize in advance if this mail will been received twice.

Dear all,

while using PWscf I noticed that some of the "<prefix>.EXIT"  files I
issued where ignored.

Investigating the problem, I found out that the issue is the result of
two actions:

a) the routine check_stop_init is not called at the very start of the
main program in pwscf.f90
b) if a "killfile" is found, the routine silently removes it.

This causes the program to have a rather large window, at the start of
the execution, where an"EXIT" command is ignored completely by PWscf,
which although it is a minor problem for normal users (it can still be
puzzling though), it is particularly annoying when the code is to be
inserted in an automated script (e.g. for the execution within a portal).

Here is a list of 2 possible solutions, in the order I think they should
be more preferable

a) exit if an "EXIT" file is found, even at the very start of the
execution. I think this is the expected behaviour and I would strongly
encourage to follow this course of action, if possible.

To implement this solution it is sufficient to exit from the program
after the next CLOSE in check_stop.f90:

          IF ( tex ) THEN
             !
             OPEN( stopunit, FILE = TRIM( exit_file ), STATUS = 'OLD' )
             CLOSE( stopunit, STATUS = 'DELETE' )
             EXIT   !!!!! <---
             !
          END IF


b) remove the file at the _very_ start of the execution, with a message.
Not an expected behavior, in my opinion, since if a file is present in
the dir. it's purpose should still be respected (regardless if it's
there by mistake or not: the program should not discriminate about
that...), and this solution still leaves a window in which PW is not
responsive.

Can be done moving "check_stop_init" the very beginning of the pwscf.f90
main routine (the sooner it gets executed, the better), a similar
measure should be probably taken in each code employing the routine.

I hope this can be of some help, thank you for your attention

Riccardo Di Meo
(SISSA, MS2 project)




More information about the users mailing list