Windows Installation Instructions
These are instructions for installing MCSim in Windows XP using open
source compilation tools. They have only been tested on Windows XP.
If you find you need to modify anything to get it to work on any
Windows version, please send your modifications to
setzer.woodrow ]on[ epamail.epa.gov.
Prerequisites:
- Rtools:
This is a collection of tools used to compile the open source
statistical package R. Rtools actually contains a bit more than
you need to compile and use MCSim on Windows, but it seems to be
the most convenient way to get all the tools you need. Be sure to
modify the PATH variable as instructed in Rtools.txt, so that
c:\Rtools\bin, c:\Rtools\mingw\bin, etc. come first in the path.
These patches were tested with Rtools version 2.7, downloaded on 15
April 2008.
- libgsl: Get a binary distribution for Windows. This installation
has been tested with the GnuWin32 distribution of libgsl version
1.8, available at http://gnuwin32.sourceforge.net as of 15 April
2008. There are two choices for download: an installer that
installs all of the GnuWin32 packages in a common tree, or zip
files for the 'bin' files (some sample executables and the dlls)
and the 'lib' files (files for developing software). If you take
the latter choice (the two zip files), it would be convenient to
extract them into the Rtools/mingw tree, as in that case no
additional configuration of Windows is required. Alternatively,
you need to modify the Makefiles so the path to the dynamic library
(.dll), library (.a), and include files (.h) are available to the
MinGW compiler.
To install in Windows, using MinGW and the R compilation tool set:
(The MCSim library is statically linked in this implementation.)
- Unpack the MCSim distribution
- Determine where the package will be installed, e.g.,
C:/Program Files/mcsim
Call this MCSIMHOME
- Set the environment variable MCSIMHOME to the location determined
in (2).
- Put %MCSIMHOME%\bin in your PATH
- Start a new CMD process, and check that steps 3 and 4 have been
recognized (at the command prompt, type 'echo %MCSIMHOME%' and then
'path')
- Go ('cd') to the folder where you have unpacked the MCSim
distribution
- Copy mcsim_patches.tar to the current
folder (the top folder for
MCSim, mcsim/, should be a subfolder of the current folder).
- Type 'tar xvf mcsim_patches.tar'.
This unpacks the patches into the MCSim distribution tree.
- CD to the top folder of the MCSim distribution (probably mcsim)
- Type 'configmgw' at the command prompt. This sets up the appropriate
make files.
- Type 'make' at the command prompt
- Type 'make check' at the command prompt; this will run the tests.
If the tests fail, be sure to check why (look at the .out and .log
files created in the corresponding sample/ folder; often the new program
gives results to 1 fewer significant digit than the comparison
result, which will cause the test to appear to fail.
- If you have a full TeX installation (e.g., MikTeX), type
'make docs' to make the pdf and info versions of the documentation.
- If successful, type 'make install'; this puts everything in the
folder pointed to by MCSIMHOME.
- If you need to move the MCsim installation somewhere else, change
MCSIMHOME to point to the new location.
What works:
- makemcsim works as advertised, but the executable is statically
linked to the MCSim library. However, it still depends on the dynamic
link libraries, libgsl.dll and libgslcblas.dll
- makemcsims produces a fully statically linked executable, which
should run fully standalone.
- makemcsimd does not yet work.
- html (and pdf, if 'make docs' works for you) is in %MCSIMHOME%\doc.