Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
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
AGULLO Emmanuel
Chameleon
Commits
d73d6858
Commit
d73d6858
authored
6 years ago
by
THIBAULT Samuel
Browse files
Options
Downloads
Patches
Plain Diff
Use starpu_mpi_init_conf when available instead of starpu_mpi_init
to automatically the MPI thread to a free core.
parent
1f79c2a7
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
CMakeLists.txt
+4
-0
4 additions, 0 deletions
CMakeLists.txt
cmake_modules/morse_cmake
+1
-1
1 addition, 1 deletion
cmake_modules/morse_cmake
runtime/starpu/control/runtime_control.c
+40
-16
40 additions, 16 deletions
runtime/starpu/control/runtime_control.c
with
45 additions
and
17 deletions
CMakeLists.txt
+
4
−
0
View file @
d73d6858
...
@@ -669,6 +669,10 @@ if( CHAMELEON_SCHED_STARPU )
...
@@ -669,6 +669,10 @@ if( CHAMELEON_SCHED_STARPU )
if
(
HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
)
if
(
HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
)
message
(
"--
${
Blue
}
Add definition HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
${
ColourReset
}
"
)
message
(
"--
${
Blue
}
Add definition HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
${
ColourReset
}
"
)
endif
()
endif
()
check_function_exists
(
starpu_mpi_init_conf HAVE_STARPU_MPI_INIT_CONF
)
if
(
HAVE_STARPU_MPI_INIT_CONF
)
message
(
"--
${
Blue
}
Add definition HAVE_STARPU_MPI_INIT_CONF
${
ColourReset
}
"
)
endif
()
check_function_exists
(
starpu_mpi_data_migrate HAVE_STARPU_MPI_DATA_MIGRATE
)
check_function_exists
(
starpu_mpi_data_migrate HAVE_STARPU_MPI_DATA_MIGRATE
)
if
(
HAVE_STARPU_MPI_DATA_MIGRATE
)
if
(
HAVE_STARPU_MPI_DATA_MIGRATE
)
message
(
"--
${
Blue
}
Add definition HAVE_STARPU_MPI_DATA_MIGRATE
${
ColourReset
}
"
)
message
(
"--
${
Blue
}
Add definition HAVE_STARPU_MPI_DATA_MIGRATE
${
ColourReset
}
"
)
...
...
This diff is collapsed.
Click to expand it.
morse_cmake
@
dd40b792
Compare
f99bada1
...
dd40b792
Subproject commit
f99bada1af8f986d91f651eb9748d0ac6367ef5e
Subproject commit
dd40b792c7f27bd8644e7837b17dbc876f92eec7
This diff is collapsed.
Click to expand it.
runtime/starpu/control/runtime_control.c
+
40
−
16
View file @
d73d6858
...
@@ -25,6 +25,38 @@
...
@@ -25,6 +25,38 @@
/**
/**
*
*
*/
*/
static
int
chameleon_starpu_init
(
starpu_conf_t
*
conf
)
{
int
hres
;
#if defined(CHAMELEON_USE_MPI)
{
int
flag
=
0
;
# if !defined(CHAMELEON_SIMULATION)
MPI_Initialized
(
&
flag
);
# endif
# ifdef HAVE_STARPU_MPI_INIT_CONF
hres
=
starpu_mpi_init_conf
(
NULL
,
NULL
,
!
flag
,
MPI_COMM_WORLD
,
conf
);
# else
hres
=
starpu_init
(
conf
);
if
(
hres
<
0
)
{
return
hres
;
}
starpu_mpi_init
(
NULL
,
NULL
,
!
flag
);
}
# endif
#else
hres
=
starpu_init
(
conf
);
#endif
return
hres
;
}
int
RUNTIME_init
(
CHAM_context_t
*
chamctxt
,
int
RUNTIME_init
(
CHAM_context_t
*
chamctxt
,
int
ncpus
,
int
ncpus
,
int
ncudas
,
int
ncudas
,
...
@@ -66,7 +98,7 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
...
@@ -66,7 +98,7 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
{
{
chamctxt
->
parallel_enabled
=
CHAMELEON_FALSE
;
chamctxt
->
parallel_enabled
=
CHAMELEON_FALSE
;
hres
=
starpu_init
(
conf
);
hres
=
chameleon_
starpu_init
(
conf
);
}
}
else
{
else
{
int
worker
;
int
worker
;
...
@@ -81,7 +113,7 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
...
@@ -81,7 +113,7 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
conf
->
use_explicit_workers_bindid
=
1
;
conf
->
use_explicit_workers_bindid
=
1
;
hres
=
starpu_init
(
conf
);
hres
=
chameleon_
starpu_init
(
conf
);
chamctxt
->
nworkers
=
ncpus
;
chamctxt
->
nworkers
=
ncpus
;
chamctxt
->
nthreads_per_worker
=
nthreads_per_worker
;
chamctxt
->
nthreads_per_worker
=
nthreads_per_worker
;
...
@@ -95,16 +127,6 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
...
@@ -95,16 +127,6 @@ int RUNTIME_init( CHAM_context_t *chamctxt,
);
);
#endif
#endif
#if defined(CHAMELEON_USE_MPI)
{
int
flag
=
0
;
#if !defined(CHAMELEON_SIMULATION)
MPI_Initialized
(
&
flag
);
#endif
starpu_mpi_init
(
NULL
,
NULL
,
!
flag
);
}
#endif
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
starpu_cublas_init
();
starpu_cublas_init
();
#endif
#endif
...
@@ -124,15 +146,17 @@ void RUNTIME_finalize( CHAM_context_t *chamctxt )
...
@@ -124,15 +146,17 @@ void RUNTIME_finalize( CHAM_context_t *chamctxt )
return
;
return
;
}
}
#if defined(CHAMELEON_USE_MPI)
starpu_mpi_shutdown
();
#endif
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
starpu_cublas_shutdown
();
starpu_cublas_shutdown
();
#endif
#endif
#if defined(CHAMELEON_USE_MPI)
starpu_mpi_shutdown
();
#endif
#if !defined(CHAMELEON_USE_MPI) || !defined(HAVE_STARPU_MPI_INIT_CONF)
starpu_shutdown
();
starpu_shutdown
();
#endif
return
;
return
;
}
}
...
...
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