Changeset c26f44
- Timestamp:
- Oct 5, 2009, 5:21:58 PM (16 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- fa861b
- Parents:
- a33931
- git-author:
- Frederik Heber <heber@…> (10/05/09 17:14:58)
- git-committer:
- Frederik Heber <heber@…> (10/05/09 17:21:58)
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Makefile.am ¶
ra33931 rc26f44 16 16 VectorUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 17 17 VectorUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl 18 TesselationUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp leastsquaremin.cpp leastsquaremin.hpp linkedcell.cpp linkedcell.hpp tesselation.cpp tesselation.hpp tesselationhelpers.cpp tesselationhelpers.hpp tesselationunittest.cpp tesselationunittest.hpp vector.cpp vector.hpp verbose.cpp verbose.hpp18 TesselationUnitTest_SOURCES = defs.hpp helpers.cpp helpers.hpp leastsquaremin.cpp leastsquaremin.hpp linkedcell.cpp linkedcell.hpp memoryallocator.hpp memoryusageobserver.cpp memoryusageobserver.hpp tesselation.cpp tesselation.hpp tesselationhelpers.cpp tesselationhelpers.hpp tesselationunittest.cpp tesselationunittest.hpp vector.cpp vector.hpp verbose.cpp verbose.hpp 19 19 TesselationUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 20 20 TesselationUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl -
TabularUnified src/atom.cpp ¶
ra33931 rc26f44 63 63 { 64 64 Free<int>(&ComponentNr, "atom::~atom: *ComponentNr"); 65 Free<char *>(&Name, "atom::~atom: *Name");65 Free<char>(&Name, "atom::~atom: *Name"); 66 66 }; 67 67 -
TabularUnified src/builder.cpp ¶
ra33931 rc26f44 2057 2057 return 0; 2058 2058 break; 2059 case 2: // just for -f option 2060 delete(molecules); // also free's all molecules contained 2061 delete(periode); 2062 cout << Verbose(0) << "Maximum of allocated memory: " 2063 << MemoryUsageObserver::getInstance()->getMaximumUsedMemory() << endl; 2064 cout << Verbose(0) << "Remaining non-freed memory: " 2065 << MemoryUsageObserver::getInstance()->getUsedMemorySize() << endl; 2066 return 2; 2067 break; 2059 2068 default: 2060 2069 break; -
TabularUnified src/memoryallocator.hpp ¶
ra33931 rc26f44 110 110 * 111 111 * \param pointer to the allocated memory range to free; may be NULL, this function is a no-op then 112 * \param *msg optional error message 112 113 */ 113 template <typename X> void Free(X** buffer )114 template <typename X> void Free(X** buffer, const char *msg = NULL) 114 115 { 115 116 if ((buffer == NULL) || (*buffer == NULL)) -
TabularUnified src/memoryusageobserver.cpp ¶
ra33931 rc26f44 77 77 * 78 78 * \param pointer to the allocated piece of memory 79 * \param *msg optional error message 79 80 */ 80 void MemoryUsageObserver::removeMemory(void* pointer ) {81 void MemoryUsageObserver::removeMemory(void* pointer, const char *msg) { 81 82 map<void*, size_t>::iterator current = memoryUsers.find(pointer); 82 83 83 84 if (current == memoryUsers.end()) { 84 85 cout << "WARNING: There is non-tracked memory to be freed. Pointer " 85 << pointer << " is not registered by MemoryUsageObserver." << endl; 86 << pointer << " is not registered by MemoryUsageObserver: "; 87 if (msg != NULL) 88 cout << *msg; 89 cout << endl; 86 90 return; 87 91 } -
TabularUnified src/memoryusageobserver.hpp ¶
ra33931 rc26f44 28 28 static void purgeInstance(); 29 29 void addMemory(void* pointer, size_t size); 30 void removeMemory(void* pointer );30 void removeMemory(void* pointer, const char *msg = NULL); 31 31 size_t getUsedMemorySize(); 32 32 size_t getMaximumUsedMemory(); -
TabularUnified src/molecules.cpp ¶
ra33931 rc26f44 1606 1606 MinimiseConstrainedPotential(out, PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); 1607 1607 else { 1608 PermutationMap = (atom **) Malloc(AtomCount*sizeof(atom *), "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap");1608 PermutationMap = Malloc<atom *>(AtomCount, "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap"); 1609 1609 Walker = start; 1610 1610 while (Walker->next != end) { -
TabularUnified src/tesselation.cpp ¶
ra33931 rc26f44 552 552 TesselPoint::~TesselPoint() 553 553 { 554 Free<char *>(&Name, "~TesselPoint - *Name");555 554 }; 556 555 -
TabularUnified src/tesselationunittest.cpp ¶
ra33931 rc26f44 84 84 delete(TesselStruct); 85 85 for (LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++) { 86 delete ((*Runner)->Name);86 delete[]((*Runner)->Name); 87 87 delete((*Runner)->node); 88 88 delete(*Runner); … … 178 178 for (set<BoundaryTriangleSet*>::iterator TriangleRunner = triangles->begin(); TriangleRunner != triangles->end(); TriangleRunner++) 179 179 CPPUNIT_ASSERT_EQUAL( true, (*TriangleRunner)->ContainsBoundaryPoint(Walker) ); 180 delete(triangles); 180 181 } 181 182 } -
TabularUnified tests/testsuite.at ¶
ra33931 rc26f44 33 33 AT_DATA([test.conf], []) 34 34 AT_CHECK([../../molecuilder test.conf -e ./ -p test.xyz], 0, [ignore], [ignore]) 35 AT_CHECK([fgrep "Ion_Type1_1" test.conf], 0, [Ion_Type1_1 10.000000000 10.000000000 10.000000000 0 # Number in molecule035 AT_CHECK([fgrep "Ion_Type1_1" test.conf], 0, [Ion_Type1_1 10.000000000 10.000000000 10.000000000 0 # molecule nr 0 36 36 ], [ignore]) 37 AT_CHECK([ cptest.conf main_pcp_linux], 0, [ignore], [ignore])38 AT_DATA([input], [ aa 10. 10. 10. 137 AT_CHECK([mv test.conf main_pcp_linux], 0, [ignore], [ignore]) 38 AT_DATA([input], [maa 10. 10. 10. 1 39 39 s 40 40 q 41 41 ]) 42 AT_CHECK([../../molecuilder -e ./ <input], 0, [ignore], [ignore])42 AT_CHECK([../../molecuilder test.conf -e ./ <input], 0, [ignore], [ignore]) 43 43 AT_CHECK([diff main_pcp_linux test.conf], 0, [ignore], [ignore]) 44 44 # 4. test some more configuration 45 AT_CHECK([../../molecuilder test.conf -e ./ -t -s -b - F -E -c -b -a -U -T -u], 0, [ignore], [stderr])46 AT_CHECK([fgrep -c "Not enough or invalid" stderr], 0, [ 1045 AT_CHECK([../../molecuilder test.conf -e ./ -t -s -b -E -c -b -a -U -T -u], 0, [ignore], [stderr]) 46 AT_CHECK([fgrep -c "Not enough or invalid" stderr], 0, [9 47 47 ], [ignore]) 48 48 AT_CLEANUP … … 75 75 # 4. create the config and check it 76 76 AT_CHECK([../../molecuilder test.conf -e ./ -p test.xyz], 0, [ignore], [ignore]) 77 AT_CHECK([fgrep "Ion_Type1_4" test.conf], 0, [Ion_Type1_4 8.532785963 4.787886018 2.645886050 0 # Number in molecule677 AT_CHECK([fgrep "Ion_Type1_4" test.conf], 0, [Ion_Type1_4 8.532785963 4.787886018 2.645886050 0 # molecule nr 6 78 78 ], [ignore]) 79 79 AT_CHECK([fgrep "Ion_Type2_4" test.conf], 1, [ignore], [ignore])
Note:
See TracChangeset
for help on using the changeset viewer.