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
b4d811dd
Commit
b4d811dd
authored
7 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
Try to fix issue43
parent
da2935a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!82
Fix issue #43 - Submatrix fields
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
control/descriptor.h
+6
-3
6 additions, 3 deletions
control/descriptor.h
runtime/parsec/control/runtime_descriptor.c
+5
-2
5 additions, 2 deletions
runtime/parsec/control/runtime_descriptor.c
runtime/starpu/control/runtime_descriptor.c
+14
-11
14 additions, 11 deletions
runtime/starpu/control/runtime_descriptor.c
with
25 additions
and
16 deletions
control/descriptor.h
+
6
−
3
View file @
b4d811dd
...
...
@@ -62,7 +62,7 @@ int morse_desc_check (const MORSE_desc_t *desc);
int
morse_desc_mat_alloc
(
MORSE_desc_t
*
desc
);
int
morse_desc_mat_free
(
MORSE_desc_t
*
desc
);
#define BLKLDD(A, k) A->get_blkldd( A,k )
#define BLKLDD(A, k) A->get_blkldd( A,
k )
/**
* Internal function to return address of block (m,n) with m,n = block indices
...
...
@@ -176,7 +176,9 @@ inline static int morse_getblkldd_cm(const MORSE_desc_t *A, int m) {
*/
inline
static
int
morse_getrankof_2d
(
const
MORSE_desc_t
*
desc
,
int
m
,
int
n
)
{
return
(
m
%
desc
->
p
)
*
desc
->
q
+
(
n
%
desc
->
q
);
int
mm
=
m
+
A
->
i
/
A
->
mb
;
int
nn
=
n
+
A
->
j
/
A
->
nb
;
return
(
mm
%
desc
->
p
)
*
desc
->
q
+
(
nn
%
desc
->
q
);
}
/**
...
...
@@ -184,8 +186,9 @@ inline static int morse_getrankof_2d(const MORSE_desc_t *desc, int m, int n)
*/
inline
static
int
morse_getrankof_2d_diag
(
const
MORSE_desc_t
*
desc
,
int
m
,
int
n
)
{
int
mm
=
m
+
A
->
i
/
A
->
mb
;
assert
(
n
==
0
);
return
(
m
%
desc
->
p
)
*
desc
->
q
+
(
m
%
desc
->
q
);
return
(
m
m
%
desc
->
p
)
*
desc
->
q
+
(
m
m
%
desc
->
q
);
}
...
...
This diff is collapsed.
Click to expand it.
runtime/parsec/control/runtime_descriptor.c
+
5
−
2
View file @
b4d811dd
...
...
@@ -262,7 +262,8 @@ void RUNTIME_desc_create( MORSE_desc_t *mdesc )
default:
morse_fatal_error
(
"MORSE_Element_Size"
,
"undefined type"
);
break
;
}
parsec_matrix_add2arena_tile
(
parsec_dtd_arenas
[
pdesc
->
arena_index
],
datatype
,
mdesc
->
mb
*
mdesc
->
nb
*
MORSE_Element_Size
(
mdesc
->
dtyp
)
);
parsec_matrix_add2arena_tile
(
parsec_dtd_arenas
[
pdesc
->
arena_index
],
datatype
,
mdesc
->
mb
*
mdesc
->
nb
*
MORSE_Element_Size
(
mdesc
->
dtyp
)
);
#endif
/* /\* Overwrite the leading dimensions to store the padding *\/ */
/* mdesc->llm = mdesc->mb * mdesc->lmt; */
...
...
@@ -287,7 +288,9 @@ void RUNTIME_desc_destroy( MORSE_desc_t *mdesc )
for
(
i
=
0
;
i
<
nb_local_tiles
;
i
++
,
data
++
)
{
parsec_data_destroy
(
*
data
);
if
(
*
data
)
{
parsec_data_destroy
(
*
data
);
}
}
free
(
pdesc
->
data_map
);
...
...
This diff is collapsed.
Click to expand it.
runtime/starpu/control/runtime_descriptor.c
+
14
−
11
View file @
b4d811dd
...
...
@@ -368,10 +368,13 @@ void RUNTIME_desc_flush( const MORSE_desc_t *desc,
}
void
RUNTIME_data_flush
(
const
MORSE_sequence_t
*
sequence
,
const
MORSE_desc_t
*
A
,
int
A
m
,
int
A
n
)
const
MORSE_desc_t
*
A
,
int
m
,
int
n
)
{
starpu_data_handle_t
*
handle
=
(
starpu_data_handle_t
*
)(
A
->
schedopt
);
handle
+=
((
int64_t
)(
A
->
lmt
)
*
(
int64_t
)
An
+
(
int64_t
)
Am
);
int64_t
mm
=
m
+
(
desc
->
i
/
desc
->
mb
);
int64_t
nn
=
n
+
(
desc
->
j
/
desc
->
nb
);
starpu_data_handle_t
*
ptrtile
=
desc
->
schedopt
;
ptrtile
+=
((
int64_t
)
desc
->
lmt
)
*
nn
+
mm
;
if
(
*
handle
==
NULL
)
{
return
;
...
...
@@ -381,7 +384,7 @@ void RUNTIME_data_flush( const MORSE_sequence_t *sequence,
starpu_mpi_cache_flush
(
MPI_COMM_WORLD
,
*
handle
);
#endif
if
(
morse_desc_islocal
(
A
,
A
m
,
A
n
)
)
{
if
(
morse_desc_islocal
(
A
,
m
,
n
)
)
{
chameleon_starpu_data_wont_use
(
*
handle
);
}
...
...
@@ -418,11 +421,11 @@ void RUNTIME_data_migrate( const MORSE_sequence_t *sequence,
void
*
RUNTIME_data_getaddr
(
const
MORSE_desc_t
*
desc
,
int
m
,
int
n
)
{
int64_t
i
m
=
m
+
(
desc
->
i
/
desc
->
mb
);
int64_t
j
n
=
n
+
(
desc
->
j
/
desc
->
nb
);
int64_t
m
m
=
m
+
(
desc
->
i
/
desc
->
mb
);
int64_t
n
n
=
n
+
(
desc
->
j
/
desc
->
nb
);
starpu_data_handle_t
*
ptrtile
=
desc
->
schedopt
;
ptrtile
+=
((
int64_t
)
desc
->
lmt
)
*
j
n
+
i
m
;
ptrtile
+=
((
int64_t
)
desc
->
lmt
)
*
n
n
+
m
m
;
if
(
*
ptrtile
==
NULL
)
{
int
home_node
=
-
1
;
...
...
@@ -430,8 +433,8 @@ void *RUNTIME_data_getaddr( const MORSE_desc_t *desc, int m, int n )
int
myrank
=
desc
->
myrank
;
int
owner
=
desc
->
get_rankof
(
desc
,
m
,
n
);
int64_t
eltsze
=
MORSE_Element_Size
(
desc
->
dtyp
);
int
tempmm
=
(
i
m
==
desc
->
lmt
-
1
)
?
(
desc
->
lm
-
i
m
*
desc
->
mb
)
:
desc
->
mb
;
int
tempnn
=
(
j
n
==
desc
->
lnt
-
1
)
?
(
desc
->
ln
-
j
n
*
desc
->
nb
)
:
desc
->
nb
;
int
tempmm
=
(
m
m
==
desc
->
lmt
-
1
)
?
(
desc
->
lm
-
m
m
*
desc
->
mb
)
:
desc
->
mb
;
int
tempnn
=
(
n
n
==
desc
->
lnt
-
1
)
?
(
desc
->
ln
-
n
n
*
desc
->
nb
)
:
desc
->
nb
;
if
(
myrank
==
owner
)
{
user_ptr
=
desc
->
get_blkaddr
(
desc
,
m
,
n
);
...
...
@@ -441,7 +444,7 @@ void *RUNTIME_data_getaddr( const MORSE_desc_t *desc, int m, int n )
}
starpu_matrix_data_register
(
ptrtile
,
home_node
,
(
uintptr_t
)
user_ptr
,
BLKLDD
(
desc
,
i
m
),
BLKLDD
(
desc
,
m
),
tempmm
,
tempnn
,
eltsze
);
#ifdef HAVE_STARPU_DATA_SET_COORDINATES
...
...
@@ -450,7 +453,7 @@ void *RUNTIME_data_getaddr( const MORSE_desc_t *desc, int m, int n )
#if defined(CHAMELEON_USE_MPI)
{
int64_t
block_ind
=
desc
->
lmt
*
j
n
+
i
m
;
int64_t
block_ind
=
desc
->
lmt
*
n
n
+
m
m
;
starpu_mpi_data_register
(
*
ptrtile
,
(
desc
->
id
<<
tag_sep
)
|
(
block_ind
),
owner
);
}
#endif
/* defined(CHAMELEON_USE_MPI) */
...
...
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