Skip to content
forked from BOINC/boinc

Commit

Permalink
wuwj sandbox file selection filter
Browse files Browse the repository at this point in the history
svn path=/trunk/boinc/; revision=25363
  • Loading branch information
Wenjing Wu committed Mar 2, 2012
1 parent 64a3711 commit 048b43b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ set sts=4
set sw=4
set expandtab
set smarttab
set backspace=indent,eol,start
syntax off
4 changes: 3 additions & 1 deletion html/inc/sandbox.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ function sandbox_file_select($user, $select_name) {
$x = "<select name=$select_name>\n";
$files = sandbox_file_names($user);
foreach ($files as $f) {
$x .= "<option value=\"$f\">$f</option>\n";
if(preg_match("/$select_name/",$f)){
$x .= "<option value=\"$f\">$f</option>\n";
}
}
$x .= "</select>\n";
return $x;
Expand Down
16 changes: 8 additions & 8 deletions html/user/lammps.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ function show_submit_form($user) {
<input type=hidden name=action value=prepare>
";
start_table();
row2("Structure file", sandbox_file_select($user, "structure_file"));
row2("Script file", sandbox_file_select($user, "command_file"));
row2("Command-line file<br><span class=note>List of command lines, one per job</span>", sandbox_file_select($user, "cmdline_file"));
row2("Zipped potential files", sandbox_file_select($user, "pot_files"));
row2("Area", area_select());
row2("<strong>structure_file</strong><br><span class=note>structure_file*</span>", sandbox_file_select($user, "structure_file"));
row2("<strong>lammps_script</strong><br><span class=note>lammps_script*</span>", sandbox_file_select($user, "lammps_script"));
row2("<strong>cmdline_file</strong><br><span class=note>cmdline_file*</span><span class=note> ( List of command lines, one per job )</span>", sandbox_file_select($user, "cmdline_file"));
row2("<strong>pot.zip</strong><br><span class=note>*.zip</span><span class-note> ( Zipped Potential files )</span>", sandbox_file_select($user, "zip"));
row2("<strong>Area</strong>", area_select());
row2("", "<input type=submit value=Prepare>");
end_table();
echo "</form>
Expand Down Expand Up @@ -244,9 +244,9 @@ function estimated_makespan($njobs, $flops_per_job) {

function prepare_batch($user) {
$structure_file_path = get_file_path($user, 'structure_file');
$command_file_path = get_file_path($user, 'command_file');
$command_file_path = get_file_path($user, 'lammps_script');
$cmdline_file_path = get_file_path($user, 'cmdline_file');
$pot_files_path = get_file_path($user, 'pot_files');
$pot_files_path = get_file_path($user, 'zip');

$info = null;
$info->structure_file_path = $structure_file_path;
Expand Down Expand Up @@ -293,7 +293,7 @@ function prepare_batch($user) {
$secs_est = estimated_makespan($njobs, $info->rsc_fpops_est);
$hrs_est = number_format($secs_est/3600, 1);
$client_mb = number_format($info->rsc_disk_bound/1e6,1);
$server_mb = $njobs*$client_mb;
$server_mb = number_format($njobs*$info->rsc_disk_bound/1e6,1);

page_head("Batch prepared");
echo "
Expand Down

0 comments on commit 048b43b

Please sign in to comment.