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
Camille Coti
TensorJoseph
Commits
f87cb4bc
Commit
f87cb4bc
authored
Aug 01, 2019
by
Camille Coti
Browse files
Pass the number of results to be added by a slave in the AddSlave version
parent
5f5644f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/tensormatrix_mpi.cpp
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 */
}
}
}
...
...
src/utils_parall.cpp
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
{
...
...
src/utils_parall.h
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_
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