[Bio] / Sprout / ERDBGenerator.pl Repository:
ViewVC logotype

Diff of /Sprout/ERDBGenerator.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Mon Mar 2 22:15:04 2009 UTC revision 1.7, Thu Apr 2 01:36:27 2009 UTC
# Line 145  Line 145 
145  then the appropriate number of worker processes are generated and the sections  then the appropriate number of worker processes are generated and the sections
146  are assigned to them in a round-robin fashion.  are assigned to them in a round-robin fashion.
147    
148    =item memTrace
149    
150    Trace memory usage at the end of each section.
151    
152  =item DBD  =item DBD
153    
154  Name of the DBD file. If specified, the DBD must be in the main FIG directory  Name of the DBD file. If specified, the DBD must be in the main FIG directory
# Line 170  Line 174 
174                                                resume => ["", "if specified, only groups and sections that do not already have load files will be processed"],                                                resume => ["", "if specified, only groups and sections that do not already have load files will be processed"],
175                                                sections => ["*", "name of a file in the database's load directory containing a list of sections to process"],                                                sections => ["*", "name of a file in the database's load directory containing a list of sections to process"],
176                                                DBD => ["", "if specified, the name of a DBD file in the FIG directory"],                                                DBD => ["", "if specified, the name of a DBD file in the FIG directory"],
177                                                  memTrace => ["", "if specified, memory usage will be traced at the end of each section"],
178                                             },                                             },
179                                             "<database> <group1> <group2> ...",                                             "<database> <group1> <group2> ...",
180                                             @ARGV);                                             @ARGV);
# Line 186  Line 191 
191      # Connect to the database and get its load directory.      # Connect to the database and get its load directory.
192      my $erdb = ERDB::GetDatabase($database, $altDBD);      my $erdb = ERDB::GetDatabase($database, $altDBD);
193      my $directory = $erdb->LoadDirectory();      my $directory = $erdb->LoadDirectory();
194        my $source = $erdb->GetSourceObject();
195      # Fix the group list.      # Fix the group list.
196      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);      my @realGroups = ERDBLoadGroup::ComputeGroups($erdb, \@groups);
197      # Are we a worker or a manager?      # Are we a worker or a manager?
# Line 249  Line 255 
255              # No, so we must create one.              # No, so we must create one.
256              $sectionFile = "$directory/Sections$$.txt";              $sectionFile = "$directory/Sections$$.txt";
257              Open(\*SECTIONS, ">$sectionFile");              Open(\*SECTIONS, ">$sectionFile");
258              for my $section ($erdb->SectionList()) {              for my $section ($erdb->SectionList($source)) {
259                  print SECTIONS "$section\n";                  print SECTIONS "$section\n";
260              }              }
261              close SECTIONS;              close SECTIONS;
# Line 396  Line 402 
402                  } else {                  } else {
403                      # No kill file, so we process the section.                      # No kill file, so we process the section.
404                      Trace("Processing section $section for group $group in $options->{label}.") if T(3);                      Trace("Processing section $section for group $group in $options->{label}.") if T(3);
405                        # Memorize the current memory footprint.
406                        my $memory0 = Tracer::GetMemorySize();
407                      my $ok = $loader->ProcessSection($section);                      my $ok = $loader->ProcessSection($section);
408                        # Do memory tracing.
409                        if ($options->{memTrace}) {
410                            my $memory1 = Tracer::GetMemorySize();
411                            Trace("Memory usage by $options->{label} for $group $section was $memory0 to $memory1.") if T(2);
412                        }
413                      # Check to see if we've exceeded the maximum error count. We only care                      # Check to see if we've exceeded the maximum error count. We only care
414                      # if maxErrors is nonzero.                      # if maxErrors is nonzero.
415                      if (! $ok && $maxErrors && ++$errorCount >= $maxErrors) {                      if (! $ok && $maxErrors && ++$errorCount >= $maxErrors) {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3