From: Kevin M. Rosenberg Date: Sat, 29 Apr 2000 23:24:15 +0000 (+0000) Subject: r12: modified to use separate configuration file X-Git-Tag: debian-4.5.3-3~1004 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=bd9f39e1ccbdafabdda97c8a3feb8aa3d554554e r12: modified to use separate configuration file --- diff --git a/cgi-bin/Makefile.am b/cgi-bin/Makefile.am index d523a20..874c068 100644 --- a/cgi-bin/Makefile.am +++ b/cgi-bin/Makefile.am @@ -1,2 +1,3 @@ cgibin_SCRIPTS=@cgiprograms@ -EXTRA_SCRIPTS=ctsim.cgi +EXTRA_SCRIPTS=ctsim.cgi ctsim.conf + diff --git a/cgi-bin/ctsim.cgi b/cgi-bin/ctsim.cgi index d75e466..89b0533 100644 --- a/cgi-bin/ctsim.cgi +++ b/cgi-bin/ctsim.cgi @@ -6,8 +6,9 @@ use CGI; use File::Basename; use Fcntl ':flock'; +require ctsim.conf; + my $opt_d = 0; -my $bindir = "/opt/ctsim/bin"; $ENV{'PATH'} = $bindir; my $fromhost = $ENV{'REMOTE_HOST'}; @@ -70,13 +71,10 @@ $error .= "IR Nx and Ny must be between 5 and 1024
" if ($IR_Nx < 5 || $IR_Nx $error .= "IR Filter Parameter must be between 0 and 1
" if ($IR_Filter_Param < 0 || $IR_Filter_Param > 1); -my $jobdir = "/opt/apache/htdocs/ctsim/webdata"; my $tmpid = $$; my $auto_window_img = "std0.1"; my $auto_window_diff = "std1"; my $auto_window_rs = "full"; -my $datadir = "/opt/apache/htdocs/ctsim/webdata"; -my $url_datadir = "/ctsim/webdata"; my $logfile = "$jobdir/ctsim.log"; my $result_fname = "$datadir/result-$tmpid.html"; @@ -100,9 +98,9 @@ my $ctrec_ver = "$bindir/ctrec"; my $phm2rs_ver = "$bindir/phm2rs"; my $phm2sdf_ver = "$bindir/phm2sdf"; my $diff_ver = "$bindir/sdf-2"; -$ctrec_ver = "/opt/lam/bin/mpirun N N $bindir/ctrec-mpi" if $MPI; -$phm2rs_ver = "/opt/lam/bin/mpirun N N $bindir/phm2rs-mpi" if $MPI; -$phm2sdf_ver = "/opt/lam/bin/mpirun N N $bindir/phm2sdf-mpi" if $MPI; +$ctrec_ver = "/opt/lam/bin/mpirun N N $bindir/ctrec-lam" if $MPI; +$phm2rs_ver = "/opt/lam/bin/mpirun N N $bindir/phm2rs-lam" if $MPI; +$phm2sdf_ver = "/opt/lam/bin/mpirun N N $bindir/phm2sdf-lam" if $MPI; my $gp_cmd = "$phm2sdf_ver $phantom_fname $Phantom_Nx $Phantom_Ny --phantom $Phantom_Name --nsample $Phantom_NSample"; my $rs_cmd = "$phm2rs_ver $rs_fname $RS_NDet $RS_NRot --phantom $Phantom_Name --nray $RS_NRay --rotangle $RS_RotAngle"; diff --git a/cgi-bin/ctsim.cgi.in b/cgi-bin/ctsim.cgi.in index 7b3d69e..8918f2e 100755 --- a/cgi-bin/ctsim.cgi.in +++ b/cgi-bin/ctsim.cgi.in @@ -6,8 +6,9 @@ use CGI; use File::Basename; use Fcntl ':flock'; +require ctsim.conf; + my $opt_d = 0; -my $bindir = "@prefix@/bin"; $ENV{'PATH'} = $bindir; my $fromhost = $ENV{'REMOTE_HOST'}; @@ -70,13 +71,10 @@ $error .= "IR Nx and Ny must be between 5 and 1024
" if ($IR_Nx < 5 || $IR_Nx $error .= "IR Filter Parameter must be between 0 and 1
" if ($IR_Filter_Param < 0 || $IR_Filter_Param > 1); -my $jobdir = "@webdatadir@"; my $tmpid = $$; my $auto_window_img = "std0.1"; my $auto_window_diff = "std1"; my $auto_window_rs = "full"; -my $datadir = "@webdatadir@"; -my $url_datadir = "@webdataurl@"; my $logfile = "$jobdir/ctsim.log"; my $result_fname = "$datadir/result-$tmpid.html"; @@ -100,9 +98,9 @@ my $ctrec_ver = "$bindir/ctrec"; my $phm2rs_ver = "$bindir/phm2rs"; my $phm2sdf_ver = "$bindir/phm2sdf"; my $diff_ver = "$bindir/sdf-2"; -$ctrec_ver = "/opt/lam/bin/mpirun N N $bindir/ctrec-mpi" if $MPI; -$phm2rs_ver = "/opt/lam/bin/mpirun N N $bindir/phm2rs-mpi" if $MPI; -$phm2sdf_ver = "/opt/lam/bin/mpirun N N $bindir/phm2sdf-mpi" if $MPI; +$ctrec_ver = "/opt/lam/bin/mpirun N N $bindir/ctrec-lam" if $MPI; +$phm2rs_ver = "/opt/lam/bin/mpirun N N $bindir/phm2rs-lam" if $MPI; +$phm2sdf_ver = "/opt/lam/bin/mpirun N N $bindir/phm2sdf-lam" if $MPI; my $gp_cmd = "$phm2sdf_ver $phantom_fname $Phantom_Nx $Phantom_Ny --phantom $Phantom_Name --nsample $Phantom_NSample"; my $rs_cmd = "$phm2rs_ver $rs_fname $RS_NDet $RS_NRot --phantom $Phantom_Name --nray $RS_NRay --rotangle $RS_RotAngle";