• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisión49211355a6e43c620050d865b41deb8a854befe1 (tree)
Tiempo2013-08-28 16:04:40
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Initialization of scalapack and blacs is changed. #31916

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

Cambiar Resumen

Diferencia incremental

--- a/src/wrappers/Lapack.cpp
+++ b/src/wrappers/Lapack.cpp
@@ -126,7 +126,7 @@ molds_lapack_int Lapack::Dsyevd_sca(double** matrix, double* eigenValues, molds_
126126 char order='R';
127127 molds_lapack_int npRow=2; // ToDo: change to dynamical setting
128128 molds_lapack_int npCol=2; // ToDo: change to dynamical setting
129- molds_lapack_int blockSize=3; // ToDo: change to dynamical setting
129+ molds_lapack_int blockSize=8; // ToDo: change to dynamical setting
130130
131131 //tmporal values
132132 molds_lapack_int intOne=1;
@@ -143,10 +143,10 @@ molds_lapack_int Lapack::Dsyevd_sca(double** matrix, double* eigenValues, molds_
143143 molds_lapack_int mpiRank =intZero;
144144 molds_lapack_int mpiSize =intZero;
145145
146- // initialize blacs for calling scalapack
146+
147+ // initialize blacs and scalapack
147148 blacs_pinfo_(&mpiRank, &mpiSize);
148- blacs_get_(&iContext, &what, &val);
149- blacs_gridinit_(&iContext, &order, &npRow, &npCol);
149+ sl_init_(&iContext, &npRow, &npCol);
150150 blacs_gridinfo_(&iContext, &npRow, &npCol, &myRow, &myCol);
151151
152152 // calculate size of local matrix on each node
@@ -180,6 +180,7 @@ molds_lapack_int Lapack::Dsyevd_sca(double** matrix, double* eigenValues, molds_
180180 molds_lapack_int ja=intOne;
181181 molds_lapack_int iz=intOne;
182182 molds_lapack_int jz=intOne;
183+
183184 pdsyevd(&job, &uplo, &size, localMatrix, &ia, &ja, descA, tempEigenValues, localEigenVector, &iz, &jz ,descZ, tmpWork, &lwork, tmpIwork, &liwork, &info);
184185
185186 // cll scalapack (pdsyevd)
@@ -329,11 +330,6 @@ molds_lapack_int Lapack::Dsyevd(double** matrix, double* eigenValues, molds_lapa
329330 molds_lapack_int mpiRank;
330331 molds_lapack_int mpiSize;
331332 blacs_pinfo_(&mpiRank, &mpiSize);
332- if(mpiRank==0){
333- for(molds_lapack_int i = 0; i < size; i++){
334- printf("eig:%ld %e\n",i,eigenValues[i]);
335- }
336- }
337333
338334 //this->OutputLog(boost::format("size=%d lwork=%d liwork=%d k=%d info=%d\n") % size % lwork % liwork % k % info);
339335
--- a/src/wrappers/Lapack.h
+++ b/src/wrappers/Lapack.h
@@ -41,6 +41,9 @@ void descinit_(MKL_INT* desc,
4141 MKL_INT* ictxt,
4242 MKL_INT* lld,
4343 MKL_INT* info);
44+void sl_init_(MKL_INT* iContext,
45+ MKL_INT* npRow,
46+ MKL_INT* npCol);
4447 }
4548 /*
4649 extern "C" {