Compilation of DPMTA code in MMTK

Konrad Hinsen hinsen@cnrs-orleans.fr
Tue, 13 Oct 1998 14:53:31 +0200


I have had a few reports of problems with the compilation of the
DPMTA multipole code as part of MMTK. These seem to be related to
the DPMTA Makefiles, which I don't really want to analyze. I have
therefore modified MMTK's setup file in such a way that the required
DPMTA source code files are directly compiled and linked to the
MMTK module _forcefield, without a prior creation of libraries for
DPMTA. This new setup file should not create any problems with
compilation. Please try it out.

-- ./Setup ----------------------------------------------------------------
*shared*

# low-level force field module

_forcefield -I./dpmta/src -I./dpmta/mpole -DWITH_DPMTA \
       -DSERIAL -DVIRIAL -DMACROSCOPIC \
       _forcefieldmodule.c bonded.c nonbonded.c sparsefc.c \
       ./dpmta/mpole/mpe_fft.c ./dpmta/mpole/mpe_misc.c \
       ./dpmta/mpole/mpe_mpoleC.c ./dpmta/mpole/mpe_allocC.c \
       ./dpmta/mpole/mpe_mpoleLJ.c ./dpmta/mpole/mpe_allocLJ.c \
       ./dpmta/src/dpmta_serial.c ./dpmta/src/dpmta_slvmkcell.c \
       ./dpmta/src/dpmta_slvmcalc.c ./dpmta/src/dpmta_slvpcalc.c \
       ./dpmta/src/dpmta_slvmkil.c ./dpmta/src/dpmta_slvmkhl.c \
       ./dpmta/src/dpmta_slvcompute.c ./dpmta/src/dpmta_slvmacro.c \
       ./dpmta/src/dpmta_slvscale.c ./dpmta/src/dpmta_timer.c \
       ./dpmta/src/dpmta_slvglobals.c ./dpmta/src/dpmta_distmisc.c \
       -lm

# To compile without DPMTA, use the following line:
#_forcefield _forcefieldmodule.c bonded.c nonbonded.c sparsefc.c -lm


# minimization and dynamics

_trajectory _trajectorymodule.c
_dynamics _dynamicsmodule.c
_minimization _minimizationmodule.c

# Lutz Ehrlich's DCD reader/writer

_DCD  _DCD.c ReadDCD.c

# Lutz Ehrlich's molecular surface module

_surface _surface.c nsc.c -lm

# The minimal subset of LAPACK needed for efficient normal mode
# calculations.
lapack_dsyev lapack_dsyev.c dsyev.c -lm
---------------------------------------------------------------------------

You also need a modified version of compile.py with this new
Setup file:

-- ./compile.py -----------------------------------------------------------
# Compile the MMTK extension modules

import os, string, sys
import compileall

lib = os.path.join(os.path.join(sys.exec_prefix, 'lib'),
		   'python'+sys.version[:3])

if not os.path.exists('Makefile.pre.in'):
    source = os.path.join(os.path.join(lib, 'config'), 'Makefile.pre.in')
    if os.path.exists(source):
	os.system('cp ' + source + ' .')
    else:
	print "Copy Misc/Makefile.pre.in from the Python distribution"
	print "to this directory and try again."

compileall.compile_dir(".")
os.system("make -f Makefile.pre.in boot")
os.system("make")
---------------------------------------------------------------------------

If there are still compilation problems, please let me know!

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------