• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修订版6143ac1f55dcf3417239369f9f30e8e856643553 (tree)
时间2013-07-10 19:30:05
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Rappers of MPI-send and recv are added. #31588

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

更改概述

差异

--- a/src/mpi/MpiProcess.h
+++ b/src/mpi/MpiProcess.h
@@ -27,8 +27,10 @@ public:
2727 static void DeleteInstance();
2828 static MpiProcess* GetInstance();
2929 boost::mpi::communicator* GetCommunicator() const{ return this->communicator;}
30- int GetRank(){return this->communicator->rank();}
31- int GetSize(){return this->communicator->size();}
30+ int GetRank() const{return this->communicator->rank();}
31+ int GetSize() const{return this->communicator->size();}
32+ template<typename T> void Send(int dest, int tag, const T* values, int n) const{this->communicator->send(dest, tag, values, n);}
33+ template<typename T> void Recv(int source, int tag, T* values, int n) const{this->communicator->recv(source, tag, values, n);}
3234 private:
3335 static MpiProcess* mpiProcess;
3436 MpiProcess();
--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -1251,7 +1251,7 @@ void ZindoS::CalcCISProperties(){
12511251 if(k%mpiSize == 0){continue;}
12521252 int source = k%mpiSize;
12531253 int tag = k;
1254- world->recv(source, tag, &this->electronicTransitionDipoleMoments[k][0][0], numTransported);
1254+ MolDS_mpi::MpiProcess::GetInstance()->Recv(source, tag, &this->electronicTransitionDipoleMoments[k][0][0], numTransported);
12551255 }
12561256 }
12571257 else{
@@ -1260,7 +1260,7 @@ void ZindoS::CalcCISProperties(){
12601260 if(k%mpiSize != mpiRank){continue;}
12611261 int dest = 0;
12621262 int tag = k;
1263- world->send(dest, tag, &this->electronicTransitionDipoleMoments[k][0][0], numTransported);
1263+ MolDS_mpi::MpiProcess::GetInstance()->Send(dest, tag, &this->electronicTransitionDipoleMoments[k][0][0], numTransported);
12641264 }
12651265 }
12661266
@@ -2403,7 +2403,7 @@ void ZindoS::CalcCISMatrix(double** matrixCIS) const{
24032403 if(k%mpiSize == 0){continue;}
24042404 int source = k%mpiSize;
24052405 int tag = k;
2406- world->recv(source, tag, matrixCIS[k], this->matrixCISdimension);
2406+ MolDS_mpi::MpiProcess::GetInstance()->Recv(source, tag, matrixCIS[k], this->matrixCISdimension);
24072407 }
24082408 }
24092409 else{
@@ -2412,7 +2412,7 @@ void ZindoS::CalcCISMatrix(double** matrixCIS) const{
24122412 if(k%mpiSize != mpiRank){continue;}
24132413 int dest = 0;
24142414 int tag = k;
2415- world->send(dest, tag, matrixCIS[k], this->matrixCISdimension);
2415+ MolDS_mpi::MpiProcess::GetInstance()->Send(dest, tag, matrixCIS[k], this->matrixCISdimension);
24162416 }
24172417 }
24182418