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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
1b7263f1
Commit
1b7263f1
authored
4 months ago
by
LISITO Alycia
Browse files
Options
Downloads
Patches
Plain Diff
starpu/codelet: Add new task submit to codelet_zipiv_allreduce.c
parent
19b7a5b7
Branches
Branches containing commit
No related tags found
1 merge request
!523
Restructuration of the codelets getrf and getrf_nopiv
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/starpu/codelets/codelet_zipiv_allreduce.c
+84
-5
84 additions, 5 deletions
runtime/starpu/codelets/codelet_zipiv_allreduce.c
with
84 additions
and
5 deletions
runtime/starpu/codelets/codelet_zipiv_allreduce.c
+
84
−
5
View file @
1b7263f1
...
...
@@ -20,7 +20,7 @@
#include
"runtime_codelet_z.h"
#if defined(CHAMELEON_USE_MPI)
struct
cl_redux_args_
t
{
struct
cl_redux_args_
s
{
int
h
;
int
n
;
};
...
...
@@ -65,7 +65,7 @@ zipiv_allreduce_cpu_func( cppi_interface_t *cppi_me,
static
void
cl_zipiv_allreduce_cpu_func
(
void
*
descr
[],
void
*
cl_arg
)
{
struct
cl_redux_args_
t
*
clargs
=
(
struct
cl_redux_args_
t
*
)
cl_arg
;
struct
cl_redux_args_
s
*
clargs
=
(
struct
cl_redux_args_
s
*
)
cl_arg
;
cppi_interface_t
*
cppi_me
=
((
cppi_interface_t
*
)
descr
[
0
]);
cppi_interface_t
*
cppi_src
=
((
cppi_interface_t
*
)
descr
[
1
]);
zipiv_allreduce_cpu_func
(
cppi_me
,
cppi_src
,
clargs
->
h
,
clargs
->
n
);
...
...
@@ -73,6 +73,8 @@ cl_zipiv_allreduce_cpu_func( void *descr[], void *cl_arg )
CODELETS_CPU
(
zipiv_allreduce
,
cl_zipiv_allreduce_cpu_func
)
#if defined(CHAMELEON_STARPU_USE_INSERT)
/* defined(CHAMELEON_STARPU_USE_INSERT) */
static
void
INSERT_TASK_zipiv_allreduce_send
(
const
RUNTIME_option_t
*
options
,
CHAM_ipiv_t
*
ipiv
,
...
...
@@ -98,14 +100,14 @@ INSERT_TASK_zipiv_allreduce_recv( const RUNTIME_option_t *options,
int
h
,
int
n
)
{
struct
cl_redux_args_
t
*
clargs
;
clargs
=
malloc
(
sizeof
(
struct
cl_redux_args_
t
)
);
struct
cl_redux_args_
s
*
clargs
;
clargs
=
malloc
(
sizeof
(
struct
cl_redux_args_
s
)
);
clargs
->
h
=
h
;
clargs
->
n
=
n
;
rt_starpu_insert_task
(
&
cl_zipiv_allreduce
,
STARPU_CL_ARGS
,
clargs
,
sizeof
(
struct
cl_redux_args_
t
),
STARPU_CL_ARGS
,
clargs
,
sizeof
(
struct
cl_redux_args_
s
),
STARPU_RW
,
RUNTIME_pivot_getaddr
(
ipiv
,
me
,
k
,
h
),
STARPU_R
,
RUNTIME_pivot_getaddr
(
ipiv
,
src
,
k
,
h
),
STARPU_EXECUTE_ON_NODE
,
me
,
...
...
@@ -115,6 +117,83 @@ INSERT_TASK_zipiv_allreduce_recv( const RUNTIME_option_t *options,
starpu_mpi_cache_flush
(
options
->
sequence
->
comm
,
RUNTIME_pivot_getaddr
(
ipiv
,
src
,
k
,
h
)
);
}
#else
/* defined(CHAMELEON_STARPU_USE_INSERT) */
static
void
INSERT_TASK_zipiv_allreduce_send
(
const
RUNTIME_option_t
*
options
,
CHAM_ipiv_t
*
ipiv
,
int
me
,
int
dst
,
int
k
,
int
h
)
{
INSERT_TASK_COMMON_PARAMETERS_CLNULL
(
zipiv_allreduce_send
,
1
)
starpu_cham_exchange_init_params
(
options
,
&
params
,
dst
);
starpu_cham_exchange_handle_before_execution
(
options
,
&
params
,
&
nbdata
,
descrs
,
RUNTIME_pivot_getaddr
(
ipiv
,
me
,
k
,
h
),
STARPU_R
);
starpu_cham_task_exchange_data_after_execution
(
options
,
params
,
nbdata
,
descrs
);
(
void
)
cl
;
(
void
)
cl_name
;
}
static
void
INSERT_TASK_zipiv_allreduce_recv
(
const
RUNTIME_option_t
*
options
,
CHAM_ipiv_t
*
ipiv
,
int
me
,
int
src
,
int
k
,
int
h
,
int
n
)
{
int
ret
;
struct
starpu_task
*
task
;
INSERT_TASK_COMMON_PARAMETERS_EXTENDED
(
zipiv_allreduce_recv
,
zipiv_allreduce
,
redux
,
2
)
starpu_cham_exchange_init_params
(
options
,
&
params
,
me
);
starpu_cham_exchange_handle_before_execution
(
options
,
&
params
,
&
nbdata
,
descrs
,
RUNTIME_pivot_getaddr
(
ipiv
,
me
,
k
,
h
),
STARPU_RW
);
starpu_cham_exchange_handle_before_execution
(
options
,
&
params
,
&
nbdata
,
descrs
,
RUNTIME_pivot_getaddr
(
ipiv
,
src
,
k
,
h
),
STARPU_R
);
task
=
starpu_task_create
();
task
->
cl
=
cl
;
/* Set codelet parameters */
clargs
=
malloc
(
sizeof
(
struct
cl_redux_args_s
)
);
clargs
->
h
=
h
;
clargs
->
n
=
n
;
task
->
cl_arg
=
clargs
;
task
->
cl_arg_size
=
sizeof
(
struct
cl_redux_args_s
);
task
->
cl_arg_free
=
1
;
/* Set common parameters */
starpu_cham_task_set_options
(
options
,
task
,
nbdata
,
descrs
,
NULL
);
/* Flops */
task
->
flops
=
0
.;
/* Refine name */
task
->
name
=
cl_name
;
ret
=
starpu_task_submit
(
task
);
if
(
ret
==
-
ENODEV
)
{
task
->
destroy
=
0
;
starpu_task_destroy
(
task
);
chameleon_error
(
"INSERT_TASK_zipiv_allreduce"
,
"Failed to submit the task to StarPU"
);
return
;
}
starpu_cham_task_exchange_data_after_execution
(
options
,
params
,
nbdata
,
descrs
);
starpu_mpi_cache_flush
(
options
->
sequence
->
comm
,
RUNTIME_pivot_getaddr
(
ipiv
,
src
,
k
,
h
)
);
}
#endif
/* defined(CHAMELEON_STARPU_USE_INSERT) */
static
void
zipiv_allreduce_chameleon_starpu_task
(
const
RUNTIME_option_t
*
options
,
CHAM_desc_t
*
A
,
...
...
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