Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MLIP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Tadah
MLIP
Commits
cfa24cd4
Commit
cfa24cd4
authored
5 months ago
by
Marcin Kirsz
Browse files
Options
Downloads
Patches
Plain Diff
Update
parent
e1e8c221
No related branches found
No related tags found
No related merge requests found
Pipeline
#43197
passed
5 months ago
Stage: build.debug
Stage: run.unit.tests
Stage: build_release
Stage: trigger
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
trainer.h
+14
-14
14 additions, 14 deletions
trainer.h
with
14 additions
and
14 deletions
trainer.h
+
14
−
14
View file @
cfa24cd4
...
...
@@ -363,8 +363,8 @@ class MPI_Trainer_WORKER {
if
(
tr
.
rows_available
<
rows_needed
)
{
// we do not have enough rows in the local phi matrix
// so we create temp DM of required size
DesignMatrix
<
DM_Function_Base
&>
temp_dm
(
*
fb
,
config
);
temp_dm
.
Phi
.
resize
(
rows_needed
,
dm
.
Phi
.
cols
());
DesignMatrix
<
DM_Function_Base
&>
temp_dm
(
*
tr
.
fb
,
config
);
temp_dm
.
Phi
.
resize
(
rows_needed
,
tr
.
dm
.
Phi
.
cols
());
temp_dm
.
T
.
resize
(
rows_needed
);
temp_dm
.
Tlabels
.
resize
(
rows_needed
);
...
...
@@ -372,20 +372,20 @@ class MPI_Trainer_WORKER {
size_t
temp_phi_row
=
0
;
temp_dm
.
fill_T
(
stdb
);
for
(
size_t
s
=
0
;
s
<
stdb
.
size
();
++
s
)
{
StDescriptors
st_d
=
dc
.
calc
(
stdb
(
s
));
StDescriptors
st_d
=
tr
.
dc
.
calc
(
stdb
(
s
));
temp_dm
.
build
(
temp_phi_row
,
stdb
(
s
),
st_d
);
// phi_row++
}
// first we try to fill remaining rows in the local phi matrix
// copy top of temp_dm.Phi to the bottom of dm. Phi in reverse order
if
(
rows_available
>
0
)
{
for
(
rows_available
;
rows_available
>
0
;
rows_available
--
)
{
for
(
int
c
=
0
;
c
<
dm
.
Phi
.
cols
();
c
++
)
{
dm
.
Phi
(
phi_row
,
c
)
=
temp_dm
.
Phi
(
rows_available
-
1
,
c
);
dm
.
T
(
phi_row
)
=
temp_dm
.
T
(
rows_available
-
1
);
dm
.
Tlabels
(
phi_row
)
=
temp_dm
.
Tlabels
(
rows_available
-
1
);
if
(
tr
.
rows_available
>
0
)
{
for
(
rows_available
;
tr
.
rows_available
>
0
;
tr
.
rows_available
--
)
{
for
(
int
c
=
0
;
c
<
tr
.
dm
.
Phi
.
cols
();
c
++
)
{
tr
.
dm
.
Phi
(
phi_row
,
c
)
=
temp_dm
.
Phi
(
tr
.
rows_available
-
1
,
c
);
tr
.
dm
.
T
(
phi_row
)
=
temp_dm
.
T
(
tr
.
rows_available
-
1
);
tr
.
dm
.
Tlabels
(
phi_row
)
=
temp_dm
.
Tlabels
(
tr
.
rows_available
-
1
);
}
phi_row
++
;
tr
.
phi_row
++
;
rows_needed
--
;
}
}
...
...
@@ -424,12 +424,12 @@ class MPI_Trainer_WORKER {
else
{
// just fill local phi array as it is large enough
// fill_T must be called before phi_row is incremented
dm
.
fill_T
(
stdb
,
phi_row
);
// phi_row is not incremented by this method
tr
.
dm
.
fill_T
(
stdb
,
tr
.
phi_row
);
// phi_row is not incremented by this method
for
(
size_t
s
=
0
;
s
<
stdb
.
size
();
++
s
)
{
StDescriptors
st_d
=
dc
.
calc
(
stdb
(
s
));
dm
.
build
(
phi_row
,
stdb
(
s
),
st_d
);
// build() increments phi_row++
StDescriptors
st_d
=
tr
.
dc
.
calc
(
stdb
(
s
));
tr
.
dm
.
build
(
tr
.
phi_row
,
stdb
(
s
),
st_d
);
// build() increments phi_row++
}
rows_available
-=
rows_needed
;
tr
.
rows_available
-=
rows_needed
;
}
if
(
fn
)
...
...
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