Skip to content

Commit

Permalink
make sure workflow id is written to right place in pecan.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Nov 21, 2012
1 parent eb0c7ba commit 1ccd331
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions web/runpecan.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@
fwrite($fh, " <pecanDir>${pecan_home}</pecanDir>" . PHP_EOL);
fwrite($fh, " <outdir>${folder}/pecan/</outdir>" . PHP_EOL);

fwrite($fh, " <database>" . PHP_EOL);
fwrite($fh, " <userid>${db_username}</userid>" . PHP_EOL);
fwrite($fh, " <passwd>${db_password}</passwd>" . PHP_EOL);
fwrite($fh, " <location>${db_hostname}</location>" . PHP_EOL);
fwrite($fh, " <name>${db_database}</name>" . PHP_EOL);
fwrite($fh, " </database>" . PHP_EOL);

$pft_id=1;
fwrite($fh, " <pfts>" . PHP_EOL);
foreach($pft as $p) {
Expand All @@ -154,19 +161,17 @@
fwrite($fh, " <outdir>${folder}/pft/${pft_id}/</outdir>" . PHP_EOL);
fwrite($fh, " <constants>" . PHP_EOL);
fwrite($fh, " <num>${pft_id}</num>" . PHP_EOL);
if ($modeltype == "BIOCRO") {
$src = fopen("template/biocro.xml", 'r');
stream_copy_to_stream($src, $fh);
fclose($src);
}
fwrite($fh, " </constants>" . PHP_EOL);
fwrite($fh, " </pft>" . PHP_EOL);
$pft_id++;
}
fwrite($fh, " </pfts>" . PHP_EOL);

fwrite($fh, " <database>" . PHP_EOL);
fwrite($fh, " <userid>${db_username}</userid>" . PHP_EOL);
fwrite($fh, " <passwd>${db_password}</passwd>" . PHP_EOL);
fwrite($fh, " <location>${db_hostname}</location>" . PHP_EOL);
fwrite($fh, " <name>${db_database}</name>" . PHP_EOL);
fwrite($fh, " </database>" . PHP_EOL);

fwrite($fh, " <meta.analysis>" . PHP_EOL);
fwrite($fh, " <iter>3000</iter>" . PHP_EOL);
fwrite($fh, " <random.effects>FALSE</random.effects>" . PHP_EOL);
Expand Down Expand Up @@ -217,8 +222,10 @@
#} else ($modeltype = "SIPNET") {
}
fwrite($fh, " </model>" . PHP_EOL);
fwrite($fh, " <run>" . PHP_EOL);
fwrite($fh, " <workflow>" . PHP_EOL);
fwrite($fh, " <id>$workflowid</id>" . PHP_EOL);
fwrite($fh, " </workflow>" . PHP_EOL);
fwrite($fh, " <run>" . PHP_EOL);
fwrite($fh, " <folder>${folder}</folder>" . PHP_EOL);
fwrite($fh, " <site>" . PHP_EOL);
fwrite($fh, " <id>${siteid}</id>" . PHP_EOL);
Expand Down

0 comments on commit 1ccd331

Please sign in to comment.