diff options
author | jtb <jtb> | 2000-11-26 23:02:38 +0000 |
---|---|---|
committer | jtb <jtb> | 2000-11-26 23:02:38 +0000 |
commit | e762a48207610bf24306f444e2211d620487abe2 (patch) | |
tree | 36dbeccb7f3956ae3c1abdbef5af9d7952ac8b75 /math/mcsim/patches | |
parent | 0492c42da8ec2db0631aab8c8a22dcf480250212 (diff) | |
download | pkgsrc-e762a48207610bf24306f444e2211d620487abe2.tar.gz |
Initial import of new "mcsim" package:
Monte Carlo Simulation software
Diffstat (limited to 'math/mcsim/patches')
-rw-r--r-- | math/mcsim/patches/patch-aa | 20 | ||||
-rw-r--r-- | math/mcsim/patches/patch-ab | 31 | ||||
-rw-r--r-- | math/mcsim/patches/patch-ac | 31 | ||||
-rw-r--r-- | math/mcsim/patches/patch-ad | 22 | ||||
-rw-r--r-- | math/mcsim/patches/patch-ae | 259 |
5 files changed, 363 insertions, 0 deletions
diff --git a/math/mcsim/patches/patch-aa b/math/mcsim/patches/patch-aa new file mode 100644 index 00000000000..ac1dbf1b05f --- /dev/null +++ b/math/mcsim/patches/patch-aa @@ -0,0 +1,20 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/11/26 23:02:38 jtb Exp $ + +--- doc/mcsim.texinfo.orig Sat Nov 15 02:14:40 1997 ++++ doc/mcsim.texinfo +@@ -1,10 +1,14 @@ + \input texinfo @c -*-texinfo-*- + @comment %**start of header (This is for running Texinfo on a region.) +-@setfilename mcsimdoc ++@setfilename mcsim + @settitle MCSim User' Manual + @setchapternewpage odd + @comment %**end of header (This is for running Texinfo on a region.) + ++@dircategory Monte Carlo Simulation ++@direntry ++* MCSim: (mcsim). A Monte Carlo Simulation Program. ++@end direntry + + @comment the following is just for the texinfo file + @ifinfo diff --git a/math/mcsim/patches/patch-ab b/math/mcsim/patches/patch-ab new file mode 100644 index 00000000000..bc111757bbe --- /dev/null +++ b/math/mcsim/patches/patch-ab @@ -0,0 +1,31 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/11/26 23:02:38 jtb Exp $ + +--- mod/Makefile.orig Wed Nov 22 22:39:24 2000 ++++ mod/Makefile +@@ -97,8 +97,8 @@ + # + #>>>> Define the COMPILER name and LINKER name here only. + +-CC = gcc +-LINK = gcc ++#CC = ++LINK = $(CC) + + #>>>> Define PATHS + # The include path should be a directory containing header +@@ -137,13 +137,13 @@ + #>>>> To compile with OPTIMIZATION uncomment the following lines + # + DEBUG_SYMBOLS = -DNDEBUG +-C_OPTIM_FLAG = -O ++C_OPTIM_FLAG = -O2 + L_OPTIM_FLAG = + + # + #>>>> Include any special warning flags + # +-WARNINGS = -Wall ++WARNINGS = -ansi + + #-------------------- + #**** You shouldn't need to change these lines. They are dependent diff --git a/math/mcsim/patches/patch-ac b/math/mcsim/patches/patch-ac new file mode 100644 index 00000000000..a9533bf83c1 --- /dev/null +++ b/math/mcsim/patches/patch-ac @@ -0,0 +1,31 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/11/26 23:02:39 jtb Exp $ + +--- sim/Makefile.orig Wed Nov 22 22:41:05 2000 ++++ sim/Makefile +@@ -62,8 +62,8 @@ + # + #>>>> Define the COMPILER name and LINKER name here only. + +-CC = gcc +-LINK = gcc ++#CC = gcc ++LINK = $(CC) + + #>>>> Define PATHS + # The include path should be a directory containing header +@@ -101,13 +101,13 @@ + #>>>> To compile with OPTIMIZATION uncomment the following lines + # + DEBUG_SYMBOLS = -DNDEBUG +-C_OPTIM_FLAG = -O ++C_OPTIM_FLAG = -O2 + L_OPTIM_FLAG = + + # + #>>>> Include any special warning flags + # +-WARNINGS = -Wall -ansi ++WARNINGS = -ansi + + #-------------------- + #**** You shouldn't need to change the next 2 lines. They are dependent diff --git a/math/mcsim/patches/patch-ad b/math/mcsim/patches/patch-ad new file mode 100644 index 00000000000..53a7bbfe82f --- /dev/null +++ b/math/mcsim/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1.1.1 2000/11/26 23:02:39 jtb Exp $ + +--- sim/sim.c.orig Wed Nov 22 22:45:45 2000 ++++ sim/sim.c +@@ -653,7 +653,7 @@ + scanf ("%[^:\f\r\v\n]", *pszFileIn); + getchar(); + #else +- gets (*pszFileIn); ++ fgets (*pszFileIn, sizeof(*pszFileIn), stdin); + *pszFileIn = strtok (*pszFileIn, " \t"); + #endif + +@@ -665,7 +665,7 @@ + #ifdef _MACOSLEVEL1_ + scanf ("%[^:\f\r\v\n]", *pszFileOut); + #else +- gets (*pszFileOut); ++ fgets (*pszFileOut, sizeof(pszFileOut), stdin); + *pszFileOut = strtok (*pszFileOut, " \t"); + #endif + } diff --git a/math/mcsim/patches/patch-ae b/math/mcsim/patches/patch-ae new file mode 100644 index 00000000000..8aa82a6ce26 --- /dev/null +++ b/math/mcsim/patches/patch-ae @@ -0,0 +1,259 @@ +$NetBSD: patch-ae,v 1.1.1.1 2000/11/26 23:02:41 jtb Exp $ + +--- sim/Test_mcsim.orig Fri Nov 14 15:45:56 1997 ++++ sim/Test_mcsim +@@ -1,147 +1,147 @@ + # Run diagnostic tests on several features of the program. + # results are compared to prepared files. +-one: +- @echo +- @echo ---------- +- @echo +- @echo '* Testing MCSim: this could take a few minutes.' +- @echo '* Creating logfile mcsim.log' +- @touch mcsim.log +- @date >> mcsim.log +-# +- @echo +- @echo ---------- +- @echo +- @echo Testing with the tetrachloroethylene model +- @mod perc.model +- @gcc -I . -Wall -ansi -c model.c -o model.o > /dev/null +- @gcc -o mcsim *.o -lm +- @echo ++#one: ++ echo ++ echo ---------- ++ echo ++ echo '* Testing MCSim: this could take a few minutes.' ++ echo '* Creating logfile mcsim.log' ++ touch mcsim.log ++ date >> mcsim.log ++# ++ echo ++ echo ---------- ++ echo ++ echo Testing with the tetrachloroethylene model ++ ../mod/mod perc.model ++ cc -I . -Wall -ansi -c model.c -o model.o > /dev/null ++ cc -o mcsim *.o -lm ++ echo + # + # perc.lsodes.in +- @echo Testing Lsodes with perc.lsodes.in ... +- @chmod -w perc.lsodes.in perc.lsodes.out +- @mcsim perc.lsodes.in sim.out >> mcsim.log +- @(diff sim.out perc.lsodes.out > .tmp) && echo '-PASSED-' ++ echo Testing Lsodes with perc.lsodes.in ... ++ chmod -w perc.lsodes.in perc.lsodes.out ++ ./mcsim perc.lsodes.in sim.out >> mcsim.log ++ (diff sim.out perc.lsodes.out > .tmp) && echo '-PASSED-' + # + # perc.ndoses.in +- @echo Testing NDoses with perc.ndoses.in ... +- @chmod -w perc.ndoses.in perc.ndoses.out +- @mcsim perc.ndoses.in sim.out >> mcsim.log +- @(diff sim.out perc.ndoses.out > .tmp) && echo '-PASSED-' ++ echo Testing NDoses with perc.ndoses.in ... ++ chmod -w perc.ndoses.in perc.ndoses.out ++ ./mcsim perc.ndoses.in sim.out >> mcsim.log ++ (diff sim.out perc.ndoses.out > .tmp) && echo '-PASSED-' + # + # perc.mtc.in +- @echo Testing Monte Carlo with perc.mtc.in ... +- @chmod -w perc.mtc.in perc.mtc.out +- @mcsim perc.mtc.in sim.out >> mcsim.log +- @(diff sim.out perc.mtc.out > .tmp) && echo '-PASSED-' ++ echo Testing Monte Carlo with perc.mtc.in ... ++ chmod -w perc.mtc.in perc.mtc.out ++ ./mcsim perc.mtc.in sim.out >> mcsim.log ++ (diff sim.out perc.mtc.out > .tmp) && echo '-PASSED-' + # + # perc.setpoint.in +- @echo Testing Set Point run with perc.setpoint.in ... +- @chmod -w perc.setpoint.dat perc.setpoint.in perc.setpoint.out +- @mcsim perc.setpoint.in sim.out >> mcsim.log +- @(diff sim.out perc.setpoint.out > .tmp) && echo '-PASSED-' +-# +- @echo +- @echo ---------- +- @echo +- @echo Testing with the 1 compartment model +- @mod 1cpt.model +- @gcc -I . -Wall -ansi -c model.c -o model.o > /dev/null +- @gcc -o mcsim *.o -lm +- @echo ++ echo Testing Set Point run with perc.setpoint.in ... ++ chmod -w perc.setpoint.dat perc.setpoint.in perc.setpoint.out ++ ./mcsim perc.setpoint.in sim.out >> mcsim.log ++ (diff sim.out perc.setpoint.out > .tmp) && echo '-PASSED-' ++# ++ echo ++ echo ---------- ++ echo ++ echo Testing with the 1 compartment model ++ ../mod/mod 1cpt.model ++ cc -I . -Wall -ansi -c model.c -o model.o > /dev/null ++ cc -o mcsim *.o -lm ++ echo + # + # 1cpt_no_noise.in +- @echo Testing Lsodes non random output with 1cpt_no_noise.in ... +- @chmod -w 1cpt_no_noise.in 1cpt_no_noise.out +- @mcsim 1cpt_no_noise.in sim.out >> mcsim.log +- @(diff sim.out 1cpt_no_noise.out > .tmp) && echo '-PASSED-' ++ echo Testing Lsodes non random output with 1cpt_no_noise.in ... ++ chmod -w 1cpt_no_noise.in 1cpt_no_noise.out ++ ./mcsim 1cpt_no_noise.in sim.out >> mcsim.log ++ (diff sim.out 1cpt_no_noise.out > .tmp) && echo '-PASSED-' + # + # 1cpt_w._noise.in +- @echo Testing Lsodes randomized output with 1cpt_w._noise.in ... +- @chmod -w 1cpt_w._noise.in 1cpt_w._noise.out +- @mcsim 1cpt_w._noise.in sim.out >> mcsim.log +- @(diff sim.out 1cpt_w._noise.out > .tmp) && echo '-PASSED-' ++ echo Testing Lsodes randomized output with 1cpt_w._noise.in ... ++ chmod -w 1cpt_w._noise.in 1cpt_w._noise.out ++ ./mcsim 1cpt_w._noise.in sim.out >> mcsim.log ++ (diff sim.out 1cpt_w._noise.out > .tmp) && echo '-PASSED-' + # + # 1cpt.MCMC1.in +- @echo Testing MCMC set uncertainties with 1cpt.MCMC1.in ... +- @chmod -w 1cpt.MCMC1.in 1cpt.MCMC1.out +- @mcsim 1cpt.MCMC1.in sim.out >> mcsim.log +- @(diff sim.out 1cpt.MCMC1.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC set uncertainties with 1cpt.MCMC1.in ... ++ chmod -w 1cpt.MCMC1.in 1cpt.MCMC1.out ++ ./mcsim 1cpt.MCMC1.in sim.out >> mcsim.log ++ (diff sim.out 1cpt.MCMC1.out > .tmp) && echo '-PASSED-' + # + # 1cpt.MCMC2.in +- @echo Testing MCMC estimated uncertainties with 1cpt.MCMC2.in ... +- @chmod -w 1cpt.MCMC2.in 1cpt.MCMC2.out +- @mcsim 1cpt.MCMC2.in sim.out >> mcsim.log +- @(diff sim.out 1cpt.MCMC2.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC estimated uncertainties with 1cpt.MCMC2.in ... ++ chmod -w 1cpt.MCMC2.in 1cpt.MCMC2.out ++ ./mcsim 1cpt.MCMC2.in sim.out >> mcsim.log ++ (diff sim.out 1cpt.MCMC2.out > .tmp) && echo '-PASSED-' + # + # 1cpt.MCMC3.in +- @echo Testing MCMC print every 2 iterations with 1cpt.MCMC3.in ... +- @chmod -w 1cpt.MCMC3.in 1cpt.MCMC3.out +- @mcsim 1cpt.MCMC3.in sim.out >> mcsim.log +- @(diff sim.out 1cpt.MCMC3.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC print every 2 iterations with 1cpt.MCMC3.in ... ++ chmod -w 1cpt.MCMC3.in 1cpt.MCMC3.out ++ ./mcsim 1cpt.MCMC3.in sim.out >> mcsim.log ++ (diff sim.out 1cpt.MCMC3.out > .tmp) && echo '-PASSED-' + # + # 1cpt.MCMC4.in +- @echo Testing MCMC estimated bounds on F with 1cpt.MCMC4.in ... +- @chmod -w 1cpt.MCMC4.in 1cpt.MCMC4.out +- @mcsim 1cpt.MCMC4.in sim.out >> mcsim.log +- @(diff sim.out 1cpt.MCMC4.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC estimated bounds on F with 1cpt.MCMC4.in ... ++ chmod -w 1cpt.MCMC4.in 1cpt.MCMC4.out ++ ./mcsim 1cpt.MCMC4.in sim.out >> mcsim.log ++ (diff sim.out 1cpt.MCMC4.out > .tmp) && echo '-PASSED-' + # + # 1cpt.MCMC5.in +- @echo Testing MCMC model-computed SDs with 1cpt.MCMC5.in ... +- @chmod -w 1cpt.MCMC5.in 1cpt.MCMC5.out +- @mcsim 1cpt.MCMC5.in sim.out >> mcsim.log +- @(diff sim.out 1cpt.MCMC5.out > .tmp) && echo '-PASSED-' +-# +- @echo +- @echo ---------- +- @echo +- @echo Testing with the linear model +- @mod linear.model +- @gcc -I . -Wall -ansi -c model.c -o model.o > /dev/null +- @gcc -o mcsim *.o -lm +- @echo ++ echo Testing MCMC model-computed SDs with 1cpt.MCMC5.in ... ++ chmod -w 1cpt.MCMC5.in 1cpt.MCMC5.out ++ ./mcsim 1cpt.MCMC5.in sim.out >> mcsim.log ++ (diff sim.out 1cpt.MCMC5.out > .tmp) && echo '-PASSED-' ++# ++ echo ++ echo ---------- ++ echo ++ echo Testing with the linear model ++ ../mod/mod linear.model ++ cc -I . -Wall -ansi -c model.c -o model.o > /dev/null ++ cc -o mcsim *.o -lm ++ echo + # + # linear.in +- @echo Testing Lsodes with linear.in ... +- @chmod -w linear.in linear.out +- @mcsim linear.in sim.out >> mcsim.log +- @(diff sim.out linear.out > .tmp) && echo '-PASSED-' ++ echo Testing Lsodes with linear.in ... ++ chmod -w linear.in linear.out ++ ./mcsim linear.in sim.out >> mcsim.log ++ (diff sim.out linear.out > .tmp) && echo '-PASSED-' + # + # linear.MCMC1.in +- @echo Testing MCMC 1 experiment with linear.MCMC1.in ... +- @chmod -w linear.MCMC1.in linear.MCMC1.out +- @mcsim linear.MCMC1.in sim.out >> mcsim.log +- @(diff sim.out linear.MCMC1.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC 1 experiment with linear.MCMC1.in ... ++ chmod -w linear.MCMC1.in linear.MCMC1.out ++ ./mcsim linear.MCMC1.in sim.out >> mcsim.log ++ (diff sim.out linear.MCMC1.out > .tmp) && echo '-PASSED-' + # + # linear.MCMC2.in +- @echo Testing MCMC 1 repeated experiment with linear.MCMC2.in ... +- @chmod -w linear.MCMC2.in linear.MCMC2.out +- @mcsim linear.MCMC2.in sim.out >> mcsim.log +- @(diff sim.out linear.MCMC2.out > .tmp) && echo '-PASSED-' ++ echo Testing MCMC 1 repeated experiment with linear.MCMC2.in ... ++ chmod -w linear.MCMC2.in linear.MCMC2.out ++ ./mcsim linear.MCMC2.in sim.out >> mcsim.log ++ (diff sim.out linear.MCMC2.out > .tmp) && echo '-PASSED-' + # + # linear.H.MCMC1.in +- @echo Testing MCMC hierarchical linear model, 10 exps with \ ++ echo Testing MCMC hierarchical linear model, 10 exps with \ + linear.H.MCMC1.in ... +- @chmod -w linear.H.MCMC1.in linear.H.MCMC1.out +- @mcsim linear.H.MCMC1.in sim.out >> mcsim.log +- @(diff sim.out linear.H.MCMC1.out > .tmp) && echo '-PASSED-' ++ chmod -w linear.H.MCMC1.in linear.H.MCMC1.out ++ ./mcsim linear.H.MCMC1.in sim.out >> mcsim.log ++ (diff sim.out linear.H.MCMC1.out > .tmp) && echo '-PASSED-' + # + # linear.H.MCMC2.in +- @echo Testing MCMC hierarchical linear model, B1.1 set with \ ++ echo Testing MCMC hierarchical linear model, B1.1 set with \ + linear.H.MCMC2.in +- @chmod -w linear.H.MCMC2.in linear.H.MCMC2.out +- @mcsim linear.H.MCMC2.in sim.out >> mcsim.log +- @(diff sim.out linear.H.MCMC2.out > .tmp) && echo '-PASSED-' ++ chmod -w linear.H.MCMC2.in linear.H.MCMC2.out ++ ./mcsim linear.H.MCMC2.in sim.out >> mcsim.log ++ (diff sim.out linear.H.MCMC2.out > .tmp) && echo '-PASSED-' + # + # linear.H.MCMC3.in +- @echo Testing MCMC hierarchical model, restart file with \ ++ echo Testing MCMC hierarchical model, restart file with \ + linear.H.MCMC3.in +- @chmod -w linear.H.MCMC3.in linear.H.MCMC3.out +- @mcsim linear.H.MCMC3.in sim.out >> mcsim.log +- @(diff sim.out linear.H.MCMC3.out > .tmp) && echo '-PASSED-' +-# +- @echo +- @echo Hourra! +- @echo MCSim passed all tests. ++ chmod -w linear.H.MCMC3.in linear.H.MCMC3.out ++ ./mcsim linear.H.MCMC3.in sim.out >> mcsim.log ++ (diff sim.out linear.H.MCMC3.out > .tmp) && echo '-PASSED-' ++# ++ echo ++ echo Hourra! ++ echo MCSim passed all tests. + |