1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-12 16:55:37 +00:00

Working aas good as possible on 48^3 in double

This commit is contained in:
Peter Boyle 2024-05-16 10:55:45 -04:00
parent 14e9d8ed9f
commit ad14a82742
2 changed files with 19 additions and 16 deletions

View File

@ -200,7 +200,7 @@ int main (int argc, char ** argv)
Grid_init(&argc,&argv); Grid_init(&argc,&argv);
const int Ls=24; const int Ls=24;
const int nbasis = 60; const int nbasis = 62;
const int cb = 0 ; const int cb = 0 ;
RealD mass=0.00078; RealD mass=0.00078;
RealD M5=1.8; RealD M5=1.8;
@ -274,7 +274,7 @@ int main (int argc, char ** argv)
std::string ldop_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/LittleDiracOp.phys48.new.62"); std::string ldop_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/LittleDiracOp.phys48.new.62");
std::string evec_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/evecs.scidac"); std::string evec_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/evecs.scidac");
std::string eval_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/eval.xml"); std::string eval_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/eval.xml");
bool load_agg=true; bool load_agg=false;
bool load_refine=false; bool load_refine=false;
bool load_mat=false; bool load_mat=false;
bool load_evec=false; bool load_evec=false;
@ -287,8 +287,8 @@ int main (int argc, char ** argv)
} else { } else {
// Aggregates.CreateSubspaceMultishift(RNG5,HermOpEO, // Aggregates.CreateSubspaceMultishift(RNG5,HermOpEO,
// 0.0003,1.0e-5,2000); // Lo, tol, maxit // 0.0003,1.0e-5,2000); // Lo, tol, maxit
// Aggregates.CreateSubspaceChebyshev(RNG5,HermOpEO,nbasis,95.,0.01,1500); <== last run Aggregates.CreateSubspaceChebyshev(RNG5,HermOpEO,nbasis,95.,0.01,1500); <== last run
Aggregates.CreateSubspaceChebyshevNew(RNG5,HermOpEO,95.); // 176 with refinement // Aggregates.CreateSubspaceChebyshevNew(RNG5,HermOpEO,95.); // 176 with refinement
// Aggregates.CreateSubspaceChebyshev(RNG5,HermOpEO,nbasis,95.,0.001,3000,1500,200,0.0); // Attempt to resurrect // Aggregates.CreateSubspaceChebyshev(RNG5,HermOpEO,nbasis,95.,0.001,3000,1500,200,0.0); // Attempt to resurrect
SaveBasis(Aggregates,subspace_file); SaveBasis(Aggregates,subspace_file);
} }

View File

@ -41,8 +41,8 @@ void SaveBasis(aggregation &Agg,std::string file)
ScidacWriter WR(Agg.FineGrid->IsBoss()); ScidacWriter WR(Agg.FineGrid->IsBoss());
WR.open(file); WR.open(file);
for(int b=0;b<Agg.subspace.size();b++){ for(int b=0;b<Agg.subspace.size();b++){
// WR.writeScidacFieldRecord(Agg.subspace[b],record,0,BINARYIO_LEXICOGRAPHIC); WR.writeScidacFieldRecord(Agg.subspace[b],record,0,Grid::BinaryIO::BINARYIO_LEXICOGRAPHIC);
WR.writeScidacFieldRecord(Agg.subspace[b],record); // WR.writeScidacFieldRecord(Agg.subspace[b],record);
} }
WR.close(); WR.close();
#endif #endif
@ -55,8 +55,8 @@ void LoadBasis(aggregation &Agg, std::string file)
ScidacReader RD ; ScidacReader RD ;
RD.open(file); RD.open(file);
for(int b=0;b<Agg.subspace.size();b++){ for(int b=0;b<Agg.subspace.size();b++){
//RD.readScidacFieldRecord(Agg.subspace[b],record,BINARYIO_LEXICOGRAPHIC); RD.readScidacFieldRecord(Agg.subspace[b],record,Grid::BinaryIO::BINARYIO_LEXICOGRAPHIC);
RD.readScidacFieldRecord(Agg.subspace[b],record,0); // RD.readScidacFieldRecord(Agg.subspace[b],record,0);
} }
RD.close(); RD.close();
#endif #endif
@ -160,7 +160,7 @@ int main (int argc, char ** argv)
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid); GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
// Construct a coarsened grid with 4^4 cell // Construct a coarsened grid with 4^4 cell
Coordinate Block({4,4,6,4}); Coordinate Block({4,4,4,4});
Coordinate clatt = GridDefaultLatt(); Coordinate clatt = GridDefaultLatt();
for(int d=0;d<clatt.size();d++){ for(int d=0;d<clatt.size();d++){
clatt[d] = clatt[d]/Block[d]; clatt[d] = clatt[d]/Block[d];
@ -210,14 +210,14 @@ int main (int argc, char ** argv)
// Need to check about red-black grid coarsening // Need to check about red-black grid coarsening
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// std::string subspace_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Subspace.phys48.mixed.2500.60"); std::string subspace_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Subspace.phys48.mixed.2500.60");
std::string subspace_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Subspace.phys48.new.62"); // std::string subspace_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Subspace.phys48.new.62");
std::string refine_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Refine.phys48.tmp.60"); std::string refine_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/Refine.phys48.mixed.2500.60");
std::string ldop_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/LittleDiracOp.phys48.mixed.60"); std::string ldop_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/LittleDiracOp.phys48.mixed.60");
std::string evec_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/evecs.scidac"); std::string evec_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/evecs.scidac");
std::string eval_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/eval.xml"); std::string eval_file("/lustre/orion/phy157/proj-shared/phy157_dwf/paboyle/eval.xml");
bool load_agg=true; bool load_agg=true;
bool load_refine=false; bool load_refine=true;
bool load_mat=false; bool load_mat=false;
bool load_evec=false; bool load_evec=false;
@ -227,7 +227,10 @@ int main (int argc, char ** argv)
LoadBasis(Aggregates,subspace_file); LoadBasis(Aggregates,subspace_file);
} }
} else { } else {
Aggregates.CreateSubspaceChebyshevNew(RNG5,HermOpEO,95.); // 176 with refinement // Aggregates.CreateSubspaceMultishift(RNG5,HermOpEO,
// 0.0003,1.0e-5,2000); // Lo, tol, maxit
// Aggregates.CreateSubspaceChebyshev(RNG5,HermOpEO,nbasis,95.,0.01,1500);// <== last run
Aggregates.CreateSubspaceChebyshevNew(RNG5,HermOpEO,95.);
SaveBasis(Aggregates,subspace_file); SaveBasis(Aggregates,subspace_file);
} }
@ -236,7 +239,7 @@ int main (int argc, char ** argv)
std::cout << "**************************************"<<std::endl; std::cout << "**************************************"<<std::endl;
ConjugateGradient<CoarseVector> coarseCG(4.0e-2,20000,true); ConjugateGradient<CoarseVector> coarseCG(4.0e-2,20000,true);
const int nrhs=8; const int nrhs=12;
Coordinate mpi=GridDefaultMpi(); Coordinate mpi=GridDefaultMpi();
Coordinate rhMpi ({1,1,mpi[0],mpi[1],mpi[2],mpi[3]}); Coordinate rhMpi ({1,1,mpi[0],mpi[1],mpi[2],mpi[3]});
@ -366,7 +369,7 @@ int main (int argc, char ** argv)
HDCGmrhs(src_mrhs,res_mrhs); HDCGmrhs(src_mrhs,res_mrhs);
// Standard CG // Standard CG
#if 0 #if 1
{ {
std::cout << "**************************************"<<std::endl; std::cout << "**************************************"<<std::endl;
std::cout << "Calling red black CG"<<std::endl; std::cout << "Calling red black CG"<<std::endl;