Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
HEP
HEPnOS
Commits
8bbe2763
Commit
8bbe2763
authored
Jul 17, 2020
by
Matthieu Dorier
Browse files
added busy spin option in client
parent
9a57b7d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/DataStoreImpl.hpp
View file @
8bbe2763
...
...
@@ -113,8 +113,14 @@ class DataStoreImpl {
checkConfig
(
config
);
// get protocol
std
::
string
proto
=
config
[
"hepnos"
][
"client"
][
"protocol"
].
as
<
std
::
string
>
();
// get busy spin
bool
busySpin
=
config
[
"hepnos"
][
"client"
][
"busy-spin"
].
as
<
bool
>
();
// initialize Margo
m_mid
=
margo_init
(
proto
.
c_str
(),
MARGO_CLIENT_MODE
,
use_progress_thread
,
0
);
hg_init_info
hg_opt
;
memset
(
&
hg_opt
,
0
,
sizeof
(
hg_opt
));
if
(
busySpin
)
hg_opt
.
na_init_info
.
progress_mode
=
NA_NO_BLOCK
;
m_mid
=
margo_init_opt
(
proto
.
c_str
(),
MARGO_CLIENT_MODE
,
&
hg_opt
,
use_progress_thread
,
0
);
if
(
!
m_mid
)
{
cleanup
();
throw
Exception
(
"Could not initialized Margo"
);
...
...
src/service/ConnectionInfoGenerator.cpp
View file @
8bbe2763
...
...
@@ -62,6 +62,7 @@ void ConnectionInfoGenerator::generateFile(MPI_Comm comm, const std::string& fil
YAML
::
Node
config
;
config
[
"hepnos"
][
"client"
][
"protocol"
]
=
proto
;
config
[
"hepnos"
][
"client"
][
"busy-spin"
]
=
serviceConfig
.
busySpin
;
YAML
::
Node
databases
=
config
[
"hepnos"
][
"databases"
];
YAML
::
Node
datasets
=
databases
[
"datasets"
];
YAML
::
Node
runs
=
databases
[
"runs"
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment