• 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

修訂8456332b1b4ea04452b74b02515dbd61ae7a1c66 (tree)
時間2013-11-01 18:27:30
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

trunk.r1561 is merged to branches/fx10. schedule(auto) is removed. #32094 #32381

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/fx10@1562 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

差異

--- a/src/Makefile
+++ b/src/Makefile
@@ -37,9 +37,9 @@ EXENAME = molds
3737 DEPFILE = obj/objfile.dep
3838 LDFLAGS =
3939
40-ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/RealSphericalHarmonicsIndex.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp
41-ALL_HEAD_FILES = base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/RealSphericalHarmonicsIndex.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h
42-ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/RealSphericalHarmonicsIndex.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o
40+ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/RealSphericalHarmonicsIndex.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp
41+ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/RealSphericalHarmonicsIndex.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h
42+ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/RealSphericalHarmonicsIndex.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o
4343
4444 $(EXENAME): $(ALL_OBJ_FILES)
4545 $(CC) -o $@ -Wl,-rpath=$(BOOST_LIB_DIR) -L$(BOOST_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) $(LIBS)
--- a/src/Makefile_GNU
+++ b/src/Makefile_GNU
@@ -34,9 +34,9 @@ EXENAME = molds
3434 DEPFILE = obj/objfile.dep
3535 LDFLAGS =
3636
37-ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp
38-ALL_HEAD_FILES = base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h
39-ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o
37+ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp
38+ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h
39+ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o
4040
4141 $(EXENAME): $(ALL_OBJ_FILES)
4242 $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(BOOST_LIB_DIR) -Wl,-rpath=$(OPENBLAS_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) -L$(OPENBLAS_LIB_DIR) $(LIBS)
--- a/src/base/loggers/DensityLogger.cpp
+++ b/src/base/loggers/DensityLogger.cpp
@@ -28,6 +28,7 @@
2828 #include<stdexcept>
2929 #include<omp.h>
3030 #include<boost/format.hpp>
31+#include"../../config.h"
3132 #include"../Enums.h"
3233 #include"../Uncopyable.h"
3334 #include"../PrintController.h"
@@ -106,7 +107,7 @@ void DensityLogger::DrawDensity(vector<int> elecStateIndeces) const{
106107
107108 // density output
108109 stringstream ompErrors;
109-#pragma omp parallel for schedule(auto)
110+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
110111 for(int n=0; n<elecStateIndeces.size(); n++){
111112 try{
112113 // validate electronic state
--- a/src/base/loggers/MOLogger.cpp
+++ b/src/base/loggers/MOLogger.cpp
@@ -28,6 +28,7 @@
2828 #include<stdexcept>
2929 #include<omp.h>
3030 #include<boost/format.hpp>
31+#include"../../config.h"
3132 #include"../Enums.h"
3233 #include"../Uncopyable.h"
3334 #include"../PrintController.h"
@@ -91,7 +92,7 @@ void MOLogger::DrawMO(vector<int> moIndeces){
9192
9293 // MO output
9394 stringstream ompErrors;
94-#pragma omp parallel for schedule(auto)
95+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
9596 for(int i=0; i<moIndeces.size(); i++){
9697 try{
9798 // validate mo number
--- a/src/cndo/Cndo2.cpp
+++ b/src/cndo/Cndo2.cpp
@@ -28,6 +28,7 @@
2828 #include<stdexcept>
2929 #include<omp.h>
3030 #include<boost/format.hpp>
31+#include"../config.h"
3132 #include"../base/Enums.h"
3233 #include"../base/Uncopyable.h"
3334 #include"../base/PrintController.h"
@@ -871,7 +872,7 @@ void Cndo2::DoDIIS(double** orbitalElectronPopulation,
871872 &diisStoredErrorVect[diisNumErrorVect-1][0][0],
872873 &diisErrorProducts[diisNumErrorVect-1][0]);
873874
874-#pragma omp parallel for schedule(auto)
875+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
875876 for(int mi=0; mi<diisNumErrorVect; mi++){
876877 diisErrorProducts[mi][diisNumErrorVect-1] = diisErrorProducts[diisNumErrorVect-1][mi];
877878 diisErrorProducts[mi][diisNumErrorVect] = -1.0;
@@ -889,7 +890,7 @@ void Cndo2::DoDIIS(double** orbitalElectronPopulation,
889890 if(diisNumErrorVect <= step && diisEndError<diisError && diisError<diisStartError){
890891 hasAppliedDIIS = true;
891892 try{
892-#pragma omp parallel for schedule(auto)
893+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
893894 for(int i=0; i<diisNumErrorVect+1; i++){
894895 for(int j=0; j<diisNumErrorVect+1; j++){
895896 tmpDiisErrorProducts[i][j] = diisErrorProducts[i][j];
@@ -937,7 +938,7 @@ void Cndo2::DoDamp(double rmsDensity,
937938 if(0.0 < dampingWeight && dampingThresh < rmsDensity){
938939 hasAppliedDamping = true;
939940 stringstream ompErrors;
940-#pragma omp parallel for schedule(auto)
941+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
941942 for(int j=0; j<totalNumberAOs; j++){
942943 try{
943944 for(int k=0; k<totalNumberAOs; k++){
@@ -1317,7 +1318,7 @@ double Cndo2::GetMolecularIntegralElement(int moI, int moJ, int moK, int moL,
13171318 void Cndo2::UpdateOldOrbitalElectronPopulation(double** oldOrbitalElectronPopulation,
13181319 double const* const* orbitalElectronPopulation,
13191320 int numberAOs) const{
1320-#pragma omp parallel for schedule(auto)
1321+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
13211322 for(int i=0; i<numberAOs; i++){
13221323 for(int j=0; j<numberAOs; j++){
13231324 oldOrbitalElectronPopulation[i][j] = orbitalElectronPopulation[i][j];
@@ -1336,7 +1337,7 @@ bool Cndo2::SatisfyConvergenceCriterion(double const* const * oldOrbitalElectron
13361337 bool satisfy = false;
13371338 double change = 0.0;
13381339 stringstream ompErrors;
1339-#pragma omp parallel for schedule(auto) reduction(+:change)
1340+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) reduction(+:change)
13401341 for(int i=0; i<numberAOs; i++){
13411342 try{
13421343 for(int j=0; j<numberAOs; j++){
@@ -1406,7 +1407,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix,
14061407 for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
14071408 int calcRank = mu%mpiSize;
14081409 if(mpiRank == calcRank){
1409-#pragma omp parallel for schedule(auto)
1410+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
14101411 for(int B=A; B<totalNumberAtoms; B++){
14111412 try{
14121413 const Atom& atomB = *molecule.GetAtom(B);
@@ -1587,7 +1588,7 @@ void Cndo2::CalcAtomicElectronPopulation(double* atomicElectronPopulation,
15871588 const Molecule& molecule) const{
15881589 int totalNumberAtoms = molecule.GetNumberAtoms();
15891590 MallocerFreer::GetInstance()->Initialize<double>(atomicElectronPopulation, totalNumberAtoms);
1590-#pragma omp parallel for schedule(auto)
1591+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
15911592 for(int A=0; A<totalNumberAtoms; A++){
15921593 int firstAOIndex = molecule.GetAtom(A)->GetFirstAOIndex();
15931594 int numberAOs = molecule.GetAtom(A)->GetValenceSize();
@@ -1617,7 +1618,7 @@ void Cndo2::CalcGammaAB(double** gammaAB, const Molecule& molecule) const{
16171618 int na = atomA.GetValenceShellType() + 1;
16181619 double orbitalExponentA = atomA.GetOrbitalExponent(
16191620 atomA.GetValenceShellType(), s, this->theory);
1620-#pragma omp parallel for schedule(auto)
1621+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
16211622 for(int B=A; B<totalAtomNumber; B++){
16221623 try{
16231624 const Atom& atomB = *molecule.GetAtom(B);
@@ -1697,7 +1698,7 @@ void Cndo2::CalcGammaAB(double** gammaAB, const Molecule& molecule) const{
16971698 MolDS_mpi::molds_mpi_int num = totalAtomNumber*totalAtomNumber;
16981699 MolDS_mpi::MpiProcess::GetInstance()->Broadcast(buff, num, mpiHeadRank);
16991700
1700-#pragma omp parallel for schedule(auto)
1701+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
17011702 for(int A=0; A<totalAtomNumber; A++){
17021703 for(int B=0; B<A; B++){
17031704 gammaAB[A][B] = gammaAB[B][A];
@@ -1813,7 +1814,7 @@ void Cndo2::CalcCartesianMatrixByGTOExpansion(double*** cartesianMatrix,
18131814 if(mpiRank == calcRank){
18141815 for(int a=0; a<numValenceAOsA; a++){
18151816 int mu = firstAOIndexA + a;
1816-#pragma omp parallel for schedule(auto)
1817+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
18171818 for(int B=0; B<totalAtomNumber; B++){
18181819 try{
18191820 const Atom& atomB = *molecule.GetAtom(B);
@@ -3793,7 +3794,7 @@ void Cndo2::CalcOverlapAOsWithAnotherConfiguration(double** overlapAOs,
37933794 overlapAOs[mu][mu] = 1.0;
37943795 }
37953796 bool isSymmetricOverlapAOs = false;
3796-#pragma omp for schedule(auto)
3797+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
37973798 for(int A=0; A<totalAtomNumber; A++){
37983799 const Atom& lhsAtom = *lhsMolecule.GetAtom(A);
37993800 const Atom& rhsAtom = *rhsMolecule->GetAtom(A);
@@ -3937,7 +3938,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{
39373938 MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC,
39383939 OrbitalType_end*OrbitalType_end);
39393940 bool symmetrize = false;
3940-#pragma omp for schedule(auto)
3941+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
39413942 for(int B=A+1; B<totalAtomNumber; B++){
39423943 const Atom& atomB = *molecule.GetAtom(B);
39433944 this->CalcDiatomicOverlapAOsInDiatomicFrame(diatomicOverlapAOs, atomA, atomB);
@@ -3986,7 +3987,7 @@ void Cndo2::CalcOverlapAOs(double** overlapAOs, const Molecule& molecule) const{
39863987 MolDS_mpi::molds_mpi_int num = totalAONumber*totalAONumber;
39873988 MolDS_mpi::MpiProcess::GetInstance()->Broadcast(buff, num, mpiHeadRank);
39883989
3989- #pragma omp parallel for schedule(auto)
3990+ #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
39903991 for(int mu=0; mu<totalAONumber; mu++){
39913992 overlapAOs[mu][mu] = 1.0;
39923993 for(int nu=mu+1; nu<totalAONumber; nu++){
@@ -4321,7 +4322,7 @@ void Cndo2::CalcOverlapAOsByGTOExpansion(double** overlapAOs,
43214322 }
43224323
43234324 stringstream ompErrors;
4324-#pragma omp parallel for schedule(auto)
4325+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
43254326 for(int A=0; A<totalAtomNumber; A++){
43264327 try{
43274328 const Atom& atomA = *molecule.GetAtom(A);
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,27 @@
1+//************************************************************************//
2+// Copyright (C) 2011-2013 Mikiya Fujii //
3+// //
4+// This file is part of MolDS. //
5+// //
6+// MolDS is free software: you can redistribute it and/or modify //
7+// it under the terms of the GNU General Public License as published by //
8+// the Free Software Foundation, either version 3 of the License, or //
9+// (at your option) any later version. //
10+// //
11+// MolDS is distributed in the hope that it will be useful, //
12+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14+// GNU General Public License for more details. //
15+// //
16+// You should have received a copy of the GNU General Public License //
17+// along with MolDS. If not, see <http://www.gnu.org/licenses/>. //
18+//************************************************************************//
19+#ifndef INCLUDED_CONFIG
20+#define INCLUDED_CONFIG
21+namespace MolDS_base{
22+#define MOLDS_OMP_DYNAMIC_CHUNK_SIZE 3
23+}
24+#endif
25+
26+
27+
--- a/src/indo/Indo.cpp
+++ b/src/indo/Indo.cpp
@@ -25,6 +25,7 @@
2525 #include<vector>
2626 #include<stdexcept>
2727 #include<boost/format.hpp>
28+#include"../config.h"
2829 #include"../base/Enums.h"
2930 #include"../base/Uncopyable.h"
3031 #include"../base/PrintController.h"
--- a/src/md/MD.cpp
+++ b/src/md/MD.cpp
@@ -26,6 +26,7 @@
2626 #include<stdexcept>
2727 #include<boost/shared_ptr.hpp>
2828 #include<boost/format.hpp>
29+#include"../config.h"
2930 #include"../base/Enums.h"
3031 #include"../base/Uncopyable.h"
3132 #include"../base/PrintController.h"
@@ -136,7 +137,7 @@ void MD::DoMD(){
136137 }
137138
138139 void MD::UpdateMomenta(const Molecule& molecule, double const* const* matrixForce, double dt) const{
139-#pragma omp parallel for schedule(auto)
140+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
140141 for(int a=0; a<molecule.GetNumberAtoms(); a++){
141142 Atom* atom = molecule.GetAtom(a);
142143 for(int i=0; i<CartesianType_end; i++){
@@ -146,7 +147,7 @@ void MD::UpdateMomenta(const Molecule& molecule, double const* const* matrixForc
146147 }
147148
148149 void MD::UpdateCoordinates(Molecule& molecule, double dt) const{
149-#pragma omp parallel for schedule(auto)
150+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
150151 for(int a=0; a<molecule.GetNumberAtoms(); a++){
151152 Atom* atom = molecule.GetAtom(a);
152153 double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
--- a/src/mndo/Mndo.cpp
+++ b/src/mndo/Mndo.cpp
@@ -26,6 +26,7 @@
2626 #include<stdexcept>
2727 #include<omp.h>
2828 #include<boost/format.hpp>
29+#include"../config.h"
2930 #include"../base/Enums.h"
3031 #include"../base/Uncopyable.h"
3132 #include"../base/PrintController.h"
@@ -761,7 +762,7 @@ void Mndo::CalcCISMatrix(double** matrixCIS) const{
761762 int moI = this->GetActiveOccIndex(*this->molecule, k);
762763 int moA = this->GetActiveVirIndex(*this->molecule, k);
763764 stringstream ompErrors;
764-#pragma omp parallel for schedule(auto)
765+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
765766 for(int l=k; l<this->matrixCISdimension; l++){
766767 try{
767768 // single excitation from J-th (occupied)MO to B-th (virtual)MO
@@ -1770,7 +1771,7 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
17701771 &tmpRotatedDiatomicOverlapVec,
17711772 &tmpMatrixBC,
17721773 &tmpVectorBC);
1773-#pragma omp for schedule(auto)
1774+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
17741775 for(int indexAtomA=0; indexAtomA<this->molecule->GetNumberAtoms(); indexAtomA++){
17751776 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
17761777 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -1945,7 +1946,7 @@ void Mndo::CalcOrbitalElectronPopulation1stDerivatives(double**** orbitalElectro
19451946 this->SolveCPHF(solutionsCPHF, nonRedundantQIndeces, redundantQIndeces);
19461947 this->TransposeFockMatrixMatrix(transposedFockMatrix);
19471948 stringstream ompErrors;
1948-#pragma omp parallel for schedule(auto)
1949+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
19491950 for(int mu=0; mu<totalNumberAOs; mu++){
19501951 try{
19511952 for(int nu=0; nu<totalNumberAOs; nu++){
@@ -2036,7 +2037,7 @@ void Mndo::CalcStaticFirstOrderFocks(double** staticFirstOrderFocks,
20362037 const vector<MoIndexPair>& nonRedundantQIndeces,
20372038 const vector<MoIndexPair>& redundantQIndeces) const{
20382039 stringstream ompErrors;
2039-#pragma omp parallel for schedule(auto)
2040+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
20402041 for(int indexAtomA=0; indexAtomA<this->molecule->GetNumberAtoms(); indexAtomA++){
20412042 try{
20422043 for(int axisA=XAxis; axisA<CartesianType_end; axisA++){
@@ -2325,7 +2326,7 @@ void Mndo::CalcMatrixCPHF(double** matrixCPHF,
23252326 {
23262327 try{
23272328 // calc diagonal part of N
2328-#pragma omp for schedule(auto)
2329+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
23292330 for(int i=0; i<dimensionCPHF; i++){
23302331 if(i<nonRedundantQIndeces.size()){
23312332 int moI = nonRedundantQIndeces[i].moI;
@@ -2340,7 +2341,7 @@ void Mndo::CalcMatrixCPHF(double** matrixCPHF,
23402341 }
23412342
23422343 // calc (\Gamma - K)N
2343-#pragma omp for schedule(auto)
2344+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
23442345 for(int i=0; i<nonRedundantQIndeces.size(); i++){
23452346 int moI = nonRedundantQIndeces[i].moI;
23462347 int moJ = nonRedundantQIndeces[i].moJ;
@@ -2352,7 +2353,7 @@ void Mndo::CalcMatrixCPHF(double** matrixCPHF,
23522353 }
23532354 }
23542355
2355-#pragma omp for schedule(auto)
2356+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
23562357 for(int i=nonRedundantQIndeces.size(); i<dimensionCPHF; i++){
23572358 int moI = redundantQIndeces[i-nonRedundantQIndeces.size()].moI;
23582359 int moJ = redundantQIndeces[i-nonRedundantQIndeces.size()].moJ;
@@ -2363,7 +2364,7 @@ void Mndo::CalcMatrixCPHF(double** matrixCPHF,
23632364 }
23642365 }
23652366
2366-#pragma omp for schedule(auto)
2367+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
23672368 for(int i=nonRedundantQIndeces.size(); i<dimensionCPHF; i++){
23682369 int moI = redundantQIndeces[i-nonRedundantQIndeces.size()].moI;
23692370 int moJ = redundantQIndeces[i-nonRedundantQIndeces.size()].moJ;
@@ -2633,7 +2634,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26332634 &tmpVectorBC,
26342635 &tmpDiatomicTwoElecTwoCore);
26352636
2636-#pragma omp for schedule(auto)
2637+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
26372638 for(int b=0; b<this->molecule->GetNumberAtoms(); b++){
26382639 if(a == b){continue;}
26392640 const Atom& atomB = *molecule->GetAtom(b);
@@ -3523,7 +3524,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35233524 MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy);
35243525 MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, dxy*dxy*dxy*dxy);
35253526 // note that terms with condition a==b are not needed to calculate.
3526-#pragma omp for schedule(auto)
3527+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
35273528 for(int b=a+1; b<totalNumberAtoms; b++){
35283529 this->CalcDiatomicTwoElecTwoCore(diatomicTwoElecTwoCore,
35293530 tmpDiatomicTwoElecTwoCore,
@@ -3574,7 +3575,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35743575 throw MolDSException::Deserialize(errorStream);
35753576 }
35763577
3577-#pragma omp parallel for schedule(auto)
3578+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
35783579 for(int a=0; a<totalNumberAtoms; a++){
35793580 for(int b=a+1; b<totalNumberAtoms; b++){
35803581 int i=0;
--- a/src/optimization/BFGS.cpp
+++ b/src/optimization/BFGS.cpp
@@ -29,6 +29,7 @@
2929 #include<stdexcept>
3030 #include<boost/shared_ptr.hpp>
3131 #include<boost/format.hpp>
32+#include"../config.h"
3233 #include"../base/Enums.h"
3334 #include"../base/Uncopyable.h"
3435 #include"../base/PrintController.h"
@@ -381,7 +382,7 @@ void BFGS::ShiftHessianRedundantMode(double** matrixHessian,
381382 vectorsRedundantModes[c] = &matrixesRedundantModes[c][0][0];
382383 }
383384 for(int c=0; c<numTranslationalModes;c++){
384-#pragma omp parallel for schedule(auto)
385+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
385386 for(int n=0;n<numAtoms;n++){
386387 for(int d=0;d<CartesianType_end;d++){
387388 matrixesRedundantModes[c][n][d] = c==d? 1.0 : 0.0;
@@ -394,7 +395,7 @@ void BFGS::ShiftHessianRedundantMode(double** matrixHessian,
394395 vectorsRedundantModes[c+numTranslationalModes] = &matrixesRedundantModes[c+numTranslationalModes][0][0];
395396 }
396397 for(int c=0; c<numRotationalModes;c++){
397-#pragma omp parallel for schedule(auto)
398+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
398399 for(int n=0;n<numAtoms;n++){
399400 const double* xyz = molecule.GetAtom(n)->GetXyz();
400401 for(int d=0;d<CartesianType_end;d++){
--- a/src/optimization/GEDIIS.cpp
+++ b/src/optimization/GEDIIS.cpp
@@ -28,6 +28,7 @@
2828 #include<stdexcept>
2929 #include<boost/shared_ptr.hpp>
3030 #include<boost/format.hpp>
31+#include"../config.h"
3132 #include"../base/Enums.h"
3233 #include"../base/Uncopyable.h"
3334 #include"../base/PrintController.h"
@@ -289,7 +290,7 @@ GEDIIS::GEDIISHistory::Entry::Entry(double energy,
289290 energy(energy),numAtoms(molecule.GetNumberAtoms()),matrixCoordinate(NULL),matrixForce(NULL) {
290291 MallocerFreer::GetInstance()->Malloc(&this->matrixCoordinate, this->numAtoms, CartesianType_end);
291292 MallocerFreer::GetInstance()->Malloc(&this->matrixForce, this->numAtoms, CartesianType_end);
292-#pragma omp parallel for schedule(auto)
293+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
293294 for(int i = 0; i < this->numAtoms; i++){
294295 const Atom* atom = molecule.GetAtom(i);
295296 const double* xyz = atom->GetXyz();
--- a/src/optimization/Optimizer.cpp
+++ b/src/optimization/Optimizer.cpp
@@ -27,6 +27,7 @@
2727 #include<stdexcept>
2828 #include<boost/shared_ptr.hpp>
2929 #include<boost/format.hpp>
30+#include"../config.h"
3031 #include"../base/Enums.h"
3132 #include"../base/Uncopyable.h"
3233 #include"../base/PrintController.h"
@@ -129,7 +130,7 @@ void Optimizer::CheckEnableTheoryType(TheoryType theoryType) const{
129130 }
130131
131132 void Optimizer::ClearMolecularMomenta(Molecule& molecule) const{
132-#pragma omp parallel for schedule(auto)
133+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
133134 for(int a=0; a<molecule.GetNumberAtoms(); a++){
134135 const Atom* atom = molecule.GetAtom(a);
135136 atom->SetPxyz(0.0, 0.0, 0.0);
@@ -137,7 +138,7 @@ void Optimizer::ClearMolecularMomenta(Molecule& molecule) const{
137138 }
138139
139140 void Optimizer::UpdateMolecularCoordinates(Molecule& molecule, double const* const* matrixForce, double dt) const{
140-#pragma omp parallel for schedule(auto)
141+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
141142 for(int a=0; a<molecule.GetNumberAtoms(); a++){
142143 const Atom* atom = molecule.GetAtom(a);
143144 double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
@@ -149,7 +150,7 @@ void Optimizer::UpdateMolecularCoordinates(Molecule& molecule, double const* con
149150 }
150151
151152 void Optimizer::UpdateMolecularCoordinates(Molecule& molecule, double const* const* matrixForce) const{
152-#pragma omp parallel for schedule(auto)
153+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
153154 for(int a=0; a<molecule.GetNumberAtoms(); a++){
154155 const Atom* atom = molecule.GetAtom(a);
155156 for(int i=0; i<CartesianType_end; i++){
--- a/src/wrappers/Blas.cpp
+++ b/src/wrappers/Blas.cpp
@@ -25,6 +25,7 @@
2525 #include<string>
2626 #include<stdexcept>
2727 #include<boost/format.hpp>
28+#include"../config.h"
2829 #include"../base/Uncopyable.h"
2930 #include"../base/PrintController.h"
3031 #include"../base/MolDSException.h"
@@ -305,7 +306,7 @@ void Blas::Dsyr(molds_blas_int n, double alpha,
305306 #else
306307 CBLAS_UPLO uploA=CblasUpper;
307308 cblas_dsyr(CblasRowMajor, uploA, n, alpha, x, incrementX, a, lda);
308-#pragma omp parallel for schedule(auto)
309+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
309310 for(molds_blas_int i=0;i<n;i++){
310311 for(molds_blas_int j=i+1;j<n;j++){
311312 matrixA[j][i] = matrixA[i][j]; // Note that output matrixA is row-major(C/C++ stype)
@@ -690,7 +691,7 @@ void Blas::Dsyrk(molds_blas_int n, molds_blas_int k,
690691 CBLAS_UPLO uploC= isLowerTriangularPartMatrixCUsed ? CblasLower : CblasUpper;
691692 CBLAS_TRANSPOSE transA= isMatrixATransposed ? CblasTrans : CblasNoTrans;
692693 cblas_dsyrk(orderA, uploC, transA, n, k, alpha, a, lda, beta, c, ldc);
693-#pragma omp parallel for schedule(auto)
694+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
694695 for(molds_blas_int i=0;i<n;i++){
695696 for(molds_blas_int j=i+1;j<n;j++){
696697 if(isLowerTriangularPartMatrixCUsed){
--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -28,6 +28,7 @@
2828 #include<algorithm>
2929 #include<omp.h>
3030 #include<boost/format.hpp>
31+#include"../config.h"
3132 #include"../base/Enums.h"
3233 #include"../base/Uncopyable.h"
3334 #include"../base/PrintController.h"
@@ -732,7 +733,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt1stDerivative(const Atom& atomA,
732733 void ZindoS::CalcNishimotoMatagaMatrix(double**** nishimotoMatagaMatrix, const Molecule& molecule) const{
733734 int totalNumberAtoms = molecule.GetNumberAtoms();
734735 stringstream ompErrors;
735-#pragma omp parallel for schedule(auto)
736+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
736737 for(int A=0; A<totalNumberAtoms; A++){
737738 try{
738739 const Atom& atomA = *molecule.GetAtom(A);
@@ -1170,7 +1171,7 @@ void ZindoS::CalcCISProperties(){
11701171 this->electronicTransitionDipoleMoments[excitedState][excitedState][YAxis] = this->electronicTransitionDipoleMoments[groundState][groundState][YAxis];
11711172 this->electronicTransitionDipoleMoments[excitedState][excitedState][ZAxis] = this->electronicTransitionDipoleMoments[groundState][groundState][ZAxis];
11721173 double tmpX=0.0, tmpY=0.0, tmpZ=0.0;
1173-#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(auto)
1174+#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
11741175 for(int l=0; l<this->matrixCISdimension; l++){
11751176 // single excitation from I-th (occupied)MO to A-th (virtual)MO
11761177 int moI = this->GetActiveOccIndex(*this->molecule, l);
@@ -1201,7 +1202,7 @@ void ZindoS::CalcCISProperties(){
12011202 this->electronicTransitionDipoleMoments[excitedState][groundState][YAxis] = 0.0;
12021203 this->electronicTransitionDipoleMoments[excitedState][groundState][ZAxis] = 0.0;
12031204 double tmpX=0.0, tmpY=0.0, tmpZ=0.0;
1204-#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(auto)
1205+#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
12051206 for(int l=0; l<this->matrixCISdimension; l++){
12061207 // single excitation from I-th (occupied)MO to A-th (virtual)MO
12071208 int moI = this->GetActiveOccIndex(*this->molecule, l);
@@ -1226,7 +1227,7 @@ void ZindoS::CalcCISProperties(){
12261227 this->electronicTransitionDipoleMoments[destinationExcitedState][departureExcitedState][YAxis] = 0.0;
12271228 this->electronicTransitionDipoleMoments[destinationExcitedState][departureExcitedState][ZAxis] = 0.0;
12281229 double tmpX=0.0, tmpY=0.0, tmpZ=0.0;
1229-#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(auto)
1230+#pragma omp parallel for reduction(+:tmpX,tmpY,tmpZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
12301231 for(int l=0; l<this->matrixCISdimension; l++){
12311232 // single excitation from I-th (occupied)MO to A-th (virtual)MO
12321233 int moI = this->GetActiveOccIndex(*this->molecule, l);
@@ -1424,7 +1425,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
14241425 if(from != to){
14251426 if(from != groundState && to != groundState){
14261427 // transition dipole moment between different excited states
1427-#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(auto)
1428+#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
14281429 for(int l=0; l<this->matrixCISdimension; l++){
14291430 try{
14301431 double temp = 0.0;
@@ -1462,7 +1463,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
14621463 }
14631464 else if(from == groundState && to != groundState){
14641465 // transition dipole moment from the ground to excited states
1465-#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(auto)
1466+#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
14661467 for(int l=0; l<this->matrixCISdimension; l++){
14671468 try{
14681469 double temp = 0.0;
@@ -1500,7 +1501,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
15001501 }
15011502 else if(from != groundState && to == groundState){
15021503 // transition dipole moment from the excited to ground states
1503-#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(auto)
1504+#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
15041505 for(int l=0; l<this->matrixCISdimension; l++){
15051506 try{
15061507 double temp = 0.0;
@@ -1540,7 +1541,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
15401541 else{
15411542 if(from != groundState){
15421543 // dipole moment of the excited state. It is needed that the dipole of ground state has been already calculated!!
1543-#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(auto)
1544+#pragma omp parallel for reduction(+:valueX,valueY,valueZ) schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
15441545 for(int l=0; l<this->matrixCISdimension; l++){
15451546 try{
15461547 double temp = 0.0;
@@ -1650,7 +1651,7 @@ void ZindoS::CalcOrbitalElectronPopulationCIS(double**** orbitalElectronPopulati
16501651 for(int k=0; k<elecStates->size(); k++){
16511652 int excitedStateIndex = (*elecStates)[k]-1;
16521653 stringstream ompErrors;
1653-#pragma omp parallel for schedule(auto)
1654+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
16541655 for(int mu=0; mu<molecule.GetTotalNumberAOs(); mu++){
16551656 try{
16561657 for(int nu=0; nu<molecule.GetTotalNumberAOs(); nu++){
@@ -1714,7 +1715,7 @@ void ZindoS::CalcAtomicElectronPopulationCIS(double*** atomicElectronPopulationC
17141715 // clac atomic electron population
17151716 for(int k=0; k<elecStates->size(); k++){
17161717 stringstream ompErrors;
1717-#pragma omp parallel for schedule(auto)
1718+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
17181719 for(int a=0; a<totalNumberAtoms; a++){
17191720 try{
17201721 int firstAOIndex = molecule.GetAtom(a)->GetFirstAOIndex();
@@ -1760,7 +1761,7 @@ void ZindoS::CalcAtomicUnpairedPopulationCIS(double*** atomicUnpairedPopulationC
17601761 // calc atomic electron population
17611762 for(int k=0; k<elecStates->size(); k++){
17621763 stringstream ompErrors;
1763-#pragma omp parallel for schedule(auto)
1764+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
17641765 for(int a=0; a<totalNumberAtoms; a++){
17651766 try{
17661767 int firstAOIndex = molecule.GetAtom(a)->GetFirstAOIndex();
@@ -2099,7 +2100,7 @@ void ZindoS::CalcInteractionMatrix(double** interactionMatrix,
20992100 double const* const* expansionVectors,
21002101 int interactionMatrixDimension) const{
21012102 stringstream ompErrors;
2102-#pragma omp parallel for schedule(auto)
2103+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
21032104 for(int k=0; k<interactionMatrixDimension*interactionMatrixDimension; k++){
21042105 try{
21052106 int i = k/interactionMatrixDimension;
@@ -2363,7 +2364,7 @@ void ZindoS::CalcCISMatrix(double** matrixCIS) const{
23632364 // single excitation from I-th (occupied)MO to A-th (virtual)MO
23642365 int moI = this->GetActiveOccIndex(*this->molecule, k);
23652366 int moA = this->GetActiveVirIndex(*this->molecule, k);
2366-#pragma omp parallel for schedule(auto)
2367+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
23672368 for(int l=k; l<this->matrixCISdimension; l++){
23682369 try{
23692370 // single excitation from J-th (occupied)MO to B-th (virtual)MO
@@ -2731,7 +2732,7 @@ void ZindoS::CalcEtaMatrixForce(const vector<int>& elecStates){
27312732
27322733 // calc each element
27332734 stringstream ompErrors;
2734-#pragma omp parallel for schedule(auto)
2735+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
27352736 for(int mu=0; mu<numberAOs; mu++){
27362737 try{
27372738 for(int nu=0; nu<numberAOs; nu++){
@@ -2828,7 +2829,7 @@ void ZindoS::CalcZMatrixForce(const vector<int>& elecStates){
28282829 nonRedundantQIndeces.size());
28292830 // calculate each element of Z matrix.
28302831 stringstream ompErrors;
2831-#pragma omp parallel for schedule(auto)
2832+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
28322833 for(int mu=0; mu<this->molecule->GetTotalNumberAOs(); mu++){
28332834 try{
28342835 for(int nu=0; nu<this->molecule->GetTotalNumberAOs(); nu++){
@@ -2963,7 +2964,7 @@ void ZindoS::CalcDeltaVector(double* delta, int exciteState) const{
29632964 int numberActiveMO = numberActiveOcc + numberActiveVir;
29642965 MallocerFreer::GetInstance()->Initialize<double>(delta, numberActiveMO);
29652966 stringstream ompErrors;
2966-#pragma omp parallel for schedule(auto)
2967+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
29672968 for(int r=0; r<numberActiveMO; r++){
29682969 try{
29692970 double value = 0.0;
@@ -3044,7 +3045,7 @@ void ZindoS::CalcQVector(double* q,
30443045 int numberOcc = this->molecule->GetTotalNumberValenceElectrons()/2;
30453046 int numberActiveOcc = Parameters::GetInstance()->GetActiveOccCIS();
30463047 stringstream ompErrors;
3047-#pragma omp parallel for schedule(auto)
3048+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
30483049 for(int i=0; i<nonRedundantQIndeces.size(); i++){
30493050 try{
30503051 int moI = nonRedundantQIndeces[i].moI;
@@ -3074,7 +3075,7 @@ void ZindoS::CalcQVector(double* q,
30743075 if(!ompErrors.str().empty()){
30753076 throw MolDSException::Deserialize(ompErrors);
30763077 }
3077-#pragma omp parallel for schedule(auto)
3078+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
30783079 for(int i=0; i<redundantQIndeces.size(); i++){
30793080 try{
30803081 int r = nonRedundantQIndeces.size() + i;
@@ -3229,7 +3230,7 @@ void ZindoS::CalcXiMatrices(double** xiOcc,
32293230 xiVir, numberActiveVir, numberAOs);
32303231 stringstream ompErrors;
32313232 // xiOcc
3232-#pragma omp parallel for schedule(auto)
3233+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
32333234 for(int p=0; p<numberActiveOcc; p++){
32343235 try{
32353236 for(int mu=0; mu<numberAOs; mu++){
@@ -3251,7 +3252,7 @@ void ZindoS::CalcXiMatrices(double** xiOcc,
32513252 throw MolDSException::Deserialize(ompErrors);
32523253 }
32533254 // xiVir
3254-#pragma omp parallel for schedule(auto)
3255+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
32553256 for(int p=0; p<numberActiveVir; p++){
32563257 try{
32573258 for(int mu=0; mu<numberAOs; mu++){
@@ -3344,7 +3345,7 @@ void ZindoS::CalcGammaNRMinusKNRMatrix(double** gammaNRMinusKNR, const vector<Mo
33443345 if(mpiRank == calcRank){
33453346 int moI = nonRedundantQIndeces[i].moI;
33463347 int moJ = nonRedundantQIndeces[i].moJ;
3347-#pragma omp parallel for schedule(auto)
3348+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
33483349 for(int j=i; j<nonRedundantQIndecesSize; j++){
33493350 try{
33503351 int moK = nonRedundantQIndeces[j].moI;
@@ -3405,7 +3406,7 @@ void ZindoS::CalcKRDagerGammaRInvMatrix(double** kRDagerGammaRInv,
34053406 if(mpiRank == calcRank){
34063407 int moI = nonRedundantQIndeces[i].moI;
34073408 int moJ = nonRedundantQIndeces[i].moJ;
3408-#pragma omp parallel for schedule(auto)
3409+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
34093410 for(int j=0; j<redundantQIndecesSize; j++){
34103411 try{
34113412 int moK = redundantQIndeces[j].moI;
@@ -3701,7 +3702,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
37013702 &tmpRotatedDiatomicOverlapVec,
37023703 &tmpMatrixBC,
37033704 &tmpVectorBC);
3704-#pragma omp for schedule(auto)
3705+#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
37053706 for(int b=0; b<this->molecule->GetNumberAtoms(); b++){
37063707 if(a == b){continue;}
37073708 const Atom& atomB = *molecule->GetAtom(b);
@@ -3860,7 +3861,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
38603861 // First derivative of overlapAOs integral is
38613862 // calculated with GTO expansion technique.
38623863 stringstream ompErrors;
3863-#pragma omp parallel for schedule(auto)
3864+#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
38643865 for(int a=0; a<this->molecule->GetNumberAtoms(); a++){
38653866 try{
38663867 const Atom& atomA = *molecule->GetAtom(a);