[gmx-users] GROMACS on Windows

Erik Lindahl lindahl at stanford.edu
Tue Apr 16 23:19:07 CEST 2002


Peter Murray-Rust wrote:

> I am interested in compiling GROMACS under Windows so as to make minor 
> modifications to the code (to produce XML and CML output for re-use). 
> Anton Feenstra suggested I should mail this list. Are there ports of 
> GROMACS to windows? I use gcc and would prefer a final makefile that I 
> can edit rather than the ./configure approach. I have no need of 
> graphics as the program will be run in batch mode. 

Hi Peter,

I've ported everything including the XDR portable-binary format 
routines, so version 3.1.2 and later should compile natively under both 
cygwin and Visual Studio C++. If you use cygwin you can just compile 
fftw (and gromacs) the normal way.

If you want to use Visual studio and run under native windows you should 
have a look in
ftp://ftp.gromacs.org/pub/developer. There's a compiled version of the 
fftw libraries, and project definition files for both fftw and gromacs 
to be used with Visual Studio. There's also a binary package (installer) 
available for native windows on the web download pages.

We actually used to have 'normal' makefiles - but I can _definitely_ 
recommend autoconf/automake/libtool - it's much, much easier and more 
powerful once you get the syntax and everything is portable.

You can probably retrieve our old makefiles by using CVS and getting 
earlier versions of 'Makefile' in each directory - it will probably 
require some tweaking to update them, though.


If you really want create your own classic makefiles and only need it to 
run on windows, here's a short version of what to do:

1. Run ./configure once to get all the definitions in src/config.h

2. Create makefiles for the two libraries in gmxlib and mdlib. You 
should be able to use assembly loops, so don't care about fortran.

2a) The mdlib directory is easy. Just compile all the C source files 
listed as part of the library in 'Makefile.am' into a library.

2b) In the gmxlib directory you first have to construct the inner loop. 
Just run 'make innerc.c' after you've executed configure the first time 
and use the file innerc.c in the future. (If you want to, you can 
actually enter this in the makefile; just make innerc.c depend on the 
program mkinl, compile mkinl from the sources listed in Makefile.am', 
and run it)  Compile a library from all the C source files and all 
assembly files except axp_asm.s and x86_sse2.s.

3) Compile the programs in kernel and tools and link with the two 
libraries. Some programs require more than one source file, but that 
should be defined in Makefile.am.


Cheers,

Erik







More information about the gromacs.org_gmx-users mailing list