Advanced Computing Platform for Theoretical Physics
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
YI-Bo Yang
QUDA with HIP
Commits
c322b54d
Commit
c322b54d
authored
Oct 26, 2019
by
maddyscientist
Browse files
Apply clang format
parent
e0efc49c
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/eigensolve_quda.h
View file @
c322b54d
...
...
@@ -140,7 +140,8 @@ public:
@param[in] evals The eigenvalues
@param[in] size The number of eigenvalues to compute
*/
void
computeEvals
(
const
DiracMatrix
&
mat
,
std
::
vector
<
ColorSpinorField
*>
&
evecs
,
std
::
vector
<
Complex
>
&
evals
,
int
size
);
void
computeEvals
(
const
DiracMatrix
&
mat
,
std
::
vector
<
ColorSpinorField
*>
&
evecs
,
std
::
vector
<
Complex
>
&
evals
,
int
size
);
/**
@brief Compute eigenvalues and their residiua. This variant compute the number of converged eigenvalues.
...
...
lib/inv_mre.cpp
View file @
c322b54d
...
...
@@ -87,7 +87,8 @@ namespace quda {
const
int
N
=
p
.
size
();
if
(
getVerbosity
()
>=
QUDA_VERBOSE
)
printfQuda
(
"Constructing minimum residual extrapolation with basis size %d
\n
"
,
N
);
if
(
getVerbosity
()
>=
QUDA_VERBOSE
)
printfQuda
(
"Constructing minimum residual extrapolation with basis size %d
\n
"
,
N
);
// if no guess is required, then set initial guess = 0
if
(
N
==
0
)
{
...
...
lib/multigrid.cpp
View file @
c322b54d
...
...
@@ -399,14 +399,12 @@ namespace quda
// nothing to do
}
else
if
(
param
.
cycle_type
==
QUDA_MG_CYCLE_RECURSIVE
||
param
.
level
==
param
.
Nlevel
-
2
)
{
if
(
coarse_solver
)
{
auto
&
coarse_solver_inner
=
*
reinterpret_cast
<
PreconditionedSolver
*>
(
coarse_solver
)
->
ExposeSolver
();
auto
&
coarse_solver_inner
=
*
reinterpret_cast
<
PreconditionedSolver
*>
(
coarse_solver
)
->
ExposeSolver
();
int
defl_size
=
coarse_solver_inner
.
evecs
.
size
();
if
(
defl_size
>
0
&&
transfer
&&
param
.
mg_global
.
preserve_deflation
)
{
// Deflation space exists and we are going to create a new solver. Transfer deflation space.
if
(
getVerbosity
()
>=
QUDA_VERBOSE
)
printfQuda
(
"Transferring deflation space size %d to MG
\n
"
,
defl_size
);
for
(
int
i
=
0
;
i
<
defl_size
;
i
++
)
{
evecs
.
push_back
(
coarse_solver_inner
.
evecs
[
i
]);
}
for
(
int
i
=
0
;
i
<
defl_size
;
i
++
)
{
evecs
.
push_back
(
coarse_solver_inner
.
evecs
[
i
]);
}
coarse_solver_inner
.
evecs
.
resize
(
0
);
}
delete
coarse_solver
;
...
...
tests/multigrid_evolve_test.cpp
View file @
c322b54d
...
...
@@ -609,7 +609,7 @@ int main(int argc, char **argv)
if
(
smoother_halo_prec
==
QUDA_INVALID_PRECISION
)
smoother_halo_prec
=
prec_null
;
if
(
link_recon_sloppy
==
QUDA_RECONSTRUCT_INVALID
)
link_recon_sloppy
=
link_recon
;
if
(
link_recon_precondition
==
QUDA_RECONSTRUCT_INVALID
)
link_recon_precondition
=
link_recon_sloppy
;
for
(
int
i
=
0
;
i
<
QUDA_MAX_MG_LEVEL
;
i
++
)
{
for
(
int
i
=
0
;
i
<
QUDA_MAX_MG_LEVEL
;
i
++
)
{
if
(
coarse_solve_type
[
i
]
==
QUDA_INVALID_SOLVE
)
coarse_solve_type
[
i
]
=
solve_type
;
if
(
smoother_solve_type
[
i
]
==
QUDA_INVALID_SOLVE
)
smoother_solve_type
[
i
]
=
QUDA_DIRECT_PC_SOLVE
;
}
...
...
@@ -773,8 +773,8 @@ int main(int argc, char **argv)
printfQuda
(
"
\n
======================================================
\n
"
);
printfQuda
(
"Running MG gauge evolution test at constant quark mass
\n
"
);
printfQuda
(
"======================================================
\n
"
);
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
0
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
0
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
// this line ensure that if we need to construct the clover inverse (in either the smoother or the solver) we do so
if
(
mg_param
.
smoother_solve_type
[
0
]
==
QUDA_DIRECT_PC_SOLVE
||
solve_type
==
QUDA_DIRECT_PC_SOLVE
)
...
...
@@ -829,8 +829,8 @@ int main(int argc, char **argv)
loadGaugeQuda
(
gauge
->
Gauge_p
(),
&
gauge_param
);
plaq
=
plaquette
(
*
gaugeEx
);
charge
=
qChargeQuda
();
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
step
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
step
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
// reference BiCGStab for comparison
invertQuda
(
spinorOut
,
spinorIn
,
&
inv_param2
);
...
...
@@ -889,26 +889,26 @@ int main(int argc, char **argv)
if
(
kappa
==
-
1.0
)
{
inv_param
.
mass
=
mass
+
0.01
*
step
;
inv_param
.
kappa
=
1.0
/
(
2.0
*
(
1
+
3
/
anisotropy
+
mass
+
0.01
*
step
));
mg_param
.
invert_param
->
mass
=
inv_param
.
mass
;
mg_param
.
invert_param
->
kappa
=
inv_param
.
kappa
;
mg_param
.
invert_param
->
mass
=
inv_param
.
mass
;
mg_param
.
invert_param
->
kappa
=
inv_param
.
kappa
;
inv_param2
.
mass
=
mass
+
0.01
*
step
;
inv_param2
.
kappa
=
1.0
/
(
2.0
*
(
1
+
3
/
anisotropy
+
mass
+
0.01
*
step
));
}
else
{
inv_param
.
kappa
=
kappa
-
0.001
*
step
;
inv_param
.
mass
=
0.5
/
(
kappa
-
0.001
*
step
)
-
(
1
+
3
/
anisotropy
);
mg_param
.
invert_param
->
mass
=
inv_param
.
mass
;
mg_param
.
invert_param
->
kappa
=
inv_param
.
kappa
;
inv_param2
.
kappa
=
kappa
-
0.001
*
step
;
mg_param
.
invert_param
->
mass
=
inv_param
.
mass
;
mg_param
.
invert_param
->
kappa
=
inv_param
.
kappa
;
inv_param2
.
kappa
=
kappa
-
0.001
*
step
;
inv_param2
.
mass
=
0.5
/
(
kappa
-
0.001
*
step
)
-
(
1
+
3
/
anisotropy
);
}
if
(
dslash_type
==
QUDA_TWISTED_MASS_DSLASH
||
dslash_type
==
QUDA_TWISTED_CLOVER_DSLASH
)
{
inv_param
.
mu
=
mu
+
0.01
*
step
;
inv_param2
.
mu
=
mu
+
0.01
*
step
;
mg_param
.
invert_param
->
mu
=
inv_param
.
mu
;
inv_param2
.
mu
=
mu
+
0.01
*
step
;
mg_param
.
invert_param
->
mu
=
inv_param
.
mu
;
}
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
step
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
printfQuda
(
"step=%d plaquette = %g topological charge = %g, mass = %g kappa = %g, mu = %g
\n
"
,
step
,
plaq
.
x
,
charge
,
inv_param
.
mass
,
inv_param
.
kappa
,
inv_param
.
mu
);
// reference BiCGStab for comparison
invertQuda
(
spinorOut
,
spinorIn
,
&
inv_param2
);
...
...
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