Ignore:
Timestamp:
Mar 9, 2017, 9:43:23 AM (8 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_ChronosMutex, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
Children:
7672284
Parents:
ba1152
git-author:
Frederik Heber <heber@…> (03/08/17 08:11:59)
git-committer:
Frederik Heber <heber@…> (03/09/17 09:43:23)
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/mpqc_open/src/bin/mpqc/Makefile.am

    rba1152 rfbf005  
    1 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib
     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
    25
    36bin_PROGRAMS = molecuilder_mpqc
    47
    5 noinst_LTLIBRARIES = libmpqc.la
     8lib_LTLIBRARIES = \
     9        libmolecuilder_mpqc.la
    610
    7 libmpqc_la_SOURCES = \
     11noinst_LTLIBRARIES = \
     12        libmolecuilder_mpqc_extract_dummy.la
     13
     14LIBMPQCSOURCES = \
     15        mpqc.cc \
    816        mpqcin.cc \
     17        parse.cc \
     18        scan.cc
     19
     20LIBMPQCHEADERS = \
     21        mpqc.h \
    922        mpqcin.h \
    10         parse.cc \
    1123        parse.h \
    12         scan.cc \
    1324        scdirlist.h
    1425
     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
    1575molecuilder_mpqc_SOURCES = \
    16         mpqc.cc
     76        mpqc_main.cc
    1777
    18 molecuilder_mpqc_CPPFLAGS = \
    19         $(AM_CPPFLAGS) \
    20         -DHAVE_JOBMARKET -I$(top_srcdir)/../JobMarket/src -I$(top_builddir)/../JobMarket -I$(top_srcdir)/../../src -I$(top_srcdir)/../LinearAlgebra/src $(BOOST_SYSTEM_CFLAGS) \
    21         -DHAVE_MPQCDATA -I$(top_builddir)/../../src
    22 
    23 molecuilder_mpqc_LDFLAGS = \
    24         $(AM_LDFLAGS) \
    25         -L$(top_builddir)/../JobMarket/src/JobMarket/.libs -Wl,-rpath,$(top_builddir)/../JobMarket/src/JobMarket/.libs \
    26         -L$(top_builddir)/../../src/.libs -Wl,-rpath,$(top_builddir)/../../src/.libs \
    27         $(BOOST_SYSTEM_LDFLAGS)
    2878molecuilder_mpqc_LDADD = \
    29         libmpqc.la ../../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 \
    30         -lJobMarketPoolWorker -lJobMarket  \
    31         -lMolecuilderJobs -lMolecuilderFragmentationSummation \
    32         -lboost_serialization
     79        libmolecuilder_mpqc.la libmolecuilder_mpqc_extract_dummy.la
    3380if COND_LIBINT
    3481molecuilder_mpqc_LDADD += -lint
Note: See TracChangeset for help on using the changeset viewer.