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
0e6d45c1
Commit
0e6d45c1
authored
7 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
Add a new OOC_User function and simplifies OOC
parent
9b177ce0
No related branches found
No related tags found
1 merge request
!19
Add Out-of-Core option
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
control/descriptor.c
+61
-12
61 additions, 12 deletions
control/descriptor.c
include/morse.h.in
+7
-4
7 additions, 4 deletions
include/morse.h.in
timing/timing.h
+11
-11
11 additions, 11 deletions
timing/timing.h
with
79 additions
and
27 deletions
control/descriptor.c
+
61
−
12
View file @
0e6d45c1
...
...
@@ -522,14 +522,14 @@ int MORSE_Desc_Create_User(MORSE_desc_t **descptr, void *mat, MORSE_enum dtyp, i
morse
=
morse_context_self
();
if
(
morse
==
NULL
)
{
morse_error
(
"MORSE_Desc_Create"
,
"MORSE not initialized"
);
morse_error
(
"MORSE_Desc_Create
_User
"
,
"MORSE not initialized"
);
return
MORSE_ERR_NOT_INITIALIZED
;
}
/* Allocate memory and initialize the descriptor */
desc
=
(
MORSE_desc_t
*
)
malloc
(
sizeof
(
MORSE_desc_t
));
if
(
desc
==
NULL
)
{
morse_error
(
"MORSE_Desc_Create"
,
"malloc() failed"
);
morse_error
(
"MORSE_Desc_Create
_User
"
,
"malloc() failed"
);
return
MORSE_ERR_OUT_OF_RESOURCES
;
}
...
...
@@ -552,7 +552,7 @@ int MORSE_Desc_Create_User(MORSE_desc_t **descptr, void *mat, MORSE_enum dtyp, i
status
=
morse_desc_check
(
desc
);
if
(
status
!=
MORSE_SUCCESS
)
{
morse_error
(
"MORSE_Desc_Create"
,
"invalid descriptor"
);
morse_error
(
"MORSE_Desc_Create
_User
"
,
"invalid descriptor"
);
MORSE_Desc_Destroy
(
&
desc
);
return
status
;
}
...
...
@@ -566,8 +566,8 @@ int MORSE_Desc_Create_User(MORSE_desc_t **descptr, void *mat, MORSE_enum dtyp, i
*
* @ingroup Descriptor
*
* MORSE_Desc_Create_OOC - Create matrix descriptor for tiled matrix which
may
* not fit memory.
* MORSE_Desc_Create_OOC
_User
- Create matrix descriptor for tiled matrix which
*
may
not fit memory.
*
******************************************************************************
*
...
...
@@ -605,12 +605,12 @@ int MORSE_Desc_Create_User(MORSE_desc_t **descptr, void *mat, MORSE_enum dtyp, i
* \retval MORSE_SUCCESS successful exit
*
*****************************************************************************/
int
MORSE_Desc_Create_OOC
(
MORSE_desc_t
**
descptr
,
MORSE_enum
dtyp
,
int
mb
,
int
nb
,
int
bsiz
,
int
lm
,
int
ln
,
int
i
,
int
j
,
int
m
,
int
n
,
int
p
,
int
q
,
int
(
*
get_rankof
)(
const
MORSE_desc_t
*
,
int
,
int
))
int
MORSE_Desc_Create_OOC
_User
(
MORSE_desc_t
**
descptr
,
MORSE_enum
dtyp
,
int
mb
,
int
nb
,
int
bsiz
,
int
lm
,
int
ln
,
int
i
,
int
j
,
int
m
,
int
n
,
int
p
,
int
q
,
int
(
*
get_rankof
)(
const
MORSE_desc_t
*
,
int
,
int
))
{
#if !defined (CHAMELEON_SCHED_STARPU)
morse_error
(
"MORSE_Desc_Create_
Tiles
"
,
"Only StarPU supports on-demand tile allocation"
);
morse_error
(
"MORSE_Desc_Create_
OOC_User
"
,
"Only StarPU supports on-demand tile allocation"
);
return
MORSE_ERR_NOT_INITIALIZED
;
#else
MORSE_context_t
*
morse
;
...
...
@@ -621,13 +621,13 @@ int MORSE_Desc_Create_OOC(MORSE_desc_t **descptr, MORSE_enum dtyp, int mb, int n
morse
=
morse_context_self
();
if
(
morse
==
NULL
)
{
morse_error
(
"MORSE_Desc_Create_
Tiles
"
,
"MORSE not initialized"
);
morse_error
(
"MORSE_Desc_Create_
OOC_User
"
,
"MORSE not initialized"
);
return
MORSE_ERR_NOT_INITIALIZED
;
}
/* Allocate memory and initialize the descriptor */
desc
=
(
MORSE_desc_t
*
)
malloc
(
sizeof
(
MORSE_desc_t
));
if
(
desc
==
NULL
)
{
morse_error
(
"MORSE_Desc_Create_
Tiles
"
,
"malloc() failed"
);
morse_error
(
"MORSE_Desc_Create_
OOC_User
"
,
"malloc() failed"
);
return
MORSE_ERR_OUT_OF_RESOURCES
;
}
*
desc
=
morse_desc_init_user
(
dtyp
,
mb
,
nb
,
bsiz
,
lm
,
ln
,
i
,
j
,
m
,
n
,
p
,
q
,
...
...
@@ -646,7 +646,7 @@ int MORSE_Desc_Create_OOC(MORSE_desc_t **descptr, MORSE_enum dtyp, int mb, int n
status
=
morse_desc_check
(
desc
);
if
(
status
!=
MORSE_SUCCESS
)
{
morse_error
(
"MORSE_Desc_Create_
Tiles
"
,
"invalid descriptor"
);
morse_error
(
"MORSE_Desc_Create_
OOC_User
"
,
"invalid descriptor"
);
MORSE_Desc_Destroy
(
&
desc
);
return
status
;
}
...
...
@@ -656,6 +656,55 @@ int MORSE_Desc_Create_OOC(MORSE_desc_t **descptr, MORSE_enum dtyp, int mb, int n
#endif
}
/**
*****************************************************************************
*
* @ingroup Descriptor
*
* MORSE_Desc_Create_OOC - Create matrix descriptor for tiled matrix which may
* not fit memory.
*
******************************************************************************
*
* @param[out] desc
* On exit, descriptor of the matrix.
*
* @param[in] dtyp
* Data type of the matrix:
* @arg MorseRealFloat: single precision real (S),
* @arg MorseRealDouble: double precision real (D),
* @arg MorseComplexFloat: single precision complex (C),
* @arg MorseComplexDouble: double precision complex (Z).
*
* @param[in] nb
* Number of rows and columns in a tile.
*
* @param[in] m
* Number of rows of the entire matrix.
*
* @param[in] n
* Number of columns of the entire matrix.
*
* @param[in] p
* 2d-block cyclic partitioning, number of tiles in rows.
*
* @param[in] q
* 2d-block cyclic partitioning, number of tiles in columns.
*
******************************************************************************
*
* @return
* \retval MORSE_SUCCESS successful exit
*
*****************************************************************************/
int
MORSE_Desc_Create_OOC
(
MORSE_desc_t
**
descptr
,
MORSE_enum
dtyp
,
int
mb
,
int
nb
,
int
bsiz
,
int
lm
,
int
ln
,
int
i
,
int
j
,
int
m
,
int
n
,
int
p
,
int
q
)
{
return
MORSE_Desc_Create_OOC_User
(
descptr
,
dtyp
,
mb
,
nb
,
bsiz
,
lm
,
ln
,
i
,
j
,
m
,
n
,
p
,
q
,
morse_getrankof_2d
);
}
/**
*****************************************************************************
*
...
...
This diff is collapsed.
Click to expand it.
include/morse.h.in
+
7
−
4
View file @
0e6d45c1
...
...
@@ -85,15 +85,18 @@ int MORSE_Element_Size(int type);
int MORSE_Desc_Create (MORSE_desc_t **desc, void *mat, MORSE_enum dtyp,
int mb, int nb, int bsiz, int lm, int ln,
int i, int j, int m, int n, int p, int q);
int MORSE_Desc_Create_OOC (MORSE_desc_t **desc, MORSE_enum dtyp,
int mb, int nb, int bsiz, int lm, int ln,
int i, int j, int m, int n, int p, int q,
int (*get_rankof)( const MORSE_desc_t*, int, int ));
int MORSE_Desc_Create_User(MORSE_desc_t **desc, void *mat, MORSE_enum dtyp, int mb, int nb, int bsiz,
int lm, int ln, int i, int j, int m, int n, int p, int q,
void* (*get_blkaddr)( const MORSE_desc_t*, int, int ),
int (*get_blkldd)( const MORSE_desc_t*, int ),
int (*get_rankof)( const MORSE_desc_t*, int, int ));
int MORSE_Desc_Create_OOC(MORSE_desc_t **desc, MORSE_enum dtyp,
int mb, int nb, int bsiz, int lm, int ln,
int i, int j, int m, int n, int p, int q);
int MORSE_Desc_Create_OOC_User(MORSE_desc_t **desc, MORSE_enum dtyp,
int mb, int nb, int bsiz, int lm, int ln,
int i, int j, int m, int n, int p, int q,
int (*get_rankof)( const MORSE_desc_t*, int, int ));
int MORSE_Desc_Destroy (MORSE_desc_t **desc);
int MORSE_Desc_Acquire (MORSE_desc_t *desc);
int MORSE_Desc_Release (MORSE_desc_t *desc);
...
...
This diff is collapsed.
Click to expand it.
timing/timing.h
+
11
−
11
View file @
0e6d45c1
...
...
@@ -109,18 +109,18 @@ enum dparam_timing {
/* Paste code to allocate a matrix in desc if cond_init is true */
#define PASTE_CODE_ALLOCATE_MATRIX_TILE(_desc_, _cond_, _type_, _type2_, _lda_, _m_, _n_) \
MORSE_desc_t *_desc_ = NULL; \
int status ## _desc_ ; \
int status ## _desc_ ;
\
if( _cond_ ) { \
if (ooc) \
status ## _desc_ = MORSE_Desc_Create_OOC(&(_desc_), _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q
, NULL);
\
else if (!bigmat) \
status ## _desc_ = MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q, morse_getaddr_null, NULL, NULL);\
else \
status ## _desc_ = MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q);\
if (status ## _desc_ != MORSE_SUCCESS) return (status ## _desc_);
\
if (ooc)
\
status ## _desc_ = MORSE_Desc_Create_OOC(&(_desc_), _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q
);
\
else if (!bigmat)
\
status ## _desc_ = MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q, morse_getaddr_null, NULL, NULL);
\
else
\
status ## _desc_ = MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q);
\
if (status ## _desc_ != MORSE_SUCCESS) return (status ## _desc_); \
}
#define PASTE_CODE_FREE_MATRIX(_desc_) \
...
...
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