Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
c102a324
Commit
c102a324
authored
Oct 18, 2017
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add testSampleReader program
parent
8f857016
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
1 deletions
+94
-1
Makefile
src/Makefile
+19
-1
testSampleReader.C
src/testSampleReader.C
+75
-0
No files found.
src/Makefile
View file @
c102a324
...
@@ -71,6 +71,19 @@ CXXFLAGS += -DTARGET='"$(TARGET)"'
...
@@ -71,6 +71,19 @@ CXXFLAGS += -DTARGET='"$(TARGET)"'
ExtForceSet.o ExtForce.o PairExtForce.o AtomicExtForce.o
\
ExtForceSet.o ExtForce.o PairExtForce.o AtomicExtForce.o
\
GlobalExtForce.o sampling.o
GlobalExtForce.o sampling.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
testSampleReader
:
testSampleReader.o AtomSet.o Atom.o Species.o
\
Wavefunction.o SlaterDet.o
\
Basis.o FourierTransform.o Matrix.o Context.o
\
sinft.o spline.o UnitCell.o
\
Base64Transcoder.o Constraint.o ConstraintSet.o DistanceConstraint.o
\
AngleConstraint.o TorsionConstraint.o PositionConstraint.o
\
ExtForceSet.o ExtForce.o PairExtForce.o AtomicExtForce.o
\
GlobalExtForce.o sampling.o
\
SampleReader.o StructuredDocumentHandler.o
\
SampleHandler.o AtomSetHandler.o WavefunctionHandler.o
\
SpeciesReader.o SpeciesHandler.o
\
XMLGFPreprocessor.o Base64Transcoder.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
testChargeDensity
:
testChargeDensity.o ChargeDensity.o
\
testChargeDensity
:
testChargeDensity.o ChargeDensity.o
\
Wavefunction.o SlaterDet.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
\
...
@@ -667,7 +680,8 @@ UserInterface.o: UserInterface.h qbox_xmlns.h
...
@@ -667,7 +680,8 @@ UserInterface.o: UserInterface.h qbox_xmlns.h
VWNFunctional.o
:
VWNFunctional.h XCFunctional.h
VWNFunctional.o
:
VWNFunctional.h XCFunctional.h
VWNFunctional.o
:
XCFunctional.h
VWNFunctional.o
:
XCFunctional.h
Wavefunction.o
:
Wavefunction.h D3vector.h UnitCell.h SlaterDet.h Context.h
Wavefunction.o
:
Wavefunction.h D3vector.h UnitCell.h SlaterDet.h Context.h
Wavefunction.o
:
blacs.h Basis.h Matrix.h Timer.h jacobi.h SharedFilePtr.h
Wavefunction.o
:
blacs.h Basis.h Matrix.h Timer.h FourierTransform.h jacobi.h
Wavefunction.o
:
SharedFilePtr.h
Wavefunction.o
:
D3vector.h UnitCell.h
Wavefunction.o
:
D3vector.h UnitCell.h
WavefunctionHandler.o
:
WavefunctionHandler.h StructureHandler.h UnitCell.h
WavefunctionHandler.o
:
WavefunctionHandler.h StructureHandler.h UnitCell.h
WavefunctionHandler.o
:
D3vector.h Wavefunction.h SlaterDet.h Context.h
WavefunctionHandler.o
:
D3vector.h Wavefunction.h SlaterDet.h Context.h
...
@@ -751,6 +765,10 @@ testMatrix.o: Timer.h Context.h blacs.h Matrix.h
...
@@ -751,6 +765,10 @@ testMatrix.o: Timer.h Context.h blacs.h Matrix.h
testSample.o
:
Context.h blacs.h SlaterDet.h Basis.h D3vector.h UnitCell.h
testSample.o
:
Context.h blacs.h SlaterDet.h Basis.h D3vector.h UnitCell.h
testSample.o
:
Matrix.h Timer.h Sample.h AtomSet.h Atom.h D3tensor.h blas.h
testSample.o
:
Matrix.h Timer.h Sample.h AtomSet.h Atom.h D3tensor.h blas.h
testSample.o
:
ConstraintSet.h ExtForceSet.h Wavefunction.h Control.h
testSample.o
:
ConstraintSet.h ExtForceSet.h Wavefunction.h Control.h
testSampleReader.o
:
Context.h blacs.h SlaterDet.h Basis.h D3vector.h
testSampleReader.o
:
UnitCell.h Matrix.h Timer.h Sample.h AtomSet.h Atom.h
testSampleReader.o
:
D3tensor.h blas.h ConstraintSet.h ExtForceSet.h
testSampleReader.o
:
Wavefunction.h Control.h SampleReader.h
testSlaterDet.o
:
Context.h blacs.h SlaterDet.h Basis.h D3vector.h UnitCell.h
testSlaterDet.o
:
Context.h blacs.h SlaterDet.h Basis.h D3vector.h UnitCell.h
testSlaterDet.o
:
Matrix.h Timer.h FourierTransform.h
testSlaterDet.o
:
Matrix.h Timer.h FourierTransform.h
testSpecies.o
:
Species.h SpeciesReader.h
testSpecies.o
:
Species.h SpeciesReader.h
...
...
src/testSampleReader.C
0 → 100644
View file @
c102a324
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// testSampleReader.C
//
// Test functionality of SampleReader
// use: ./testSampleReader sample.xml
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
using
namespace
std
;
#include "Context.h"
#include "SlaterDet.h"
#include "UnitCell.h"
#include "Sample.h"
#include "D3vector.h"
#include "SampleReader.h"
int
main
(
int
argc
,
char
**
argv
)
{
MPI_Init
(
&
argc
,
&
argv
);
// extra scope to ensure that BlacsContext objects get destructed before
// the MPI_Finalize call
{
Context
ctxt
(
MPI_COMM_WORLD
);
char
processor_name
[
MPI_MAX_PROCESSOR_NAME
];
int
namelen
;
PMPI_Get_processor_name
(
processor_name
,
&
namelen
);
cout
<<
" Process "
<<
ctxt
.
mype
()
<<
" on "
<<
processor_name
<<
endl
;
Sample
*
s
=
new
Sample
(
ctxt
);
SampleReader
s_reader
(
s
->
ctxt_
);
bool
serial
=
false
;
const
char
*
filename
=
argv
[
1
];
try
{
s_reader
.
readSample
(
*
s
,
filename
,
serial
);
}
catch
(
const
SampleReaderException
&
e
)
{
cout
<<
" SampleReaderException caught:"
<<
endl
;
cout
<<
e
.
msg
<<
endl
;
}
catch
(...)
{
cout
<<
" testSampleReader: cannot load Sample"
<<
endl
;
}
//s->ctxt_.barrier();
if
(
ctxt
.
onpe0
()
)
{
cout
<<
filename
<<
endl
;
cout
<<
s
->
atoms
.
size
()
<<
" atoms"
<<
endl
;
cout
<<
s
->
wf
.
nel
()
<<
" electrons"
<<
endl
;
}
}
MPI_Finalize
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment