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
d49d2dd2
Commit
d49d2dd2
authored
Aug 11, 2004
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rel_1_17_0
git-svn-id:
http://qboxcode.org/svn/qb/trunk@243
cba15fb0-1239-40c8-b417-11db7ca47a34
parent
5fd62b76
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
128 additions
and
182 deletions
+128
-182
ChargeDensity.C
src/ChargeDensity.C
+3
-3
Context.C
src/Context.C
+8
-3
EnergyFunctional.C
src/EnergyFunctional.C
+3
-3
FourierTransform.C
src/FourierTransform.C
+6
-5
FourierTransform.h
src/FourierTransform.h
+2
-5
Makefile
src/Makefile
+7
-4
NonLocalPotential.C
src/NonLocalPotential.C
+2
-8
SaveCmd.C
src/SaveCmd.C
+18
-9
SlaterDet.C
src/SlaterDet.C
+5
-5
XCPotential.C
src/XCPotential.C
+10
-10
blas.h
src/blas.h
+39
-74
mcr.mk
src/mcr.mk
+9
-8
notes
src/notes
+16
-45
No files found.
src/ChargeDensity.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// ChargeDensity.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: ChargeDensity.C,v 1.
6 2004-06-01 23:08:08
fgygi Exp $
// $Id: ChargeDensity.C,v 1.
7 2004-08-11 17:56:24
fgygi Exp $
#include "ChargeDensity.h"
#include "Basis.h"
...
...
@@ -141,8 +141,8 @@ void ChargeDensity::update_density(void)
{
cout
.
setf
(
ios
::
fixed
,
ios
::
floatfield
);
cout
.
setf
(
ios
::
right
,
ios
::
adjustfield
);
cout
<<
" <
total_electronic_charge>
"
<<
setprecision
(
8
)
<<
sum
<<
"
</total_electronic_charge
>"
<<
endl
;
cout
<<
" <
!-- total_electronic_charge:
"
<<
setprecision
(
8
)
<<
sum
<<
"
--
>"
<<
endl
;
}
vft_
->
forward
(
&
rhotmp
[
0
],
&
rhog
[
ispin
][
0
]);
...
...
src/Context.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// Context.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: Context.C,v 1.
9 2003-11-20 20:22:33
fgygi Exp $
// $Id: Context.C,v 1.
10 2004-08-11 17:56:24
fgygi Exp $
#include <iostream>
#include <iomanip>
...
...
@@ -317,8 +317,13 @@ struct ContextRep
}
MPI_Bcast
(
&
len
,
1
,
MPI_INT
,
isrc
,
comm
());
char
*
buf
=
new
char
[
len
+
1
];
s
.
copy
(
buf
,
string
::
npos
);
buf
[
len
]
=
0
;
// s is initialized only on task isrc
if
(
mype
()
==
isrc
)
{
s
.
copy
(
buf
,
string
::
npos
);
buf
[
len
]
=
0
;
assert
(
buf
[
len
]
==
'\0'
);
}
MPI_Bcast
(
buf
,
len
+
1
,
MPI_CHAR
,
isrc
,
comm
());
s
=
buf
;
delete
[]
buf
;
...
...
src/EnergyFunctional.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// EnergyFunctional.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: EnergyFunctional.C,v 1.1
7 2004-03-11 21:52:31
fgygi Exp $
// $Id: EnergyFunctional.C,v 1.1
8 2004-08-11 17:56:24
fgygi Exp $
#include "EnergyFunctional.h"
#include "Sample.h"
...
...
@@ -328,7 +328,7 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
}
// ispin
// sum contains the contributions to ekin, etc.. from this task
wf
.
context
().
dsum
(
14
,
1
,
&
sum
[
0
],
1
);
wf
.
context
().
dsum
(
14
,
1
,
&
sum
[
0
],
1
4
);
ekin_
=
sum
[
0
];
sigma_ekin
[
0
]
=
sum
[
1
];
...
...
@@ -374,7 +374,7 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf,
// potential energy: integral of electronic charge times ionic local pot.
tsum
=
0
.
0
;
int
len
=
2
*
ngloc
,
inc1
=
1
;
tsum
[
0
]
=
2
.
0
*
ddot
_
(
&
len
,(
double
*
)
&
rhoelg
[
0
],
&
inc1
,
tsum
[
0
]
=
2
.
0
*
ddot
(
&
len
,(
double
*
)
&
rhoelg
[
0
],
&
inc1
,
(
double
*
)
&
vion_local_g
[
0
],
&
inc1
);
// remove double counting for G=0
if
(
vbasis_
->
context
().
myrow
()
==
0
)
...
...
src/FourierTransform.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// FourierTransform.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: FourierTransform.C,v 1.1
1 2004-03-11 21:48:39
fgygi Exp $
// $Id: FourierTransform.C,v 1.1
2 2004-08-11 17:56:24
fgygi Exp $
// The following macros must be defined: USE_FFTW, USE_ESSL, USE_ESSL_2DFFT
...
...
@@ -27,9 +27,10 @@ typedef int MPI_Comm;
#if USE_FFTW
#include "fftw.h"
extern
"C"
{
void
zdscal_
(
int
*
,
double
*
,
complex
<
double
>
*
,
int
*
);
}
#ifdef ADD_
#define zdscal zdscal_
#endif
extern
"C"
void
zdscal
(
int
*
n
,
double
*
alpha
,
complex
<
double
>
*
x
,
int
*
incx
);
#elif USE_ESSL
extern
"C"
{
void
dcft_
(
int
*
initflag
,
complex
<
double
>
*
x
,
int
*
inc2x
,
int
*
inc3x
,
...
...
@@ -957,7 +958,7 @@ void FourierTransform::fwd(complex<double>* val)
(
FFTW_COMPLEX
*
)
0
,
0
,
0
);
int
len
=
zvec_
.
size
();
double
fac
=
1
.
0
/
(
np0_
*
np1_
*
np2_
);
zdscal
_
(
&
len
,
&
fac
,
&
zvec_
[
0
],
&
inc1
);
zdscal
(
&
len
,
&
fac
,
&
zvec_
[
0
],
&
inc1
);
#else
// No library
/* Transform along z */
...
...
src/FourierTransform.h
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// FourierTransform.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: FourierTransform.h,v 1.
6 2003-11-20 20:27:06
fgygi Exp $
// $Id: FourierTransform.h,v 1.
7 2004-08-11 17:56:24
fgygi Exp $
#ifndef FOURIERTRANSFORM_H
#define FOURIERTRANSFORM_H
...
...
@@ -14,9 +14,6 @@ using namespace std;
#if USE_FFTW
#include "fftw.h"
extern
"C"
void
zdscal_
(
int
*
n
,
double
*
alpha
,
complex
<
double
>
*
x
,
int
*
incx
);
extern
"C"
void
zcopy_
(
int
*
n
,
complex
<
double
>
*
x
,
int
*
incx
,
complex
<
double
>
*
y
,
int
*
incy
);
#endif
class
Basis
;
...
...
@@ -57,7 +54,7 @@ class FourierTransform
vector
<
double
>
aux2
;
int
naux1x
,
naux1y
,
naux1z
,
naux2
;
#endif
#elif USE_FFTW
#elif USE_FFTW
|| USE_FFTW3
fftw_plan
fwplan0
,
fwplan1
,
fwplan2
,
bwplan0
,
bwplan1
,
bwplan2
;
#else
// no library
...
...
src/Makefile
View file @
d49d2dd2
#-------------------------------------------------------------------------------
# $Id: Makefile,v 1.2
5 2004-06-02 21:40:40
fgygi Exp $
# $Id: Makefile,v 1.2
6 2004-08-11 17:56:24
fgygi Exp $
#------------------------------------------------------------------------------
#
include
$(TARGET).mk
...
...
@@ -28,7 +28,7 @@ CXXFLAGS += -DTARGET='"$(TARGET)"'
MDWavefunctionStepper.o SDIonicStepper.o MDIonicStepper.o
\
PSDWavefunctionStepper.o PSDAWavefunctionStepper.o
\
SDCellStepper.o ConfinementPotential.o Preconditioner.o
\
release.o isodate.o $(PLTOBJECTS)
release.o
qbox_xmlns.o
isodate.o $(PLTOBJECTS)
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
SamplePrint
:
SamplePrint.o SamplePrintHandlers.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
...
...
@@ -81,11 +81,14 @@ CXXFLAGS += -DTARGET='"$(TARGET)"'
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
testMemParse
:
testMemParse.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
xmlSpecies
:
xmlSpecies.o
xmlSpecies
:
xmlSpecies.o
qbox_xmlns.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
xmlget
:
xmlget.o
$(LD)
-o
xmlget xmlget.C
-I
$(XERCESCDIR)
/include
\
-L
$(XERCESCDIR)
/lib
-lxerces-c
xmlextract
:
xmlextract.o
$(LD)
-o
xmlextract xmlextract.C
-I
$(XERCESCDIR)
/include
\
-L
$(XERCESCDIR)
/lib
-lxerces-c
testXMLGFPreprocessor
:
testXMLGFPreprocessor.o XMLGFPreprocessor.o Context.o
\
Base64Transcoder.o Matrix.o
$(LD)
$(DFLAGS)
-o
$@
$^
$(LDFLAGS)
...
...
@@ -114,7 +117,7 @@ SampleStepper.o EnergyFunctional.o
rm
-rf
ti_files
#------------------------------------------------------------------------------
ctags
:
c
tags
*
.[Ch]
etags
-o
tags
*
.[Ch]
#------------------------------------------------------------------------------
html
:
enscript
-Ecpp
--color
-Whtml
--toc
-pqbsrc
.html
*
.h
*
.C
...
...
src/NonLocalPotential.C
View file @
d49d2dd2
...
...
@@ -3,16 +3,13 @@
// NonLocalPotential.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: NonLocalPotential.C,v 1.1
1 2004-06-01 22:45:30
fgygi Exp $
// $Id: NonLocalPotential.C,v 1.1
2 2004-08-11 17:56:24
fgygi Exp $
#include "NonLocalPotential.h"
#include "blas.h"
#if AIX
extern
"C"
void
vsincos
(
double
*
x
,
double
*
y
,
double
*
z
,
int
*
n
);
#elif OSF1
extern
"C"
void
vcos_sin_
(
double
*
x
,
int
*
ix
,
double
*
y
,
int
*
iy
,
double
*
z
,
int
*
iz
,
int
*
n
);
#endif
...
...
@@ -934,14 +931,11 @@ void NonLocalPotential::update_eigr(vector<vector<double> >& tau)
double
*
gx
=
const_cast
<
double
*>
(
basis_
.
gx_ptr
(
0
));
int
iafirst
=
ctxt_
.
mycol
()
*
nalocmax
[
is
];
dgemm
_
(
&
cn
,
&
cn
,
&
ngwl
,
&
nalocis
,
&
k
,
&
mone
,
dgemm
(
&
cn
,
&
cn
,
&
ngwl
,
&
nalocis
,
&
k
,
&
mone
,
gx
,
&
ngwl
,
&
tau
[
is
][
3
*
iafirst
],
&
k
,
&
zero
,
&
gr
[
0
],
&
ngwl
);
#if AIX
vsincos
(
&
singr
[
is
][
0
],
&
cosgr
[
is
][
0
],
&
gr
[
0
],
&
len
);
#elif OSF1
int
inc1
=
1
;
vcos_sin_
(
&
gr
[
0
],
&
inc1
,
&
cosgr
[
is
][
0
],
&
inc1
,
&
singr
[
is
][
0
],
&
inc1
,
&
len
);
#else
for
(
int
i
=
0
;
i
<
len
;
i
++
)
{
...
...
src/SaveCmd.C
View file @
d49d2dd2
...
...
@@ -3,13 +3,14 @@
// SaveCmd.C:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SaveCmd.C,v 1.
7 2004-05-20 00:18:42
fgygi Exp $
// $Id: SaveCmd.C,v 1.
8 2004-08-11 17:56:24
fgygi Exp $
#include "SaveCmd.h"
#include "fstream"
#include "isodate.h"
#include "release.h"
#include "qbox_xmlns.h"
#ifdef USE_CSTDIO_LFS
#include <cstdio>
...
...
@@ -81,13 +82,18 @@ int SaveCmd::action(int argc, char **argv)
if
(
ui
->
onpe0
()
)
{
outfile
=
fopen
(
filename
,
"w"
);
char
*
header
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
"
"<qbox:sample xmlns:qbox=
\"
http://www.llnl.gov/casc/fpmd/qbox/ns/qbox-1.0
\"\n
"
string
header
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
"
"<qbox:sample xmlns:qbox=
\"
"
);
header
+=
qbox_xmlns
();
header
+=
string
(
"
\"\n
"
);
header
+=
string
(
" xmlns:xsi=
\"
http://www.w3.org/2001/XMLSchema-instance
\"\n
"
" xmlns:xlink=
\"
http://www.w3.org/1999/xlink
\"\n
"
" xsi:schemaLocation=
\"
http://www.llnl.gov/casc/fpmd/qbox/ns/qbox-1.0 sample.xsd
\"
>
\n
"
;
off_t
len
=
strlen
(
header
);
fwrite
(
header
,
sizeof
(
char
),
len
,
outfile
);
" xmlns:xlink=
\"
http://www.w3.org/1999/xlink
\"\n
"
);
header
+=
string
(
" xsi:schemaLocation=
\"
"
);
header
+=
qbox_xmlns
();
header
+=
string
(
" sample.xsd
\"
>
\n
"
);
off_t
len
=
header
.
size
();
fwrite
(
header
.
c_str
(),
sizeof
(
char
),
len
,
outfile
);
string
desc
=
string
(
"<description> Created "
)
+
isodate
()
+
string
(
" by qbox-"
)
+
release
()
+
...
...
@@ -125,10 +131,13 @@ int SaveCmd::action(int argc, char **argv)
os
<<
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n
"
<<
"<qbox:sample xmlns:qbox=
\"
http://www.llnl.gov/casc/fpmd/qbox/ns/qbox-1.0
\"\n
"
<<
"<qbox:sample xmlns:qbox=
\"
"
<<
qbox_xmlns
()
<<
"
\"\n
"
<<
" xmlns:xsi=
\"
http://www.w3.org/2001/XMLSchema-instance
\"\n
"
<<
" xmlns:xlink=
\"
http://www.w3.org/1999/xlink
\"\n
"
<<
" xsi:schemaLocation=
\"
http://www.llnl.gov/casc/fpmd/qbox/ns/qbox-1.0 sample.xsd
\"
>"
<<
" xsi:schemaLocation=
\"
"
<<
qbox_xmlns
()
<<
" sample.xsd
\"
>"
<<
endl
;
os
<<
"<description> Created "
<<
isodate
()
<<
" by qbox-"
<<
release
()
...
...
src/SlaterDet.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// SlaterDet.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SlaterDet.C,v 1.2
6 2004-04-20 22:12:42
fgygi Exp $
// $Id: SlaterDet.C,v 1.2
7 2004-08-11 17:56:24
fgygi Exp $
#include "SlaterDet.h"
#include "FourierTransform.h"
...
...
@@ -273,7 +273,7 @@ void SlaterDet::rs_mul_add(FourierTransform& ft,
int
len
=
4
*
mloc
;
int
inc1
=
1
;
double
alpha
=
1
.
0
;
daxpy
_
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
daxpy
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
}
if
(
nstloc
()
%
2
!=
0
)
{
...
...
@@ -292,7 +292,7 @@ void SlaterDet::rs_mul_add(FourierTransform& ft,
int
len
=
2
*
mloc
;
int
inc1
=
1
;
double
alpha
=
1
.
0
;
daxpy
_
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
daxpy
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
}
}
else
...
...
@@ -307,7 +307,7 @@ void SlaterDet::rs_mul_add(FourierTransform& ft,
int
len
=
2
*
mloc
;
int
inc1
=
1
;
double
alpha
=
1
.
0
;
daxpy
_
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
daxpy
(
&
len
,
&
alpha
,(
double
*
)
&
ctmp
[
0
],
&
inc1
,
&
dcp
[
2
*
n
*
mloc
],
&
inc1
);
}
}
...
...
@@ -767,7 +767,7 @@ double SlaterDet::dot(const SlaterDet& sd) const
int
len
=
c_proxy
.
nloc
();
// stride of scalar product is mloc
int
stride
=
c_proxy
.
mloc
();
sum
=
ddot
_
(
&
len
,
c
,
&
stride
,
sdc
,
&
stride
);
sum
=
ddot
(
&
len
,
c
,
&
stride
,
sdc
,
&
stride
);
}
ctxt_
.
dsum
(
1
,
1
,
&
sum
,
1
);
return
d
-
sum
;
...
...
src/XCPotential.C
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// XCPotential.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: XCPotential.C,v 1.
3 2004-02-04 19:55:17
fgygi Exp $
// $Id: XCPotential.C,v 1.
4 2004-08-11 17:56:24
fgygi Exp $
#include "XCPotential.h"
#include "Basis.h"
...
...
@@ -164,7 +164,7 @@ void XCPotential::update(vector<vector<double> >& vr, bool compute_stress,
vft_
.
backward
(
&
tmp1
[
0
],
&
tmpr
[
0
]);
int
inc2
=
2
,
inc1
=
1
;
double
*
grj
=
xcf_
->
grad_rho
[
j
];
dcopy
_
(
&
np012loc_
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
grj
,
&
inc1
);
dcopy
(
&
np012loc_
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
grj
,
&
inc1
);
}
}
else
...
...
@@ -188,8 +188,8 @@ void XCPotential::update(vector<vector<double> >& vr, bool compute_stress,
double
*
grj_dn
=
xcf_
->
grad_rho_dn
[
j
];
int
inc2
=
2
,
inc1
=
1
;
double
*
p
=
(
double
*
)
&
tmpr
[
0
];
dcopy
_
(
&
np012loc_
,
p
,
&
inc2
,
grj_up
,
&
inc1
);
dcopy
_
(
&
np012loc_
,
p
+
1
,
&
inc2
,
grj_dn
,
&
inc1
);
dcopy
(
&
np012loc_
,
p
,
&
inc2
,
grj_up
,
&
inc1
);
dcopy
(
&
np012loc_
,
p
+
1
,
&
inc2
,
grj_dn
,
&
inc1
);
}
// j
}
...
...
@@ -224,11 +224,11 @@ void XCPotential::update(vector<vector<double> >& vr, bool compute_stress,
int
inc1
=
1
,
inc2
=
2
;
if
(
j
==
0
)
{
dcopy
_
(
&
np012loc_
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
dcopy
(
&
np012loc_
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
}
else
{
daxpy
_
(
&
np012loc_
,
&
one
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
daxpy
(
&
np012loc_
,
&
one
,(
double
*
)
&
tmpr
[
0
],
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
}
}
}
...
...
@@ -265,13 +265,13 @@ void XCPotential::update(vector<vector<double> >& vr, bool compute_stress,
double
*
p
=
(
double
*
)
&
tmpr
[
0
];
if
(
j
==
0
)
{
dcopy
_
(
&
np012loc_
,
p
,
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
dcopy
_
(
&
np012loc_
,
p
+
1
,
&
inc2
,
&
vxctmp
[
1
][
0
],
&
inc1
);
dcopy
(
&
np012loc_
,
p
,
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
dcopy
(
&
np012loc_
,
p
+
1
,
&
inc2
,
&
vxctmp
[
1
][
0
],
&
inc1
);
}
else
{
daxpy
_
(
&
np012loc_
,
&
one
,
p
,
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
daxpy
_
(
&
np012loc_
,
&
one
,
p
+
1
,
&
inc2
,
&
vxctmp
[
1
][
0
],
&
inc1
);
daxpy
(
&
np012loc_
,
&
one
,
p
,
&
inc2
,
&
vxctmp
[
0
][
0
],
&
inc1
);
daxpy
(
&
np012loc_
,
&
one
,
p
+
1
,
&
inc2
,
&
vxctmp
[
1
][
0
],
&
inc1
);
}
}
// j
}
...
...
src/blas.h
View file @
d49d2dd2
...
...
@@ -3,7 +3,7 @@
// BLAS Header file
//
////////////////////////////////////////////////////////////////////////////////
// $Id: blas.h,v 1.
2 2003-11-27 01:16:3
4 fgygi Exp $
// $Id: blas.h,v 1.
3 2004-08-11 17:56:2
4 fgygi Exp $
#ifndef BLAS_H
#define BLAS_H
...
...
@@ -14,108 +14,73 @@ using namespace std;
// default value for most compilers
#define FTN_LINK extern "C"
#ifdef LINUX
#define FTN_LINK extern "C"
#endif
#ifdef SUNOS
#define FTN_LINK extern "C"
#endif
#ifdef OSF1
#define FTN_LINK extern "C"
#endif
#ifdef HPUX
#define FTN_LINK extern "C"
#define dcopy_ dcopy
#define zcopy_ zcopy
#define daxpy_ daxpy
#define ddot_ ddot
#define dasum_ dasum
#define dsbmv_ dsbmv
#define dgemm_ dgemm
#define dgemv_ dgemv
#define dgesv_ dgesv
#define dscal_ dscal
#define dsyev_ dsyev
#define zdscal_ zdscal
#define idamax_ idamax
#endif
#ifdef AIX
//#define FTN_LINK extern "FORTRAN"
#define FTN_LINK extern "C"
#define dcopy_ dcopy
#define zcopy_ zcopy
#define daxpy_ daxpy
#define ddot_ ddot
#define drot_ drot
#define dasum_ dasum
#define dsbmv_ dsbmv
#define dgemm_ dgemm
#define dgesv_ dgesv
#define dgemv_ dgemv
#define dscal_ dscal
#define dsyev_ dsyev
#define zdscal_ zdscal
#define idamax_ idamax
#define dvea_ dvea
#define dyax_ dyax
#define dnaxpy_ dnaxpy
#define dger_ dger
#endif
#ifndef FTN_LINK
#error "blas.h: undefined platform"
#ifdef ADD_
#define dcopy dcopy_
#define zcopy zcopy_
#define daxpy daxpy_
#define ddot ddot_
#define drot drot_
#define dasum dasum_
#define dsbmv dsbmv_
#define dgemm dgemm_
#define dgesv dgesv_
#define dgemv dgemv_
#define dscal dscal_
#define dsyev dsyev_
#define zdscal zdscal_
#define idamax idamax_
#define dvea dvea_
#define dyax dyax_
#define dnaxpy dnaxpy_
#define dger dger_
#endif
#ifdef __cplusplus
FTN_LINK
{
#endif
void
dcopy
_
(
int
*
n
,
double
*
x
,
int
*
incx
,
void
dcopy
(
int
*
n
,
double
*
x
,
int
*
incx
,
double
*
y
,
int
*
incy
);
void
zcopy
_
(
int
*
n
,
complex
<
double
>
*
x
,
int
*
incx
,
void
zcopy
(
int
*
n
,
complex
<
double
>
*
x
,
int
*
incx
,
complex
<
double
>
*
y
,
int
*
incy
);
void
daxpy
_
(
int
*
n
,
double
*
alpha
,
double
*
x
,
int
*
incx
,
void
daxpy
(
int
*
n
,
double
*
alpha
,
double
*
x
,
int
*
incx
,
double
*
y
,
int
*
incy
);
double
ddot
_
(
const
int
*
n
,
const
double
*
a
,
const
int
*
inca
,
double
ddot
(
const
int
*
n
,
const
double
*
a
,
const
int
*
inca
,
const
double
*
b
,
const
int
*
incb
);
void
drot
_
(
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
double
*
,
double
*
);
void
dgemm
_
(
char
*
ta
,
char
*
tb
,
int
*
m
,
int
*
n
,
int
*
k
,
void
drot
(
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
double
*
,
double
*
);
void
dgemm
(
char
*
ta
,
char
*
tb
,
int
*
m
,
int
*
n
,
int
*
k
,
double
*
alpha
,
double
*
a
,
int
*
lda
,
double
*
b
,
int
*
ldb
,
double
*
beta
,
double
*
c
,
int
*
ldc
);
void
dgemv
_
(
char
*
ta
,
int
*
m
,
int
*
n
,
void
dgemv
(
char
*
ta
,
int
*
m
,
int
*
n
,
double
*
alpha
,
double
*
a
,
int
*
tda
,
double
*
x
,
int
*
incx
,
double
*
beta
,
double
*
y
,
int
*
incy
);
void
dger
_
(
int
*
,
int
*
,
double
*
,
double
*
,
int
*
,
void
dger
(
int
*
,
int
*
,
double
*
,
double
*
,
int
*
,
double
*
,
int
*
,
double
*
,
int
*
);
void
dscal
_
(
int
*
len
,
double
*
alpha
,
double
*
x
,
int
*
incx
);
double
dasum
_
(
int
*
len
,
double
*
x
,
int
*
incx
);
int
idamax
_
(
int
*
len
,
double
*
x
,
int
*
incx
);
void
dsyev
_
(
char
*
c1
,
char
*
c2
,
int
*
n
,
void
dscal
(
int
*
len
,
double
*
alpha
,
double
*
x
,
int
*
incx
);
double
dasum
(
int
*
len
,
double
*
x
,
int
*
incx
);
int
idamax
(
int
*
len
,
double
*
x
,
int
*
incx
);
void
dsyev
(
char
*
c1
,
char
*
c2
,
int
*
n
,
double
*
a
,
int
*
lda
,
double
*
wr
,
double
*
wrk
,
int
*
lwrk
,
int
*
ierr
);
void
zdscal_
(
int
*
n
,
double
*
alpha
,
complex
<
double
>
*
x
,
int
*
incx
);
void
dgbmv
_
(
char
*
trans
,
int
*
m
,
int
*
n
,
void
dgbmv
(
char
*
trans
,
int
*
m
,
int
*
n
,
int
*
kl
,
int
*
ku
,
double
*
alpha
,
double
*
a
,
int
*
lda
,
double
*
x
,
int
*
incx
,
double
*
beta
,
double
*
y
,
int
*
incy
);
void
dsbmv
_
(
char
*
uplo
,
int
*
n
,
int
*
k
,
void
dsbmv
(
char
*
uplo
,
int
*
n
,
int
*
k
,
double
*
alpha
,
double
*
a
,
int
*
lda
,
double
*
x
,
int
*
incx
,
double
*
beta
,
double
*
y
,
int
*
incy
);
void
sspev
_
(
char
*
vec
,
char
*
uplo
,
int
*
size
,
double
*
ap
,
void
sspev
(
char
*
vec
,
char
*
uplo
,
int
*
size
,
double
*
ap
,
double
*
wr
,
double
*
z
,
int
*
n
,
double
*
wrk
,
int
*
ierr
);
void
dgesv
_
(
int
*
n
,
int
*
nrhs
,
double
*
a
,
int
*
lda
,
int
*
ipiv
,
void
dgesv
(
int
*
n
,
int
*
nrhs
,
double
*
a
,
int
*
lda
,
int
*
ipiv
,
double
*
b
,
int
*
ldb
,
int
*
info
);
void
dvea
_
(
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
double
*
,
int
*
);
void
dyax
_
(
int
*
,
double
*
,
double
*
,
int
*
,
double
*
,
int
*
);
void
dnaxpy
_
(
int
*
,
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
int
*
,
double
*
,
int
*
,
int
*
);
void
dvea
(
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
double
*
,
int
*
);
void
dyax
(
int
*
,
double
*
,
double
*
,
int
*
,
double
*
,
int
*
);
void
dnaxpy
(
int
*
,
int
*
,
double
*
,
int
*
,
double
*
,
int
*
,
int
*
,
double
*
,
int
*
,
int
*
);
#ifdef __cplusplus
}
...
...
src/mcr.mk
View file @
d49d2dd2
...
...
@@ -3,13 +3,14 @@
# mcr.mk
#
#-------------------------------------------------------------------------------
# $Id: mcr.mk,v 1.
7 2004-06-02 21:40:40
fgygi Exp $
# $Id: mcr.mk,v 1.
8 2004-08-11 17:56:24
fgygi Exp $
#
PLT=LINUX
#-------------------------------------------------------------------------------
GCCDIR=/usr/lib/gcc-lib/i386-redhat-linux/
egcs-2.91.66
GCCDIR=/usr/lib/gcc-lib/i386-redhat-linux/
3.2.3
MPIDIR=/usr/lib/mpi
XERCESCDIR=$(HOME)/software/xml/icc-7.0/xerces-c-src2_2_0
XERCESCDIR=$(HOME)/software/xml/xerces-c-src2_2_0
#XERCESCDIR=$(HOME)/software/xml/xerces-c-src_2_5_0
XERCESCLIBDIR=/usr/apps/qbox/lib
PLTOBJECTS = readTSC.o
...
...
@@ -28,16 +29,16 @@
# -I$(PAPIDIR)/include
INCLUDE = -I$(MPIDIR)/include -I$(FFTWDIR) -I$(XERCESCDIR)/include
CXXFLAGS= -O3 -xW -Zp16 \
-D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
#CXXFLAGS= -g -D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
CXXFLAGS= -O3 -xW -Zp16
-D$(PLT) $(INCLUDE) $(PLTFLAGS) $(DFLAGS)
LIBPATH = -L$(GCCDIR)/lib -L$(FFTWDIR) -L/usr/X11R6/lib \
-L$(MPIDIR)/lib -L$(BLASDIR)
-L/usr/lib
\
-L$(MPIDIR)/lib -L$(BLASDIR) \
-L$(XERCESCLIBDIR)
LIBS = $(PLIBS) $(GCCDIR)/libg2c.a -lfftw \
-lmkl_p4 -lmkl_lapack -lm -lmpi -lpmpi \
-lelan -lelan3 -openmp -lrmscall -lxerces-c
-lmkl_p4 -lmkl_lapack -lm -lmpi -lpmpi \
-openmp $(XERCESCDIR)/lib/libxerces-c.a
LDFLAGS = $(LIBPATH) $(LIBS)
...
...
src/notes
View file @
d49d2dd2
--------------------------------------------------------------------------------
- Add options to the load command to read only atomset or only wavefunctions
- Enable Fourier interpolation during the load command to allow for arbitrary
mesh in input sample file.
To do: move the SlaterDet weight into SlaterDet.
To do: add fermi variable for metals.
To do: Use WavefunctionStepper classes and WavefunctionStepperFactory.
>>>>>>> Must change: use of XMLString::transcode(..) is a memory leak
>>>>>>> when called in a string constructor, such as in
>>>>>>> string a(XMLString::transcode(...) ). The XMLString dynamically
>>>>>>> allocated by transcode must be deleted using XMLString::release,
>>>>>>> (which is impossible for a temporary as in the constructor call above).
>>>>>>> Must use other form of transcode: bool transcode(XMLCh*,unsigned int).
--------------------------------------------------------------------------------
Known bugs
In 1.11.2: using atoms_dyn = SD: ekin is not computed in SDIonicStepper.
Incorrect (uninitialized) values are printed by BOSampleStepper. Must either
include calculation of ekin_ in SDIonicStepper, or suppress printing of
ekin_ion and temp_ion if atoms_dyn = SD.
Saving a sample with wavefunctions of size zero crashes in FourierTransform
(size zero not working)
When resizing the cell to a *smaller* cell, the grid size is
not decreased, presumably because the ref_cell is kept at its current value
and determines the grid size.
XMLGFPreprocessor uses Allgather to send xmlcontent to all tasks, which is
unnecessary since the parser is only created on task 0 (for now)
...
...
@@ -35,27 +6,27 @@ gfdata matrix used in XMLGFPreprocessor uses a single-row context. May be
preferrable to use a single-column context when nst is small to avoid
memory problems.
Replace Xerces Base64 transcoding in SlaterDet::print with Base64Transcoder.
UnitCell bug was not fixed in 1.8.1. Still observe inf loops for Si432 FCC.
There is no mechanism to remove s.wfv once it has been created through either
the load command or the set wf_dyn MD command. Should implement a block_wf cmd.
Note: when building for release on /usr/apps, the LD_LIBRARY_PATH var will
determine library search path, even if makefile specifies another path.
Created a libxerces-c.a using objects in $XERCESCDIR/lib and linked statically.
This will avoid the problem of needing libxerces-c.so when using qbox.
Mon May 3 16:34:49 PDT 2004
xlC 6.0 is broken when using the -D_LARGE_FILES macro. Reverted to
USE_CSTDIO_LFS for large file support as on mcr.
--------------------------------------------------------------------------------
rel1_17_0 candidate
Fixed bug 27: buffer overrun in Context::string_bcast.
Fixed bug 26: inconsistent qbox xmlns namespace in species file and qbox output.
Modified qb.C: use new qbox_xmlns() function to print qbox XML namespace.
EnergyFunctional.C:909: change lda argument to 14. This was done automatically
by the BLACS lib, but corrected line conforms to the BLACS convention that
lda >= m.
ChargeDensity.C: changed the <total_electronic_charge> output to an XML comment.
SaveCmd.C: include proper xmlns info when saving a sample.
blas.h: reorganized using the ADD_ macro, removed all platform-specific ifdefs.
XCPotential.C: removed underscores in blas calls.
SlaterDet.C: removed underscores in blas calls.
FourierTransform.C: use ADD_ for zdscal.
NonLocalPotential.C: removed underscores in blas calls, removed old OSF ifdefs.
--------------------------------------------------------------------------------
rel1_16_0
Implemented l=1,l=2 non-local stress.
Modified UnitCell.C to avoid infinite loops due to finite precision.
Modified mcr.mk to use library mkl_p4 instead of mkl: -lmkl_p4 before -lmkl
This change of library accelerates the si432 calculation by 12% overall
--------------------------------------------------------------------------------
rel1_15_2
Ecut.h: exit without any action if ecut is same as current value. Caused
...
...
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