Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fastNLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qcd-public
fastNLO
Commits
b33300f8
Commit
b33300f8
authored
1 year ago
by
JohannesGaessler
Browse files
Options
Downloads
Patches
Plain Diff
Fixed table merge segfault depending on file order
parent
c1b9907b
Branches
fix-merge
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
v2.5/toolkit/fastnlotoolkit/fastNLOCoeffAddFlex.cc
+24
-4
24 additions, 4 deletions
v2.5/toolkit/fastnlotoolkit/fastNLOCoeffAddFlex.cc
v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOCoeffAddFlex.h
+1
-1
1 addition, 1 deletion
...it/fastnlotoolkit/include/fastnlotk/fastNLOCoeffAddFlex.h
with
25 additions
and
5 deletions
v2.5/toolkit/fastnlotoolkit/fastNLOCoeffAddFlex.cc
+
24
−
4
View file @
b33300f8
...
...
@@ -217,7 +217,7 @@ void fastNLOCoeffAddFlex::Add(const fastNLOCoeffAddBase& other, fastNLO::EMerge
if
(
!
ok
)
{
error
[
"Add"
]
<<
"Incompatible table."
<<
endl
;
}
const
fastNLOCoeffAddFlex
&
othflex
=
(
const
fastNLOCoeffAddFlex
&
)
other
;
fastNLOCoeffAddFlex
&
othflex
=
(
fastNLOCoeffAddFlex
&
)
other
;
if
(
moption
==
fastNLO
::
kMerge
)
{
ExtendSigmaTilde
(
othflex
,
SigmaTildeMuIndep
,
othflex
.
SigmaTildeMuIndep
);
fastNLOTools
::
AddVectors
(
SigmaTildeMuIndep
,
othflex
.
SigmaTildeMuIndep
);
...
...
@@ -251,7 +251,7 @@ void fastNLOCoeffAddFlex::Add(const fastNLOCoeffAddBase& other, fastNLO::EMerge
}
else
if
(
moption
==
fastNLO
::
kAttach
)
{
vector
<
fastNLO
::
v5d
*>
st1
=
this
->
AccessSigmaTildes
();
vector
<
const
fastNLO
::
v5d
*>
st2
=
othflex
.
Get
SigmaTildes
();
vector
<
fastNLO
::
v5d
*>
st2
=
othflex
.
Access
SigmaTildes
();
int
cMax
=
st1
.
size
();
for
(
int
ii
=
cMax
-
1
;
ii
>=
0
;
ii
--
)
{
if
(
st1
[
ii
]
->
size
()
==
0
)
cMax
--
;
...
...
@@ -287,7 +287,7 @@ void fastNLOCoeffAddFlex::Add(const fastNLOCoeffAddBase& other, fastNLO::EMerge
}
else
{
vector
<
fastNLO
::
v5d
*>
st1
=
this
->
AccessSigmaTildes
();
vector
<
const
fastNLO
::
v5d
*>
st2
=
othflex
.
Get
SigmaTildes
();
vector
<
fastNLO
::
v5d
*>
st2
=
othflex
.
Access
SigmaTildes
();
int
cMax
=
st1
.
size
();
for
(
int
ii
=
cMax
-
1
;
ii
>=
0
;
ii
--
)
{
if
(
st1
[
ii
]
->
size
()
==
0
&&
st2
[
ii
]
->
size
()
==
0
)
cMax
--
;
...
...
@@ -305,6 +305,26 @@ void fastNLOCoeffAddFlex::Add(const fastNLOCoeffAddBase& other, fastNLO::EMerge
}
info["add"]<<"Copied coefficients from other table."<<endl;
*/
// May need to extend other sigma tilde prior to copying dimensions.
// Cannot call ExtendSigmaTilde because st1[ii]->size() == 0 .
for
(
int
obsBin
=
0
;
obsBin
<
fNObsBins
;
obsBin
++
){
fastNLO
::
v3d
insertValue
=
fastNLO
::
v3d
(
GetNScaleNode1
(
obsBin
),
fastNLO
::
v2d
(
GetNScaleNode2
(
obsBin
),
fastNLO
::
v1d
(
GetNSubproc
())));
int
thisNxtot1
=
GetNxtot1
(
obsBin
);
int
thisNxtot2
=
GetNxtot2
(
obsBin
);
int
otherNxtot1
=
othflex
.
GetNxtot1
(
obsBin
);
int
otherNxtot2
=
othflex
.
GetNxtot2
(
obsBin
);
if
(
thisNxtot1
>
otherNxtot1
)
{
fastNLOTools
::
ExtendSigmaTildeX
((
*
st2
[
ii
])[
obsBin
],
otherNxtot1
,
thisNxtot1
,
otherNxtot2
,
otherNxtot2
,
NPDFDim
,
insertValue
);
}
int
maxNxtot1
=
max
(
thisNxtot1
,
otherNxtot1
);
if
(
thisNxtot2
>
otherNxtot2
)
{
fastNLOTools
::
ExtendSigmaTildeX
((
*
st2
[
ii
])[
obsBin
],
maxNxtot1
,
maxNxtot1
,
otherNxtot2
,
thisNxtot2
,
NPDFDim
,
insertValue
);
}
}
fastNLOTools
::
ResizeFlexibleVector
(
*
st1
[
ii
],
*
st2
[
ii
]);
}
else
if
(
st2
[
ii
]
->
size
()
==
0
)
{
...
...
@@ -368,7 +388,7 @@ void fastNLOCoeffAddFlex::Add(const fastNLOCoeffAddBase& other, fastNLO::EMerge
//________________________________________________________________________________________________________________ //
void
fastNLOCoeffAddFlex
::
ExtendSigmaTilde
(
const
fastNLOCoeffAddFlex
&
othflex
,
fastNLO
::
v5d
&
ThisSigmaTilde
,
fastNLO
::
v5d
OtherSigmaTilde
)
{
const
fastNLOCoeffAddFlex
&
othflex
,
fastNLO
::
v5d
&
ThisSigmaTilde
,
fastNLO
::
v5d
&
OtherSigmaTilde
)
{
for
(
int
obsBin
=
0
;
obsBin
<
fNObsBins
;
obsBin
++
){
fastNLO
::
v3d
insertValue
=
fastNLO
::
v3d
(
GetNScaleNode1
(
obsBin
),
fastNLO
::
v2d
(
GetNScaleNode2
(
obsBin
),
fastNLO
::
v1d
(
GetNSubproc
())));
...
...
This diff is collapsed.
Click to expand it.
v2.5/toolkit/fastnlotoolkit/include/fastnlotk/fastNLOCoeffAddFlex.h
+
1
−
1
View file @
b33300f8
...
...
@@ -58,7 +58,7 @@ public:
protected
:
void
ReadCoeffAddFlex
(
std
::
istream
&
table
,
int
ITabVersionRead
);
void
ExtendSigmaTilde
(
const
fastNLOCoeffAddFlex
&
othflex
,
fastNLO
::
v5d
&
ThisSigmaTilde
,
fastNLO
::
v5d
OtherSigmaTilde
);
void
ExtendSigmaTilde
(
const
fastNLOCoeffAddFlex
&
othflex
,
fastNLO
::
v5d
&
ThisSigmaTilde
,
fastNLO
::
v5d
&
OtherSigmaTilde
);
int
fILOord
;
// obtained from Scenario
int
fSTildeDISFormat
=
1
;
// format of sigma-tilde coefficients (0: log(mu2/q2), 1: log(mu2))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment