root/branches/mcstas-1.x/INSTALL

Revision 1562, 5.6 KB (checked in by farhi, 6 years ago)

* Updated Release, Version and Origin fields in headers
* Improved setversion to update all McStasx?.y occurencies into current release
* Added 'string' type for DEFINITION parameters to be handled as this type so that auto-quoting occurs in mcgui
* Added possibility to save log of the session to a file (appended) in mcgui
* Made Scilab use either TCL_EvalStr or TK_EvalStr

Line 
1/*******************************************************************************
2*
3* McStas, neutron ray-tracing package
4*         Copyright 1997-2002, All rights reserved
5*         Risoe National Laboratory, Roskilde, Denmark
6*         Institut Laue Langevin, Grenoble, France
7*
8* Documentation: INSTALL
9*
10* %Identification
11* Written by: KN
12* Date: 1997
13* Origin: Risoe
14* Release: all McStas
15* Version: $Revision: 1.17 $
16*
17* This file is part of McStas.
18* It details the installation procedure
19*
20*******************************************************************************/
21
22NOTE: This document is obsolete - please refer to the documents in
23
24install_docs/tex/install.*
25install_docs/html/install.html
26
27McStas uses autoconf to detect the system configuration and create the
28proper Makefiles needed for compilation. On Unix-like systems, you
29should be able to compile and install McStas using the following steps:
30
311. Unpack the sources to somewhere convenient and change to the source
32   directory:
33
34  gunzip -c mcstas-<release>.tar.gz | tar xf -
35  cd mcstas-<release>/
36
372. Configure and compile McStas:
38
39  ./configure
40  make
41
423. Install McStas:
43
44  make install
45
46You should now be able to use McStas. For some examples to try, see the
47examples/ directory.
48
49The installation of McStas in step 3 by default installs in the
50/usr/local/ directory, which on most systems requires superuser (root)
51privileges. To install in another directory, use the --prefix= option to
52configure in step 2. For example,
53
54  ./configure --prefix=/home/joe
55
56will install the McStas programs in /home/joe/bin/ and the library files
57needed by McStas in /home/joe/lib/mcstas/.
58
59In case ./configure makes an incorrect guess, some environment variables
60can be set to override the defaults:
61
62 - The CC environment variable may be set to the name of the C compiler
63   to use (this must be an ANSI C compiler). This will also be used for
64   the automatic compilation of McStas simulations in mcgui and mcrun.
65 - CFLAGS may be set to any options needed by the compiler (eg. for
66   optimization or ANSI C conformance). Also used by mcgui/mcrun.
67 - PERL may be set to the path of the Perl interpreter to use.
68
69To use these options, set the variables before running ./configure. Eg.
70
71    setenv PERL /pub/bin/perl5
72    ./configure
73
74It may be necessary to remove configure's cache of old choices first:
75
76    rm -f config.cache
77
78If you experience any problems, or have some questions or ideas
79concerning McStas, please contact kristian.nielsen@risoe.dk.
80
81
82Installing on non-Unix systems
83==============================
84
85Windows:
86
87McStas has been successfully compiled on Windows using Microsoft
88Visual C++ in 32-bit mode. Define the preprocessor macro 'WIN32' when
89compiling to get McStas to use the Windows file system
90semantics. Search the archive of the mailing list
91(http://neutron.risoe.dk/neutron-mc/) for details. As far as we know,
92the front-end programs have not been used on Windows at this point.
93
94At Ris, we do not use McStas in Windows, so we cannot provide direct
95support for this operating system. Try asking on the mailing list if you
96need help. If you experience a specific problem with using McStas on
97Windows, send a description of the problem to the mailing list so that
98we can fix it in the next version.
99
100If you want to volunteer to provide Windows binaries to other users,
101please contact kristian.nielsen@risoe.dk.
102
103Macintosh:
104
105McStas has been successfully compiled on the Macintosh using Code
106Warrior. Define the preprocessor macro 'MAC' when compiling to get
107McStas to use the Macintosh file system semantics. It is reportedly
108necessary to increase the default size of memory allocated to programs
109by the compiler to make the simulations work. It may also be necessary
110to edit the default file paths in the file port.h, since environment
111variables are (as far as we know) not available on the Macintosh.
112
113At Ris, we do not use McStas on the Macintosh, so we cannot provide
114direct support for this system. Try asking on the mailing list if you
115need help. If you experience a specific problem with using McStas on the
116Macintosh, send a description of the problem to the mailing list so that
117we can fix it in the next version.
118
119
120Troubleshooting
121===============
122
123[Also see the FAQ at http://neutron.risoe.dk/mcstas/FAQ.html for
124up-to-date help on common problems in McStas.]
125
126You should try to make sure that the directory containing the McStas
127binaries (mcstas, gscan, mcdisplay, etc.) is contained in the PATH
128environment variable. The default directory is /usr/local/bin, which is
129usually, but not always, included in PATH. Alternatively, you can
130reference the McStas programs using the full path name, ie.
131
132  /usr/local/bin/mcstas my.instr
133  perl /usr/local/bin/mcrun -N10 -n1e5 mysim -f output ARG=42
134  perl /usr/local/bin/mcdisplay --multi mysim ARG=42
135
136This may also be necessary for the front-end programs if the install
137procedure could not determine the location of the perl interpreter on
138your system.
139
140If McStas is installed properly, it should be able to find the files it
141needs automatically. If not, you should set the MCSTAS environment
142variable to the directory containing the runtime files "mcstas-r.c" and
143"mcstas-r.h" and the standard components (*.comp). Use one of
144
145  MCSTAS=/usr/local/lib/mcstas; export MCSTAS     # sh, bash
146  setenv MCSTAS /usr/local/lib/mcstas             # csh, tcsh
147
148The PGPLOT library, which is used by the mcdisplay frontend, needs the
149PGPLOT_DIR environment variable to be set to the directory containing
150PGPLOT, eg.
151
152  PGPLOT_DIR=/usr/lib/pgplot; export PGPLOT_DIR   # sh, bash
153  setenv PGPLOT_DIR /usr/lib/pgplot               # csh, tcsh
154
155See the PGPLOT documentation for details.
Note: See TracBrowser for help on using the browser.