Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Laurell, Pontus Bengt Johan
dmrgpp
Commits
ef2516db
Commit
ef2516db
authored
Aug 18, 2019
by
Alvarez, Gonzalo
Browse files
BlockDiagWf: disable threading if !blasIsThreadSafe
parent
c6084316
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/Engine/DmrgSerializer.h
View file @
ef2516db
...
...
@@ -78,7 +78,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#ifndef DMRG_SERIAL_H
#define DMRG_SERIAL_H
#include "BLAS.h"
#include "Io/IoSelector.h"
#include "FermionSign.h"
#include "ProgramGlobals.h"
...
...
src/Engine/TargetingChebyshev.h
View file @
ef2516db
...
...
@@ -73,7 +73,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#include <iostream>
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TargetParamsTimeStep.h"
#include "ProgramGlobals.h"
#include "ParametersForSolver.h"
...
...
src/Engine/TargetingCommon.h
View file @
ef2516db
...
...
@@ -82,7 +82,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#include "Braket.h"
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TimeSerializer.h"
#include "TargetParamsDynamic.h"
#include "VectorWithOffsets.h"
...
...
src/Engine/TargetingCorrectionVector.h
View file @
ef2516db
...
...
@@ -82,7 +82,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define TARGETING_CORRECTION_VECTOR_H
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TargetParamsCorrectionVector.h"
#include "VectorWithOffsets.h"
#include "CorrectionVectorFunction.h"
...
...
src/Engine/TargetingDynamic.h
View file @
ef2516db
...
...
@@ -84,7 +84,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define TARGETING_DYNAMIC_H
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "ParametersForSolver.h"
#include "TargetParamsDynamic.h"
#include "VectorWithOffsets.h"
...
...
src/Engine/TargetingMetts.h
View file @
ef2516db
...
...
@@ -72,7 +72,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define DMRG_TARGETING_METTS_H
#include <iostream>
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "ApplyOperatorLocal.h"
#include "MettsSerializer.h"
#include "MettsParams.h"
...
...
src/Engine/TargetingRixsDynamic.h
View file @
ef2516db
...
...
@@ -89,7 +89,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define TARGETING_RIXS_DYNAMIC_H
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TargetParamsCorrectionVector.h"
#include "TargetParamsTimeStep.h"
#include "VectorWithOffsets.h"
...
...
src/Engine/TargetingRixsStatic.h
View file @
ef2516db
...
...
@@ -88,7 +88,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#define TARGETING_RIXS_STATIC_H
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TargetParamsCorrectionVector.h"
#include "VectorWithOffsets.h"
#include "TargetingBase.h"
...
...
src/Engine/TargetingTimeStep.h
View file @
ef2516db
...
...
@@ -73,7 +73,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#include <iostream>
#include "ProgressIndicator.h"
#include "BLAS.h"
#include "TargetParamsTimeStep.h"
#include "ProgramGlobals.h"
#include "ParametersForSolver.h"
...
...
src/Engine/Wft/BlockDiagWf.h
View file @
ef2516db
...
...
@@ -489,10 +489,12 @@ public:
void
transform
(
char
charLeft
,
char
charRight
,
const
BlockDiagonalMatrixType
&
tLeft
,
const
BlockDiagonalMatrixType
&
tRight
)
const
BlockDiagonalMatrixType
&
tRight
,
bool
blasIsThreadSafe
)
{
SizeType
npatches
=
data_
.
size
();
SizeType
threads
=
std
::
min
(
npatches
,
PsimagLite
::
Concurrency
::
codeSectionParams
.
npthreads
);
if
(
!
blasIsThreadSafe
)
threads
=
1
;
typedef
PsimagLite
::
Parallelizer
<
ParallelBlockTransform
>
ParallelizerType
;
PsimagLite
::
CodeSectionParams
codeSectionParams
(
threads
);
ParallelizerType
threadedTransform
(
codeSectionParams
);
...
...
src/Engine/Wft/WaveFunctionTransfFactory.h
View file @
ef2516db
...
...
@@ -128,7 +128,8 @@ public:
params
.
options
,
true
,
true
,
params
.
denseSparseThreshold
),
params
.
denseSparseThreshold
,
params
.
options
.
find
(
"blasIsThreadSafe"
)
!=
PsimagLite
::
String
::
npos
),
progress_
(
"WaveFunctionTransf"
),
filenameIn_
(
params
.
checkpoint
.
filename
()),
filenameOut_
(
params
.
filename
),
...
...
src/Engine/Wft/WaveFunctionTransfLocal.h
View file @
ef2516db
...
...
@@ -180,8 +180,8 @@ private:
const
ProgramGlobals
::
DirectionEnum
dir1
=
ProgramGlobals
::
DirectionEnum
::
EXPAND_ENVIRON
;
for
(
SizeType
ii
=
0
;
ii
<
psiDest
.
sectors
();
ii
++
)
transformVectorParallel
(
psiDest
,
psiSrc
,
lrs
,
ii
,
nk
,
dir1
);
for
(
SizeType
ii
=
0
;
ii
<
psiDest
.
sectors
();
++
ii
)
transformVectorParallel
(
psiDest
,
psiSrc
,
lrs
,
ii
,
nk
,
dir1
);
}
void
transformVectorParallel
(
VectorWithOffsetType
&
psiDest
,
...
...
src/Engine/Wft/WftAccelPatches.h
View file @
ef2516db
...
...
@@ -47,10 +47,12 @@ public:
iOld
,
dmrgWaveStruct_
.
lrs
());
psi
.
transform
(
charLeft
,
charRight
,
dmrgWaveStruct_
.
getTransform
(
ProgramGlobals
::
SysOrEnvEnum
::
SYSTEM
),
dmrgWaveStruct_
.
getTransform
(
ProgramGlobals
::
SysOrEnvEnum
::
ENVIRON
));
dmrgWaveStruct_
.
getTransform
(
ProgramGlobals
::
SysOrEnvEnum
::
ENVIRON
),
wftOptions_
.
blasIsThreadSafe
);
psi
.
toVectorWithOffsets
(
psiDest
,
iNew
,
lrs
,
nk
,
dir
);
}
...
...
src/Engine/Wft/WftOptions.h
View file @
ef2516db
...
...
@@ -16,11 +16,13 @@ struct WftOptions {
PsimagLite
::
String
options
,
bool
f
,
bool
b
,
RealType
d
)
RealType
d
,
bool
blasIsThreadSafe_
)
:
twoSiteDmrg
(
options
.
find
(
"twositedmrg"
)
!=
PsimagLite
::
String
::
npos
),
kronLoadBalance
(
options
.
find
(
"KronLoadBalance"
)
!=
PsimagLite
::
String
::
npos
),
firstCall
(
f
),
bounce
(
b
),
blasIsThreadSafe
(
blasIsThreadSafe_
),
dir
(
dir1
),
accel
((
twoSiteDmrg
)
?
ACCEL_BLOCKS
:
ACCEL_PATCHES
),
denseSparseThreshold
(
d
)
...
...
@@ -65,6 +67,7 @@ struct WftOptions {
bool
kronLoadBalance
;
bool
firstCall
;
bool
bounce
;
bool
blasIsThreadSafe
;
ProgramGlobals
::
DirectionEnum
dir
;
AccelEnum
accel
;
RealType
denseSparseThreshold
;
...
...
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