Sorry the mail server has eaten the attachment ;)
Programs: mm_pbsa
Description: - make parallel version finish cleanly even if no STOP
parameter is specified; (the original version spawned
new threads even if no more snapshots were available;
these extra threads never finished)
- workaround for information exchange between master
and spawned threads to allow processing of more than
255 snapshots per program execution
(the problem was that the exit code was compared with
the snapshot number; however, exit codes are limited
to the range of 0-255 on Linux/Unix)
- ignore leading spaces in the input file, i.e. accept
e.g. " STOP 100" as well as "STOP 100"
------------------------------------------------------------------------------
--- src/mm_pbsa/mm_pbsa_calceneent.pm.orig 2010-07-22 13:54:52.000000000 +0200
+++ src/mm_pbsa/mm_pbsa_calceneent.pm 2010-07-22 15:06:30.000000000 +0200
.. -164,13 +164,14 ..
my $mol = $nmol . $number;
$procs_data{$number}->{mol} = $mol;
+ my $ncrdfile = $ncrd . "$number";
+ last if(! -e $ncrdfile); # exit the loop (before forking a new thread) if there is no new input file
+
# Start fork
############
$pnumber++;
$pm->start($pnumber) and next;
- my $ncrdfile = $ncrd . "$number";
- last if(! -e $ncrdfile);
print " Calc contrib for $ncrdfile\n";
if($number == $r_gen->{"START"} &&
($r_gen->{"MM"} || $r_gen->{"GB"} || $r_gen->{"PB"} || $r_gen->{"MS"} || $r_gen->{"NM"})){
.. -234,9 +235,9 ..
unlink $npdb . $number;
}
- # Finish fork
+ # Finish fork (ATTENTION: valid exit codes are only 0-255)
#############
- $pm->finish($pnumber);
+ $pm->finish($pnumber%256);
# Delete procs_data
###################
.. -279,7 +280,8 ..
my $exit_code = shift;
my $pnumber = shift;
- if($pnumber != $exit_code){
+ # ATTENTION: exit codes can only be in the range of 0-255, thus, do a modulo on the snapshot number
+ if($pnumber%256 != $exit_code){
die("Finished process $pnumber with PID $pid has wrong exit code $exit_code\nFor details see: $HTMLPATH#ana_finished_proc\n");
}
--- src/mm_pbsa/mm_pbsa_readinput.pm.orig 2010-04-26 14:21:22.000000000 +0200
+++ src/mm_pbsa/mm_pbsa_readinput.pm 2010-07-22 15:19:42.000000000 +0200
.. -62,6 +62,7 ..
while(defined($line = <IN>)){
next if($line =~ /^\#/ || $line =~ /^$/);
chomp($line);
+ $line =~ s/^\s+//; # remove leading whitespace
# Get .-entry
if($line !~ /^./ && $atflg eq ""){
On Jul 29, 2010, at 10:34 PM, Thorsten M Woelfle wrote:
> Hi mm_pbsa developers,
>
> I am posting this for a guy from my home university, asking if
> you are aware of that bug and have an alternative workaround.
> If it is alright, I am going to push it to git. Just
> want to make sure that this is not fixed redundant.
>
> All the best
> Thorsten
>
>> Dear all,
>>
>> I'm not sure if the Amber developers accept patches on this list
>> or not (as there were no comments at all to the fixes I suggested
>> several days ago).
>>
>> Please find attached a cumulative patch for two crucial bugs in the
>> parallel (threaded) version of mm_pbsa and an additional usability
>> fix concerning the parsing of the mm_pbsa input file.
>>
>> Details on the two crucial bugs can also be found in
>> http://archive.ambermd.org/201007/0494.html
>> http://archive.ambermd.org/201007/0501.html
>> The usabulity fix removes leading spaces from the input file.
>>
>>
>> Best regards,
>>
>> thomas
>> --
>> Dr.-Ing. Thomas Zeiser, HPC Services
>> Friedrich-Alexander-Universitaet Erlangen-Nuernberg
>> Regionales Rechenzentrum Erlangen (RRZE)
>> Martensstrasse 1, 91058 Erlangen, Germany
>> http://www.rrze.uni-erlangen.de/hpc/
>>
>
>
>
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Jul 29 2010 - 15:00:03 PDT