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
  • src/Jobs/Makefile.am

    rba1152 rfbf005  
    5656
    5757lib_LTLIBRARIES += \
    58         libMolecuilderJobs.la
     58        libMolecuilderJobs.la \
     59        libmolecuilder_mpqc_extract.la
    5960noinst_LTLIBRARIES += \
    6061        libMolecuilderJobs_Work.la
     62
     63### libmolecuilder_mpqc_extract.la
     64libmolecuilder_mpqc_extract_la_SOURCES = \
     65        Jobs/mpqc_extract.cc \
     66        $(top_srcdir)/ThirdParty/mpqc_open/src/bin/mpqc/mpqc.h
     67libmolecuilder_mpqc_extract_la_LDFLAGS = \
     68        $(AM_CPPFLAGS) \
     69        -L$(abs_top_builddir)/../JobMarket/src/JobMarket/.libs -Wl,-rpath,$(abs_top_builddir)/../JobMarket/src/JobMarket/.libs \
     70        -L$(abs_top_builddir)/../../src/.libs -Wl,-rpath,$(abs_top_builddir)/../../src/.libs \
     71        $(BOOST_SYSTEM_LDFLAGS)
     72libmolecuilder_mpqc_extract_la_CPPFLAGS = \
     73        $(AM_CPPFLAGS) \
     74        ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} \
     75        $(BOOST_SYSTEM_CFLAGS) \
     76        -DHAVE_MPQCDATA \
     77        -DHAVE_JOBMARKET \
     78        -I$(top_builddir)/ThirdParty/mpqc_open/src/lib \
     79        -I$(top_srcdir)/ThirdParty/mpqc_open/src/lib \
     80        -I$(top_srcdir)/ThirdParty/mpqc_open/src/bin/mpqc
     81libmolecuilder_mpqc_extract_la_LIBADD = \
     82        libMolecuilderJobs.la \
     83        libMolecuilderFragmentationSummation.la \
     84        -lboost_serialization
     85
     86### libMolecuilderJobs_Work.la
     87libMolecuilderJobs_Work_la_CPPFLAGS = \
     88        $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS) \
     89        -I$(top_builddir)/ThirdParty/mpqc_open/src/lib \
     90        -I$(top_srcdir)/ThirdParty/mpqc_open/src/lib \
     91        -I$(top_srcdir)/ThirdParty/mpqc_open/src/bin/mpqc
     92libMolecuilderJobs_Work_la_LDFLAGS = $(AM_LDFLAGS)
     93if CONDJOBMARKET
     94libMolecuilderJobs_Work_la_LDFLAGS += \
     95  $(JobMarket_LDFLAGS)
     96endif
     97
     98### libMolecuilderJobs.la
    6199libMolecuilderJobs_la_includedir = $(includedir)/MoleCuilder/
    62100nobase_libMolecuilderJobs_la_include_HEADERS = $(JOBSHEADER)
    63 libMolecuilderJobs_la_CPPFLAGS = $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS)
    64 libMolecuilderJobs_Work_la_CPPFLAGS = $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS)
     101libMolecuilderJobs_la_CPPFLAGS = \
     102        $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS)
    65103libMolecuilderJobs_la_LDFLAGS = $(AM_LDFLAGS) \
    66104  $(BOOST_IOSTREAMS_LDFLAGS) \
    67105  $(BOOST_SERIALIZATION_LDFLAGS) \
    68106  $(BOOST_SYSTEM_LDFLAGS)
    69 libMolecuilderJobs_Work_la_LDFLAGS = $(AM_LDFLAGS)
    70 if CONDJOBMARKET
    71107libMolecuilderJobs_la_LDFLAGS += \
    72108  $(JobMarket_LDFLAGS)
    73 libMolecuilderJobs_Work_la_LDFLAGS += \
    74   $(JobMarket_LDFLAGS)
    75 endif
    76 
    77109libMolecuilderJobs_la_LDFLAGS += \
    78110  $(CodePatterns_LDFLAGS)
     
    87119endif
    88120endif
    89 
    90121if CONDJOBMARKET
    91122libMolecuilderJobs_la_LIBADD += \
    92123  $(JobMarket_LIBS)
    93124libMolecuilderJobs_Work_la_LIBADD = \
     125        $(top_builddir)/ThirdParty/mpqc_open/src/bin/mpqc/libmolecuilder_mpqc.la \
     126        libmolecuilder_mpqc_extract.la \
    94127  $(JobMarket_LIBS)
    95128endif
Note: See TracChangeset for help on using the changeset viewer.