Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TensorJoseph
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
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
Camille Coti
TensorJoseph
Commits
f87cb4bc
Commit
f87cb4bc
authored
5 years ago
by
Camille Coti
Browse files
Options
Downloads
Patches
Plain Diff
Pass the number of results to be added by a slave in the AddSlave version
parent
5f5644f2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/tensormatrix_mpi.cpp
+3
-1
3 additions, 1 deletion
src/tensormatrix_mpi.cpp
src/utils_parall.cpp
+2
-2
2 additions, 2 deletions
src/utils_parall.cpp
src/utils_parall.h
+1
-0
1 addition, 0 deletions
src/utils_parall.h
with
6 additions
and
3 deletions
src/tensormatrix_mpi.cpp
+
3
−
1
View file @
f87cb4bc
...
...
@@ -40,6 +40,7 @@ MPI_Datatype DT_PARAMETERS;
MPI_Datatype
DT_PARAMETERS_2
;
int
nbforemen
=
NBFOREMEN
;
/* Number of foremen to use with the hierarchical M/W */
int
maxresult
=
MAXRESULT
;
/* Maximum results in the result queue, addslave version */
/*******************************************************************************
* Main function *
...
...
@@ -98,7 +99,8 @@ int main( int argc, char** argv ){
break
;
}
if
(
argc
>=
4
)
{
nbforemen
=
atoi
(
argv
[
3
]);
nbforemen
=
atoi
(
argv
[
3
]
);
/* these two variables are obtained from the same CI parameter but since they are */
maxresult
=
atoi
(
argv
[
3
]
);
/* used in two functions for two purposes, use two different names */
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/utils_parall.cpp
+
2
−
2
View file @
f87cb4bc
...
...
@@ -155,7 +155,7 @@ void send_add_or_end_addslave( std::vector<std::string>& results, int peer, int
/* Do I have a lot of results to be treated in the result queue? */
if
(
results
.
size
()
>
MAXRESULT
)
{
if
(
results
.
size
()
>
maxresult
)
{
/* if the result queue is too big, send it */
send_expressions_to_add
(
results
,
peer
);
}
else
{
...
...
@@ -168,7 +168,7 @@ void send_add_or_end_addslave( std::vector<std::string>& results, int peer, int
void
send_work_addslave
(
std
::
vector
<
parameters_t
>&
input
,
std
::
vector
<
std
::
string
>&
results
,
int
peer
)
{
if
(
results
.
size
()
>
MAXRESULT
)
{
if
(
results
.
size
()
>
maxresult
)
{
/* if the result queue is too big, send it */
send_expressions_to_add
(
results
,
peer
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/utils_parall.h
+
1
−
0
View file @
f87cb4bc
...
...
@@ -56,5 +56,6 @@ extern MPI_Datatype DT_PARAMETERS;
extern
MPI_Datatype
DT_PARAMETERS_2
;
extern
int
nbforemen
;
/* Number of foremen to use with the hierarchical M/W */
extern
int
maxresult
;
/* Maximum results in the result queue, addslave version */
#endif // _UTILS_PARALL_H_
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