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
efd75d6a
Commit
efd75d6a
authored
3 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
desc_print: Fix parallel case
parent
db131624
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!266
Fix many issues
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
control/descriptor.c
+19
-5
19 additions, 5 deletions
control/descriptor.c
control/descriptor_rec.c
+14
-1
14 additions, 1 deletion
control/descriptor_rec.c
testing/testing_zprint.c
+42
-23
42 additions, 23 deletions
testing/testing_zprint.c
with
75 additions
and
29 deletions
control/descriptor.c
+
19
−
5
View file @
efd75d6a
...
...
@@ -987,24 +987,38 @@ static void
chameleon_desc_print
(
const
CHAM_desc_t
*
desc
,
int
shift
)
{
intptr_t
base
=
(
intptr_t
)
desc
->
mat
;
int
m
,
n
;
int
m
,
n
,
rank
;
CHAM_context_t
*
chamctxt
=
chameleon_context_self
();
rank
=
CHAMELEON_Comm_rank
();
for
(
n
=
0
;
n
<
desc
->
nt
;
n
++
)
{
for
(
m
=
0
;
m
<
desc
->
mt
;
m
++
)
{
const
CHAM_tile_t
*
tile
;
const
CHAM_desc_t
*
tiledesc
;
intptr_t
ptr
;
int
trank
;
trank
=
desc
->
get_rankof
(
desc
,
m
,
n
);
tile
=
desc
->
get_blktile
(
desc
,
m
,
n
);
tiledesc
=
tile
->
mat
;
ptr
=
(
tile
->
format
==
CHAMELEON_TILE_DESC
)
?
(
intptr_t
)(
tiledesc
->
mat
)
:
(
intptr_t
)(
tile
->
mat
);
fprintf
(
stdout
,
"%*s%s(%3d,%3d): %d * %d / ld = %d / offset= %ld
\n
"
,
shift
,
" "
,
desc
->
name
,
m
,
n
,
tile
->
m
,
tile
->
n
,
tile
->
ld
,
ptr
-
base
);
if
(
trank
==
rank
)
{
fprintf
(
stdout
,
"[%2d]%*s%s(%3d,%3d): %d * %d / ld = %d / offset= %ld
\n
"
,
rank
,
shift
,
" "
,
desc
->
name
,
m
,
n
,
tile
->
m
,
tile
->
n
,
tile
->
ld
,
ptr
-
base
);
if
(
tile
->
format
==
CHAMELEON_TILE_DESC
)
{
chameleon_desc_print
(
tiledesc
,
shift
+
2
);
if
(
tile
->
format
==
CHAMELEON_TILE_DESC
)
{
chameleon_desc_print
(
tiledesc
,
shift
+
2
);
}
}
else
{
assert
(
ptr
==
0
);
}
if
(
chamctxt
->
scheduler
!=
RUNTIME_SCHED_OPENMP
)
{
RUNTIME_barrier
(
chamctxt
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
control/descriptor_rec.c
+
14
−
1
View file @
efd75d6a
...
...
@@ -29,9 +29,22 @@ chameleon_recdesc_create( const char *name, CHAM_desc_t **descptr, void *mat, ch
int
lm
,
int
ln
,
int
m
,
int
n
,
int
p
,
int
q
,
blkaddr_fct_t
get_blkaddr
,
blkldd_fct_t
get_blkldd
,
blkrankof_fct_t
get_rankof
)
{
CHAM_desc_t
*
desc
;
CHAM_context_t
*
chamctxt
;
CHAM_desc_t
*
desc
;
int
rc
;
*
descptr
=
NULL
;
chamctxt
=
chameleon_context_self
();
if
(
chamctxt
==
NULL
)
{
chameleon_error
(
"CHAMELEON_Recursive_Desc_Create"
,
"CHAMELEON not initialized"
);
return
CHAMELEON_ERR_NOT_INITIALIZED
;
}
if
(
chamctxt
->
scheduler
!=
RUNTIME_SCHED_STARPU
)
{
chameleon_error
(
"CHAMELEON_Recursive_Desc_Create"
,
"CHAMELEON Recursive descriptors only available with StaRPU"
);
return
CHAMELEON_ERR_NOT_INITIALIZED
;
}
/* Let's make sure we have at least one couple (mb, nb) defined */
assert
(
(
mb
[
0
]
>
0
)
&&
(
nb
[
0
]
>
0
)
);
...
...
This diff is collapsed.
Click to expand it.
testing/testing_zprint.c
+
42
−
23
View file @
efd75d6a
...
...
@@ -52,7 +52,7 @@ chameleon_getblkldd_cm( const CHAM_desc_t *A, int m )
int
testing_zprint
(
run_arg_list_t
*
args
,
int
check
)
{
int
hres
=
0
;
int
rc
,
hres
=
0
;
/* Read arguments */
intptr_t
mtxfmt
=
parameters_getvalue_int
(
"mtxfmt"
);
...
...
@@ -73,38 +73,57 @@ testing_zprint( run_arg_list_t *args, int check )
CHAMELEON_Set
(
CHAMELEON_TILE_SIZE
,
nb
);
fprintf
(
stdout
,
"--- Tile layout ---
\n
"
);
CHAMELEON_Desc_Create
(
rc
=
CHAMELEON_Desc_Create
(
&
descA
,
(
void
*
)(
-
mtxfmt
),
ChamComplexDouble
,
nb
,
nb
,
nb
*
nb
,
LDA
,
N
,
0
,
0
,
M
,
N
,
P
,
Q
);
CHAMELEON_Desc_Print
(
descA
);
if
(
rc
==
CHAMELEON_SUCCESS
)
{
CHAMELEON_Desc_Print
(
descA
);
}
else
{
fprintf
(
stdout
,
"--- Tile layout (FAILED)---
\n
"
);
hres
++
;
}
CHAMELEON_Desc_Destroy
(
&
descA
);
fprintf
(
stdout
,
"--- Lapack
e
layout ---
\n
"
);
CHAMELEON_Desc_Create_User
(
fprintf
(
stdout
,
"--- Lapack layout ---
\n
"
);
rc
=
CHAMELEON_Desc_Create_User
(
&
descA
,
(
void
*
)(
-
mtxfmt
),
ChamComplexDouble
,
nb
,
nb
,
nb
*
nb
,
LDA
,
N
,
0
,
0
,
M
,
N
,
P
,
Q
,
chameleon_getaddr_cm
,
chameleon_getblkldd_cm
,
NULL
);
CHAMELEON_Desc_Print
(
descA
);
if
(
rc
==
CHAMELEON_SUCCESS
)
{
CHAMELEON_Desc_Print
(
descA
);
}
else
{
fprintf
(
stdout
,
"--- Lapack layout (FAILED)---
\n
"
);
hres
++
;
}
CHAMELEON_Desc_Destroy
(
&
descA
);
fprintf
(
stdout
,
"--- Recursive layout (Tile)---
\n
"
);
CHAMELEON_Recursive_Desc_Create
(
&
descA
,
CHAMELEON_MAT_ALLOC_GLOBAL
,
ChamComplexDouble
,
list_nb
,
list_nb
,
LDA
,
N
,
M
,
N
,
P
,
Q
,
NULL
,
NULL
,
NULL
);
CHAMELEON_Desc_Print
(
descA
);
CHAMELEON_Desc_Destroy
(
&
descA
);
fprintf
(
stdout
,
"--- Recursive layout (Lapack) ---
\n
"
);
CHAMELEON_Recursive_Desc_Create
(
&
descA
,
CHAMELEON_MAT_ALLOC_GLOBAL
,
ChamComplexDouble
,
list_nb
,
list_nb
,
LDA
,
N
,
M
,
N
,
P
,
Q
,
chameleon_getaddr_cm
,
chameleon_getblkldd_cm
,
NULL
);
CHAMELEON_Desc_Print
(
descA
);
CHAMELEON_Desc_Destroy
(
&
descA
);
if
(
CHAMELEON_Comm_size
()
==
0
)
{
fprintf
(
stdout
,
"--- Recursive layout (Tile)---
\n
"
);
rc
=
CHAMELEON_Recursive_Desc_Create
(
&
descA
,
CHAMELEON_MAT_ALLOC_GLOBAL
,
ChamComplexDouble
,
list_nb
,
list_nb
,
LDA
,
N
,
M
,
N
,
P
,
Q
,
NULL
,
NULL
,
NULL
);
if
(
rc
==
CHAMELEON_SUCCESS
)
{
CHAMELEON_Desc_Print
(
descA
);
}
CHAMELEON_Desc_Destroy
(
&
descA
);
fprintf
(
stdout
,
"--- Recursive layout (Lapack) ---
\n
"
);
rc
=
CHAMELEON_Recursive_Desc_Create
(
&
descA
,
CHAMELEON_MAT_ALLOC_GLOBAL
,
ChamComplexDouble
,
list_nb
,
list_nb
,
LDA
,
N
,
M
,
N
,
P
,
Q
,
chameleon_getaddr_cm
,
chameleon_getblkldd_cm
,
NULL
);
if
(
rc
==
CHAMELEON_SUCCESS
)
{
CHAMELEON_Desc_Print
(
descA
);
}
CHAMELEON_Desc_Destroy
(
&
descA
);
}
run_arg_add_fixdbl
(
args
,
"time"
,
1
.
);
run_arg_add_fixdbl
(
args
,
"gflops"
,
1
.
);
...
...
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