• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂5ab348e37fe7d3fe999f73aab022043086231e61 (tree)
時間2013-02-15 19:09:35
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Memory leak about ZindoS::atomicUnpairedPopulationCIS is fixed. #30786

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1299 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

差異

--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -89,13 +89,19 @@ ZindoS::~ZindoS(){
8989 this->molecule->GetNumberAtoms(),
9090 CartesianType_end);
9191 if(Parameters::GetInstance()->RequiresMullikenCIS()){
92+ vector<int>* elecStates = Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS();
9293 MallocerFreer::GetInstance()->Free<double>(&this->orbitalElectronPopulationCIS,
93- Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS()->size(),
94+ elecStates->size(),
9495 this->molecule->GetTotalNumberAOs(),
9596 this->molecule->GetTotalNumberAOs());
9697 MallocerFreer::GetInstance()->Free<double>(&this->atomicElectronPopulationCIS,
97- Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS()->size(),
98+ elecStates->size(),
9899 this->molecule->GetNumberAtoms());
100+ if(Parameters::GetInstance()->RequiresUnpairedPopCIS()){
101+ MallocerFreer::GetInstance()->Free<double>(&this->atomicUnpairedPopulationCIS,
102+ elecStates->size(),
103+ this->molecule->GetNumberAtoms());
104+ }
99105 }
100106 //this->OutputLog("ZindoS deleted\n");
101107 }
--- a/test/c2h6_pm3_directCIS_singlet.dat
+++ b/test/c2h6_pm3_directCIS_singlet.dat
@@ -1,6 +1,6 @@
11
22
3- >>>>> Welcome to the MolDS world at 2013/2/12(Thu.) 4:54:12 <<<<<
3+ >>>>> Welcome to the MolDS world at 2013/2/15(Fri.) 19:9:14 <<<<<
44
55
66 ********** START: Parse input **********
@@ -123,13 +123,13 @@ geometry_end |
123123 Mulliken charge(SCF): 0 6 H 1.000000e+00 3.744436e-02
124124 Mulliken charge(SCF): 0 7 H 1.000000e+00 4.258139e-02
125125
126- Elapsed time(omp) for the SCF = 0.056755[s].
126+ Elapsed time(omp) for the SCF = 0.043375[s].
127127 ********** DONE: PM3-SCF **********
128128
129129
130130 ********** START: PM3-CIS **********
131131 ----------- START: Calculation of the CIS matrix -----------
132- Elapsed time(omp) for the calc. of the CIS matrix = 0.062558[s].
132+ Elapsed time(omp) for the calc. of the CIS matrix = 0.051392[s].
133133 ----------- DONE: Calculation of the CIS matrix -----------
134134
135135 ====== START: Direct-CIS =====
@@ -382,19 +382,19 @@ geometry_end |
382382 Unpaired electron population: 20 7 H 2.323780e-01
383383
384384
385- Elapsed time(omp) for the CIS = 0.091962[s].
385+ Elapsed time(omp) for the CIS = 0.072443[s].
386386 ********** DONE: PM3-CIS **********
387387
388388
389389 Summary for memory usage:
390- Max Heap: 0.299200[MB].
391- Current Heap(Leaked): 0.000144[MB].
390+ Max Heap: 0.266276[MB].
391+ Current Heap(Leaked): 0.000000[MB].
392392
393393
394394 >>>>> The MolDS finished normally! <<<<<
395395 >>>>> CPU time: 0.13[s]. <<<<<
396396 >>>>> Elapsed time: 0[s]. <<<<<
397- >>>>> Elapsed time(OMP): 0.152995[s]. <<<<<
397+ >>>>> Elapsed time(OMP): 0.123206[s]. <<<<<
398398 >>>>> See you. <<<<<
399399
400400