Merge branch 'release-4-5-patches' of git.gromacs.org:gromacs into release-4-5-patches
[gromacs/rigid-bodies.git] / INSTALL
blobd6f7bccba00658764c1e381b497cb801a68d8bb1
2                     Welcome to GROMACS!
4 Note: Detailed, step-by-step installation instructions
5 are available on the website http://www.gromacs.org .
7 You will probably have to download and install FFTW the first
8 time you install GROMACS - our configuration script will check it!
12 * SHORT INSTRUCTIONS FOR THE IMPATIENT:
14 GROMACS uses a standard autoconf script and makefiles created 
15 by automake, like most GNU programs. This means your normal 
16 installation actions are limited to:
18 ./configure   
19 make
20 make install          
22 That's it! Most compiler flags and required libraries are checked
23 automatically by configure, and it will tell you if something is
24 missing. The default installation location is /usr/local/gromacs
25 (change it with --prefix).  
29 * INSTALLING FFTW:
31 The FFTW library has been removed from the distribution since it 
32 is not part of our package, but it is very easy to install separately
33 if it is not already present. Download the source code from 
34 http://www.fftw.org , or get it from http://www.gromacs.org .
36 Read the FFTW installation instructions for details. In short, to
37 install the single precision library under /usr/local type
39 ./configure --enable-float
41 and then type
43 make
44 make install
46 Note that in contrast to GROMACS, FFTW defaults to double. Even
47 if you don't think you'll need it's a good idea to install the
48 double precision libraries too, once and for all. Clean your
49 build by issuing 
51 make distclean
53 and then type
55 ./configure --enable-type-prefix
56 make
57 make install
59 Your double precision FFTW files will have a "d" prefix.
61 (It is possible to compile a crippled GROMACS without FFTW, but we
62 strongly discourage it - check the configure options for details)
66 * FFTW OR OTHER LIBRARIES IN NON-STANDARD LOCATIONS:
68 If you install FFTW in your homedirectory or some other place where
69 it isn't found automatically (not all systems search /usr/local)
70 by the compiler you should set the environment variables before 
71 executing configure. Assume we configured and installed FFTW with 
72 --prefix=/home/erik/fftw. If your shell is tcsh, you set
74 setenv CPPFLAGS -I/home/erik/fftw/include
75 setenv LDFLAGS  -L/home/erik/fftw/lib
77 or, if you are using a bash shell:
79 export CPPFLAGS=-I/home/erik/fftw/include
80 export LDFLAGS=-L/home/erik/fftw/lib
82 ...and then you run the Gromacs configure script. Similarly, if you
83 don't like the compilers configure selects, just set them with 
84 the variables CC and/or F77 (MPICC for an MPI compiler).
86 Don't use LDFLAGS to add extra libraries! Put them in LIBS instead, e.g.
88 setenv LIBS "-lstuff"     to add libstuff at the linking stage.
91 Once installed, you can link the Gromacs executables to e.g.
92 /usr/local/bin if you want all users to have them in their path.
96 * SPECIAL OPTIONS; FORTRAN, ASSEMBLY AND PARALLEL GROMACS WITH MPI:
98 Typing ./configure --help will give you some options like compiling
99 for parallel runs using MPI. Not all architecture use the fast
100 fortran loops per default, so if you know you have a fast fortan
101 compiler you should check that option. It won't have much effect
102 for modern x86 boxes though, since these use assembly innerloops.
104 To compile the assembly loops you need a reasonably recent version
105 of binutils. The configuration script checks it - pick up a later
106 version at www.gromacs.org if yours is too old. Don't disable
107 the assembly loops unless you absolutely have to...
110 For instance, if you want to compile only the mdrun executable
111 with parallel MPI support:
113 make clean               
114 ./configure --enable-mpi
115 make mdrun 
116 make install-mdrun
118 If you want to keep your non-mpi mdrun instead of overwriting
119 it, you can append a suffix with --program-suffix="_mpi":
120 If you only want to create the MPI version of the entire package 
121 you can just issue the normal make commands. The mdrun-only
122 installation can also be useful to have e.g. a general version 
123 of gromacs for analysis in the main binary directory, and then 
124 subdirectories with only an optimized mdrun for each cpu.
126 You can find more installation information on the GROMACS homepage
127 if you have any problems, and don't hesitate to contact us if you 
128 find any bugs in the configuration. The architecture names have 
129 been expanded and are almost identical to the GNU ones, but where 
130 it is possible we have added an extra level with more detailed 
131 processor specifications to enable higher optimization. If you 
132 have a very heterogeneous environment it might be a good idea
133 to compile a full non-optimized version in the main directory,
134 and then just optimized versions of mdrun in the processor
135 subdirectories!
139 * VPATH BUILDS:
141 If you want to do development on several architectures, you should
142 use a version of make that support VPATH (we suggest GNU make)
143 and create a new directory to contain the object files for this 
144 architecture (e.g. i686-pc-linux-gnu/obj). Then run configure from this 
145 new directory (../../configure) - you might have to make distclean first.
146 This way you keep all your object files (speeds up compiles) and 
147 change architecture by switching to a different object directory.
151 * ARE YOU STILL HAVING PROBLEMS?
153 Post it to the GROMACS mailing lists. We read these on a regular basis,
154 and in many cases another user might already be familiar with the
155 task you're trying to perform!
159                 Good luck compiling and running! 
161                        THE GROMACS CREW 
163                       gromacs@gromacs.org
167 ---------------------------------------------------------------------
169 These are the generic install instructions from autoconf:
170   
171    The `configure' shell script attempts to guess correct values for
172 various system-dependent variables used during compilation.  It uses
173 those values to create a `Makefile' in each directory of the package.
174 It may also create one or more `.h' files containing system-dependent
175 definitions.  Finally, it creates a shell script `config.status' that
176 you can run in the future to recreate the current configuration, a file
177 `config.cache' that saves the results of its tests to speed up
178 reconfiguring, and a file `config.log' containing compiler output
179 (useful mainly for debugging `configure').
181    If you need to do unusual things to compile the package, please try
182 to figure out how `configure' could check whether to do them, and mail
183 diffs or instructions to the address given in the `README' so they can
184 be considered for the next release.  If at some point `config.cache'
185 contains results you don't want to keep, you may remove or edit it.
187    The file `configure.in' is used to create `configure' by a program
188 called `autoconf'.  You only need `configure.in' if you want to change
189 it or regenerate `configure' using a newer version of `autoconf'.
191 The simplest way to compile this package is:
193   1. `cd' to the directory containing the package's source code and type
194      `./configure' to configure the package for your system.  If you're
195      using `csh' on an old version of System V, you might need to type
196      `sh ./configure' instead to prevent `csh' from trying to execute
197      `configure' itself.
199      Running `configure' takes awhile.  While running, it prints some
200      messages telling which features it is checking for.
202   2. Type `make' to compile the package.
204   3. Optionally, type `make check' to run any self-tests that come with
205      the package.
207   4. Type `make install' to install the programs and any data files and
208      documentation.
210   5. You can remove the program binaries and object files from the
211      source code directory by typing `make clean'.  To also remove the
212      files that `configure' created (so you can compile the package for
213      a different kind of computer), type `make distclean'.  There is
214      also a `make maintainer-clean' target, but that is intended mainly
215      for the package's developers.  If you use it, you may have to get
216      all sorts of other programs in order to regenerate files that came
217      with the distribution.
219 Compilers and Options
220 =====================
222    Some systems require unusual options for compilation or linking that
223 the `configure' script does not know about.  You can give `configure'
224 initial values for variables by setting them in the environment.  Using
225 a Bourne-compatible shell, you can do that on the command line like
226 this:
227      CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
229 Or on systems that have the `env' program, you can do it like this:
230      env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
232 Compiling For Multiple Architectures
233 ====================================
235    You can compile the package for more than one kind of computer at the
236 same time, by placing the object files for each architecture in their
237 own directory.  To do this, you must use a version of `make' that
238 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
239 directory where you want the object files and executables to go and run
240 the `configure' script.  `configure' automatically checks for the
241 source code in the directory that `configure' is in and in `..'.
243    If you have to use a `make' that does not supports the `VPATH'
244 variable, you have to compile the package for one architecture at a time
245 in the source code directory.  After you have installed the package for
246 one architecture, use `make distclean' before reconfiguring for another
247 architecture.
249 Installation Names
250 ==================
252    By default, `make install' will install the package's files in
253 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
254 installation prefix other than `/usr/local' by giving `configure' the
255 option `--prefix=PATH'.
257    You can specify separate installation prefixes for
258 architecture-specific files and architecture-independent files.  If you
259 give `configure' the option `--exec-prefix=PATH', the package will use
260 PATH as the prefix for installing programs and libraries.
261 Documentation and other data files will still use the regular prefix.
263    In addition, if you use an unusual directory layout you can give
264 options like `--bindir=PATH' to specify different values for particular
265 kinds of files.  Run `configure --help' for a list of the directories
266 you can set and what kinds of files go in them.
268    If the package supports it, you can cause programs to be installed
269 with an extra prefix or suffix on their names by giving `configure' the
270 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
272 Optional Features
273 =================
275    Some packages pay attention to `--enable-FEATURE' options to
276 `configure', where FEATURE indicates an optional part of the package.
277 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
278 is something like `gnu-as' or `x' (for the X Window System).  The
279 `README' should mention any `--enable-' and `--with-' options that the
280 package recognizes.
282    For packages that use the X Window System, `configure' can usually
283 find the X include and library files automatically, but if it doesn't,
284 you can use the `configure' options `--x-includes=DIR' and
285 `--x-libraries=DIR' to specify their locations.
287 Specifying the System Type
288 ==========================
290    There may be some features `configure' can not figure out
291 automatically, but needs to determine by the type of host the package
292 will run on.  Usually `configure' can figure that out, but if it prints
293 a message saying it can not guess the host type, give it the
294 `--host=TYPE' option.  TYPE can either be a short name for the system
295 type, such as `sun4', or a canonical name with three fields:
296      CPU-COMPANY-SYSTEM
298 See the file `config.sub' for the possible values of each field.  If
299 `config.sub' isn't included in this package, then this package doesn't
300 need to know the host type.
302    If you are building compiler tools for cross-compiling, you can also
303 use the `--target=TYPE' option to select the type of system they will
304 produce code for and the `--build=TYPE' option to select the type of
305 system on which you are compiling the package.
307 Sharing Defaults
308 ================
310    If you want to set default values for `configure' scripts to share,
311 you can create a site shell script called `config.site' that gives
312 default values for variables like `CC', `cache_file', and `prefix'.
313 `configure' looks for `PREFIX/share/config.site' if it exists, then
314 `PREFIX/etc/config.site' if it exists.  Or, you can set the
315 `CONFIG_SITE' environment variable to the location of the site script.
316 A warning: not all `configure' scripts look for a site script.
318 Operation Controls
319 ==================
321    `configure' recognizes the following options to control how it
322 operates.
324 `--cache-file=FILE'
325      Use and save the results of the tests in FILE instead of
326      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
327      debugging `configure'.
329 `--help'
330      Print a summary of the options to `configure', and exit.
332 `--quiet'
333 `--silent'
334 `-q'
335      Do not print messages saying which checks are being made.  To
336      suppress all normal output, redirect it to `/dev/null' (any error
337      messages will still be shown).
339 `--srcdir=DIR'
340      Look for the package's source code in directory DIR.  Usually
341      `configure' can determine that directory automatically.
343 `--version'
344      Print the version of Autoconf used to generate the `configure'
345      script, and exit.
347 `configure' also accepts some other, not widely useful, options.