source: ThirdParty/mpqc_open/src/bin/mpqc/Makefile.am

Candidate_v1.6.1
Last change on this file was fbf005, checked in by Frederik Heber <heber@…>, 8 years ago

HUGE: Extracted libmolecuilder_mpqc that is now linked to poolworker.

  • This stops the problems with MemDebug and mpqc when linking against libLinearAlgebra in debug mode: static global variables in libLinAlg are allocated using MemDebug (prefixed with a checksum) but are deallocated using normal libc's free() on exit. This causes an invalid free() as the ptr given to free points inside the block and not at its start. The problem comes from mpqc's use of own new and delete implementation. I'm guessing its reference counting is the culprit. Hence, we need to separate these two compilations from another in different units/libraries. Therefore, we have split off libmolecuilder_mpqc, .._mpqc_extract and additionally place the MPQCJob::Work() implementation inside libMolecuilderJobs_Work.
  • libmolecuilder_mpqc contains all MPQC's code in mpqc.cc (and linked libraries) that is not the main() function.
  • libmolecuilder_mpqc_extract contains functions that extract results such as energies, forces, charge grids from the obtained mpqc solution. These were added by myself to the mpqc code before.
  • molecuilder_mpqc is then linked against a NoOp .._extract library version. Thereby, it does not use any of the Molecuilder or related libraries and does not come in contact with MemDebug.
  • molecuilder_poolworker however is linked with the full .._extract library and hence performs these extractions.
  • poolworker now executes MPQCJob, MPQCCommandJob, and VMGJob and therefore needs to enforce binding to all of them.
  • TESTS: renamed molecuilder_mpqc.in to molecuilder_poolworker.in.
  • Property mode set to 100644
File size: 4.3 KB
Line 
1AM_CPPFLAGS = \
2 -I$(top_srcdir)/include -I$(top_srcdir)/src/lib \
3 -DHAVE_JOBMARKET -I$(top_srcdir)/../JobMarket/src -I$(top_builddir)/../JobMarket -I$(top_srcdir)/../../src -I$(top_srcdir)/../LinearAlgebra/src -I$(top_srcdir)/../CodePatterns/src $(BOOST_SYSTEM_CFLAGS) \
4 -DHAVE_MPQCDATA -I$(top_builddir)/../../src
5
6bin_PROGRAMS = molecuilder_mpqc
7
8lib_LTLIBRARIES = \
9 libmolecuilder_mpqc.la
10
11noinst_LTLIBRARIES = \
12 libmolecuilder_mpqc_extract_dummy.la
13
14LIBMPQCSOURCES = \
15 mpqc.cc \
16 mpqcin.cc \
17 parse.cc \
18 scan.cc
19
20LIBMPQCHEADERS = \
21 mpqc.h \
22 mpqcin.h \
23 parse.h \
24 scdirlist.h
25
26libmolecuilder_mpqc_extract_dummy_la_SOURCES = \
27 mpqc_extract_dummy.cc \
28 mpqc_extract.h
29
30libmolecuilder_mpqc_la_includedir = $(includedir)/molecuilder_mpqc/
31libmolecuilder_mpqc_la_CPPFLAGS = $(AM_CPPFLAGS)
32libmolecuilder_mpqc_la_LDFLAGS = $(AM_LDFLAGS)
33
34libmolecuilder_mpqc_la_LIBADD = \
35 ../../lib/libSCmbpt.la ../../lib/libSCscf.la ../../lib/libSCdft.la ../../lib/libSCwfn.la ../../lib/libSCpsi.la ../../lib/libSCsolvent.la ../../lib/libSCintv3.la ../../lib/libSCbasis.la ../../lib/libSCoint3.la ../../lib/libSCmolecule.la ../../lib/libSCisosurf.la ../../lib/libSCoptimize.la ../../lib/libSCsymmetry.la ../../lib/libSCscmat.la ../../lib/libSCrender.la ../../lib/libSCgroup.la ../../lib/libSCmisc.la ../../lib/libSCstate.la ../../lib/libSCkeyval.la ../../lib/libSCclass.la ../../lib/libSCcontainer.la ../../lib/libSCref.la ../../lib/libSCoptions.la
36
37nobase_libmolecuilder_mpqc_la_include_HEADERS = ${LIBMPQCHEADERS}
38
39## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
40## target. Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
41## will therefore be treated as if it were literally part of the target name,
42## and the variable name derived from that.
43## The file extension .cc is recognized by Automake, and makes it produce
44## rules which invoke the C++ compiler to produce a libtool object file (.lo)
45## from each source file. Note that it is not necessary to list header files
46## which are already listed elsewhere in a _HEADERS variable assignment.
47libmolecuilder_mpqc_la_SOURCES = ${LIBMPQCSOURCES}
48
49## Instruct libtool to include ABI version information in the generated shared
50## library file (.so). The library ABI version is defined in configure.ac, so
51## that all version information is kept in one place.
52libmolecuilder_mpqc_la_LDFLAGS += -version-info $(MPQC_SO_VERSION)
53
54## The generated configuration header is installed in its own subdirectory of
55## $(libdir). The reason for this is that the configuration information put
56## into this header file describes the target platform the installed library
57## has been built for. Thus the file must not be installed into a location
58## intended for architecture-independent files, as defined by the Filesystem
59## Hierarchy Standard (FHS).
60## The nodist_ prefix instructs Automake to not generate rules for including
61## the listed files in the distribution on 'make dist'. Files that are listed
62## in _HEADERS variables are normally included in the distribution, but the
63## configuration header file is generated at configure time and should not be
64## shipped with the source tarball.
65libmolecuilder_mpqc_la_libincludedir = $(libdir)/molecuilder_mpqc/include
66nodist_libmolecuilder_mpqc_la_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
67
68## Install the generated pkg-config file (.pc) into the expected location for
69## architecture-dependent package configuration information. Occasionally,
70## pkg-config files are also used for architecture-independent data packages,
71## in which case the correct install location would be $(datadir)/pkgconfig.
72#pkgconfigdir = $(libdir)/pkgconfig
73#pkgconfig_DATA = $(top_builddir)/molecuilder_mpqc.pc
74
75molecuilder_mpqc_SOURCES = \
76 mpqc_main.cc
77
78molecuilder_mpqc_LDADD = \
79 libmolecuilder_mpqc.la libmolecuilder_mpqc_extract_dummy.la
80if COND_LIBINT
81molecuilder_mpqc_LDADD += -lint
82endif
83if COND_LIBR12
84molecuilder_mpqc_LDADD += -lr12
85endif
86if COND_LIBDERIV
87molecuilder_mpqc_LDADD += -lderiv
88endif
89
90#if HAVE_SC_SRC_LIB_CHEMISTRY_CCA
91#mpqc_CPPFLAGS += -DHAVE_CHEMISTRY_CCA -DCCA_PATH=\"$(libdir)/cca\" -I../../lib/chemistry/cca
92#mpqc_LDFLAGS += -L$(CCA_CHEM_LIB) -L$(CCAFE_LIB) -L$(CCA_SPEC_BABEL_LIB) -L$(BABEL_LIB)
93#mpqc_LDADD += -lccachem_cxx_server -lccachem_cxx_client -lccafeCore -lcca -lsidl -lxml2 -lz
94#endif
Note: See TracBrowser for help on using the repository browser.