mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 03:05:55 +01:00
Hadrons: new MIO module namespace, NERSC loader moved there
This commit is contained in:
parent
6718fa8c4f
commit
185da83454
@ -2,13 +2,12 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: extras/Hadrons/Modules.hpp
|
||||
Source file: Modules.hpp
|
||||
|
||||
Copyright (C) 2015
|
||||
Copyright (C) 2016
|
||||
Copyright (C) 2017
|
||||
Copyright (C) 2015-2018
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -46,7 +45,6 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#include <Grid/Hadrons/Modules/MSink/Smear.hpp>
|
||||
#include <Grid/Hadrons/Modules/MSink/Point.hpp>
|
||||
#include <Grid/Hadrons/Modules/MSolver/RBPrecCG.hpp>
|
||||
#include <Grid/Hadrons/Modules/MGauge/Load.hpp>
|
||||
#include <Grid/Hadrons/Modules/MGauge/Unit.hpp>
|
||||
#include <Grid/Hadrons/Modules/MGauge/Random.hpp>
|
||||
#include <Grid/Hadrons/Modules/MGauge/StochEm.hpp>
|
||||
@ -58,3 +56,4 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#include <Grid/Hadrons/Modules/MScalar/ChargedProp.hpp>
|
||||
#include <Grid/Hadrons/Modules/MAction/DWF.hpp>
|
||||
#include <Grid/Hadrons/Modules/MAction/Wilson.hpp>
|
||||
#include <Grid/Hadrons/Modules/MIO/LoadNersc.hpp>
|
||||
|
@ -2,12 +2,10 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: extras/Hadrons/Modules/MGauge/Load.cc
|
||||
Source file: LoadNersc.cc
|
||||
|
||||
Copyright (C) 2015
|
||||
Copyright (C) 2016
|
||||
Copyright (C) 2015-2018
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -26,30 +24,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
|
||||
#include <Grid/Hadrons/Modules/MGauge/Load.hpp>
|
||||
#include <Grid/Hadrons/Modules/MIO/LoadNersc.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace Hadrons;
|
||||
using namespace MGauge;
|
||||
using namespace MIO;
|
||||
|
||||
/******************************************************************************
|
||||
* TLoad implementation *
|
||||
* TLoadNersc implementation *
|
||||
******************************************************************************/
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
TLoad::TLoad(const std::string name)
|
||||
: Module<LoadPar>(name)
|
||||
TLoadNersc::TLoadNersc(const std::string name)
|
||||
: Module<LoadNerscPar>(name)
|
||||
{}
|
||||
|
||||
// dependencies/products ///////////////////////////////////////////////////////
|
||||
std::vector<std::string> TLoad::getInput(void)
|
||||
std::vector<std::string> TLoadNersc::getInput(void)
|
||||
{
|
||||
std::vector<std::string> in;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
std::vector<std::string> TLoad::getOutput(void)
|
||||
std::vector<std::string> TLoadNersc::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {getName()};
|
||||
|
||||
@ -57,13 +54,13 @@ std::vector<std::string> TLoad::getOutput(void)
|
||||
}
|
||||
|
||||
// setup ///////////////////////////////////////////////////////////////////////
|
||||
void TLoad::setup(void)
|
||||
void TLoadNersc::setup(void)
|
||||
{
|
||||
envCreateLat(LatticeGaugeField, getName());
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
void TLoad::execute(void)
|
||||
void TLoadNersc::execute(void)
|
||||
{
|
||||
FieldMetaData header;
|
||||
std::string fileName = par().file + "."
|
@ -2,12 +2,10 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: extras/Hadrons/Modules/MGauge/Load.hpp
|
||||
Source file: LoadNersc.hpp
|
||||
|
||||
Copyright (C) 2015
|
||||
Copyright (C) 2016
|
||||
Copyright (C) 2015-2018
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -26,9 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
|
||||
#ifndef Hadrons_MGauge_Load_hpp_
|
||||
#define Hadrons_MGauge_Load_hpp_
|
||||
#ifndef Hadrons_MIO_LoadNersc_hpp_
|
||||
#define Hadrons_MIO_LoadNersc_hpp_
|
||||
|
||||
#include <Grid/Hadrons/Global.hpp>
|
||||
#include <Grid/Hadrons/Module.hpp>
|
||||
@ -37,38 +34,37 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
/******************************************************************************
|
||||
* Load a NERSC configuration *
|
||||
* Load a NERSC configuration *
|
||||
******************************************************************************/
|
||||
BEGIN_MODULE_NAMESPACE(MGauge)
|
||||
BEGIN_MODULE_NAMESPACE(MIO)
|
||||
|
||||
class LoadPar: Serializable
|
||||
class LoadNerscPar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(LoadPar,
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(LoadNerscPar,
|
||||
std::string, file);
|
||||
};
|
||||
|
||||
class TLoad: public Module<LoadPar>
|
||||
class TLoadNersc: public Module<LoadNerscPar>
|
||||
{
|
||||
public:
|
||||
// constructor
|
||||
TLoad(const std::string name);
|
||||
TLoadNersc(const std::string name);
|
||||
// destructor
|
||||
virtual ~TLoad(void) = default;
|
||||
virtual ~TLoadNersc(void) = default;
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
protected:
|
||||
// setup
|
||||
virtual void setup(void);
|
||||
// execution
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_NS(Load, TLoad, MGauge);
|
||||
MODULE_REGISTER_NS(LoadNersc, TLoadNersc, MIO);
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_MGauge_Load_hpp_
|
||||
#endif // Hadrons_MIO_LoadNersc_hpp_
|
@ -2,12 +2,12 @@ modules_cc =\
|
||||
Modules/MContraction/WeakHamiltonianEye.cc \
|
||||
Modules/MContraction/WeakNeutral4ptDisc.cc \
|
||||
Modules/MContraction/WeakHamiltonianNonEye.cc \
|
||||
Modules/MGauge/Load.cc \
|
||||
Modules/MGauge/Unit.cc \
|
||||
Modules/MGauge/StochEm.cc \
|
||||
Modules/MGauge/Random.cc \
|
||||
Modules/MScalar/FreeProp.cc \
|
||||
Modules/MScalar/ChargedProp.cc
|
||||
Modules/MScalar/ChargedProp.cc \
|
||||
Modules/MIO/LoadNersc.cc
|
||||
|
||||
modules_hpp =\
|
||||
Modules/MContraction/Baryon.hpp \
|
||||
@ -28,7 +28,6 @@ modules_hpp =\
|
||||
Modules/MSink/Smear.hpp \
|
||||
Modules/MSink/Point.hpp \
|
||||
Modules/MSolver/RBPrecCG.hpp \
|
||||
Modules/MGauge/Load.hpp \
|
||||
Modules/MGauge/Unit.hpp \
|
||||
Modules/MGauge/Random.hpp \
|
||||
Modules/MGauge/StochEm.hpp \
|
||||
@ -39,5 +38,6 @@ modules_hpp =\
|
||||
Modules/MScalar/Scalar.hpp \
|
||||
Modules/MScalar/ChargedProp.hpp \
|
||||
Modules/MAction/DWF.hpp \
|
||||
Modules/MAction/Wilson.hpp
|
||||
Modules/MAction/Wilson.hpp \
|
||||
Modules/MIO/LoadNersc.hpp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user