Commit dd4200e0 by Francois Gygi

Fix Context declarations in test programs


git-svn-id: http://qboxcode.org/svn/qb/trunk@1901 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 58c1c173
......@@ -77,7 +77,8 @@ CXXFLAGS += -DTARGET='"$(TARGET)"'
Base64Transcoder.o
$(LD) $(DFLAGS) -o $@ $^ $(LDFLAGS)
testWavefunction: testWavefunction.o Wavefunction.o SlaterDet.o \
Basis.o FourierTransform.o Matrix.o UnitCell.o Context.o
Basis.o FourierTransform.o Matrix.o UnitCell.o Context.o \
Base64Transcoder.o
$(LD) $(DFLAGS) -o $@ $^ $(LDFLAGS)
testEnergyFunctional: testEnergyFunctional.o EnergyFunctional.o Basis.o \
SlaterDet.o Matrix.o UnitCell.o Context.o FourierTransform.o \
......
......@@ -15,7 +15,6 @@
// testBasisMapping.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: testBasisMapping.C,v 1.4 2008-09-08 15:56:20 fgygi Exp $
#include "Context.h"
#include "Basis.h"
......@@ -54,9 +53,9 @@ int main(int argc, char **argv)
Timer tm;
Context ctxt(npr,npc);
Context ctxt(MPI_COMM_WORLD,npr,npc);
Basis basis(ctxt,kpoint);
Basis basis(ctxt.comm(),kpoint);
basis.resize(cell,cell,ecut);
cout << " np0=" << basis.np(0)
......
......@@ -53,7 +53,7 @@ int main(int argc, char **argv)
Timer tm;
Context ctxt(npr,npc);
Context ctxt(MPI_COMM_WORLD,npr,npc);
SlaterDet sd(ctxt,kpoint);
cout << sd.context();
......
......@@ -15,7 +15,6 @@
// testWavefunction.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: testWavefunction.C,v 1.9 2008-09-08 15:56:20 fgygi Exp $
#include "Context.h"
#include "Wavefunction.h"
......@@ -50,7 +49,7 @@ int main(int argc, char **argv)
int nspin = atoi(argv[13]);
int nkp = atoi(argv[14]);
Context ctxt;
Context ctxt(MPI_COMM_WORLD);
Wavefunction wf(ctxt);
Timer tm;
......@@ -82,7 +81,7 @@ int main(int argc, char **argv)
{
for ( int ikp = 0; ikp < wf.nkp(); ikp++ )
{
if ( wf.sd(ispin,ikp) != 0 && wf.sdcontext(ispin,ikp)->active() )
if ( wf.sd(ispin,ikp) != 0 )
{
cout << "wf.sd(ispin=" << ispin << ",ikp=" << ikp << "): "
<< wf.sd(ispin,ikp)->c().m() << "x"
......
......@@ -15,8 +15,6 @@
// testXMLGFPreprocessor.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: testXMLGFPreprocessor.C,v 1.4 2008-09-08 15:56:20 fgygi Exp $
#include <iostream>
#include <cassert>
......@@ -41,7 +39,7 @@ int main(int argc, char** argv)
const int nc = atoi(argv[2]);
const char* const filename = argv[3];
Context ctxt(nr,nc); // context on which gfdata is defined
Context ctxt(MPI_COMM_WORLD,nr,nc); // context on which gfdata is defined
DoubleMatrix gfdata(ctxt);
string xmlcontent;
......
......@@ -10,11 +10,9 @@
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
// $Id: testjacobi.C,v 1.5 2008-09-08 15:56:20 fgygi Exp $
// test the Jacobi implementation of the Matrix class
//
// test jacobi
//
// use: testjacobi
// use: testjacobi nprow npcol n nb
//
#include <cassert>
......@@ -84,7 +82,7 @@ int main(int argc, char **argv)
MPI_Bcast(&nb_a, 1, MPI_INT, 0, MPI_COMM_WORLD);
#endif
{
Context ctxt(nprow,npcol);
Context ctxt(MPI_COMM_WORLD,nprow,npcol);
if ( mype == 0 )
{
......
......@@ -17,7 +17,6 @@
// use: testjade nprow npcol m mb
//
////////////////////////////////////////////////////////////////////////////////
// $Id: testjade.C,v 1.4 2008-09-08 15:56:20 fgygi Exp $
#include <cassert>
#include <cstdlib>
......@@ -143,7 +142,7 @@ int main(int argc, char **argv)
MPI_Bcast(&nb_a, 1, MPI_INT, 0, MPI_COMM_WORLD);
#endif
{
Context ctxt(nprow,npcol);
Context ctxt(MPI_COMM_WORLD,nprow,npcol);
if ( mype == 0 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment