File tree Expand file tree Collapse file tree
source/source_lcao/module_hcontainer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,8 +48,10 @@ void Read_HContainer<T>::read()
4848 //
4949 hamilt::HContainer<T> hcontainer_serial (&pv_serial);
5050
51+ #ifdef __MPI
5152 if (GlobalV::MY_RANK == 0 )
5253 {
54+ #endif
5355 ModuleIO::csrFileReader<T> csr (this ->_filename );
5456 int step = csr.getStep ();
5557 int matrix_dimension = csr.getMatrixDimension ();
@@ -110,6 +112,7 @@ void Read_HContainer<T>::read()
110112 value);
111113 }
112114 }
115+ #ifdef __MPI
113116}
114117 // thirdly, distribute hcontainer_serial to parallel hcontainer
115118 // send <IJR>s from serial_rank to all ranks
@@ -151,6 +154,12 @@ void Read_HContainer<T>::read()
151154 }
152155 // gather values from serial_rank to Parallels
153156 transferSerial2Parallels (hcontainer_serial, this ->_hcontainer , 0 );
157+ #else
158+ std::vector<int > para_ijrs = hcontainer_serial.get_ijr_info ();
159+ this ->_hcontainer ->insert_ijrs (¶_ijrs);
160+ this ->_hcontainer ->allocate ();
161+ this ->_hcontainer ->add (hcontainer_serial);
162+ #endif
154163
155164}
156165
You can’t perform that action at this time.
0 commit comments