1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-15 10:15:36 +00:00

Making tests compile

This commit is contained in:
Chulwoo Jung 2018-03-08 23:02:19 -05:00
parent 3686827df5
commit 8bb11e5039
5 changed files with 28 additions and 24 deletions

View File

@ -46,7 +46,7 @@ class CmdJobParams
double M5; double M5;
double mob_b; double mob_b;
std::vector<ComplexD> omega; std::vector<ComplexD> omega;
std::vector<ComplexD> boundary_phase; std::vector<Complex> boundary_phase;
LanczosType Impl; LanczosType Impl;
int Nu; int Nu;

View File

@ -22,6 +22,7 @@
*/ */
#include <Grid/Grid.h> #include <Grid/Grid.h>
#include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h> #include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h>
#include <Grid/parallelIO/IldgIO.h>
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// The following are now decoupled from the Lanczos and deal with grids. // The following are now decoupled from the Lanczos and deal with grids.
// Safe to replace functionality // Safe to replace functionality

View File

@ -33,6 +33,8 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
#include <Grid/Grid.h> #include <Grid/Grid.h>
#include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h> #include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h>
#include <Grid/algorithms/iterative/LocalCoherenceLanczos.h> #include <Grid/algorithms/iterative/LocalCoherenceLanczos.h>
#include <Grid/parallelIO/IldgIOtypes.h>
#include <Grid/parallelIO/IldgIO.h>
using namespace std; using namespace std;
using namespace Grid; using namespace Grid;
@ -57,7 +59,7 @@ public:
void checkpointFine(std::string evecs_file,std::string evals_file) void checkpointFine(std::string evecs_file,std::string evals_file)
{ {
assert(this->subspace.size()==nbasis); assert(this->subspace.size()==nbasis);
emptyUserRecord record; Grid::emptyUserRecord record;
Grid::QCD::ScidacWriter WR; Grid::QCD::ScidacWriter WR;
WR.open(evecs_file); WR.open(evecs_file);
for(int k=0;k<nbasis;k++) { for(int k=0;k<nbasis;k++) {

View File

@ -84,7 +84,7 @@ int main (int argc, char ** argv)
std::vector<double> Coeffs { 0.,-1.}; std::vector<double> Coeffs { 0.,-1.};
Polynomial<FermionField> PolyX(Coeffs); Polynomial<FermionField> PolyX(Coeffs);
Chebyshev<FermionField> Cheb(0.2,5.5,11); Chebyshev<FermionField> Cheby(0.2,5.5,11);
FunctionHermOp<FermionField> OpCheby(Cheby,HermOp); FunctionHermOp<FermionField> OpCheby(Cheby,HermOp);
PlainHermOp<FermionField> Op (HermOp); PlainHermOp<FermionField> Op (HermOp);

View File

@ -26,17 +26,18 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
*************************************************************************************/ *************************************************************************************/
/* END LEGAL */ /* END LEGAL */
#include <Grid/Grid.h> #include <Grid/Grid.h>
#include <Grid/parallelIO/IldgIOtypes.h>
#include <Grid/algorithms/iterative/BlockConjugateGradient.h> #include <Grid/algorithms/iterative/BlockConjugateGradient.h>
using namespace std; //using namespace std;
using namespace Grid; using namespace Grid;
using namespace Grid::QCD; using namespace Grid::QCD;
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
typedef typename DomainWallFermionR::FermionField FermionField; typedef typename Grid::QCD::DomainWallFermionR::FermionField FermionField;
typedef typename DomainWallFermionR::ComplexField ComplexField; typedef typename Grid::QCD::DomainWallFermionR::ComplexField ComplexField;
typename DomainWallFermionR::ImplParams params; typename Grid::QCD::DomainWallFermionR::ImplParams params;
const int Ls=4; const int Ls=4;
@ -102,7 +103,7 @@ int main (int argc, char ** argv)
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
std::cout << GridLogMessage << " Writing out in parallel view "<<std::endl; std::cout << GridLogMessage << " Writing out in parallel view "<<std::endl;
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
emptyUserRecord record; // Grid::emptyUserRecord record;
std::string file("./scratch.scidac"); std::string file("./scratch.scidac");
std::string filef("./scratch.scidac.ferm"); std::string filef("./scratch.scidac.ferm");
@ -114,21 +115,21 @@ int main (int argc, char ** argv)
{ {
FGrid->Barrier(); FGrid->Barrier();
ScidacWriter _ScidacWriter; // ScidacWriter _ScidacWriter;
_ScidacWriter.open(file); // _ScidacWriter.open(file);
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
std::cout << GridLogMessage << " Writing out gauge field "<<std::endl; std::cout << GridLogMessage << " Writing out gauge field "<<std::endl;
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
_ScidacWriter.writeScidacFieldRecord(Umu,record); // _ScidacWriter.writeScidacFieldRecord(Umu,record);
_ScidacWriter.close(); // _ScidacWriter.close();
FGrid->Barrier(); FGrid->Barrier();
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
std::cout << GridLogMessage << " Reading in gauge field "<<std::endl; std::cout << GridLogMessage << " Reading in gauge field "<<std::endl;
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
ScidacReader _ScidacReader; // ScidacReader _ScidacReader;
_ScidacReader.open(file); // _ScidacReader.open(file);
_ScidacReader.readScidacFieldRecord(s_Umu,record); // _ScidacReader.readScidacFieldRecord(s_Umu,record);
_ScidacReader.close(); // _ScidacReader.close();
FGrid->Barrier(); FGrid->Barrier();
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
std::cout << GridLogMessage << " Read in gauge field "<<std::endl; std::cout << GridLogMessage << " Read in gauge field "<<std::endl;
@ -144,10 +145,10 @@ int main (int argc, char ** argv)
std::cout << GridLogMessage << "****************************************************************** "<<std::endl; std::cout << GridLogMessage << "****************************************************************** "<<std::endl;
std::stringstream filefn; filefn << filef << "."<< n; std::stringstream filefn; filefn << filef << "."<< n;
ScidacWriter _ScidacWriter; // ScidacWriter _ScidacWriter;
_ScidacWriter.open(filefn.str()); // _ScidacWriter.open(filefn.str());
_ScidacWriter.writeScidacFieldRecord(src[n],record); // _ScidacWriter.writeScidacFieldRecord(src[n],record);
_ScidacWriter.close(); // _ScidacWriter.close();
} }
FGrid->Barrier(); FGrid->Barrier();
@ -159,10 +160,10 @@ int main (int argc, char ** argv)
for(int n=0;n<nrhs;n++){ for(int n=0;n<nrhs;n++){
if ( n==me ) { if ( n==me ) {
std::stringstream filefn; filefn << filef << "."<< n; std::stringstream filefn; filefn << filef << "."<< n;
ScidacReader _ScidacReader; // ScidacReader _ScidacReader;
_ScidacReader.open(filefn.str()); // _ScidacReader.open(filefn.str());
_ScidacReader.readScidacFieldRecord(s_src,record); // _ScidacReader.readScidacFieldRecord(s_src,record);
_ScidacReader.close(); // _ScidacReader.close();
} }
} }
FGrid->Barrier(); FGrid->Barrier();