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
Merge requests
!434
Feature mpi comm user
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature mpi comm user
fpruvost/chameleon:feature-mpi-comm-user
into
master
Overview
14
Commits
5
Pipelines
0
Changes
3
All threads resolved!
Hide all comments
Merged
PRUVOST Florent
requested to merge
fpruvost/chameleon:feature-mpi-comm-user
into
master
1 year ago
Overview
14
Commits
5
Pipelines
0
Changes
3
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
b9849ed3
Show latest version
3 files
+
40
−
48
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
b9849ed3
doc: update step6 and step7 coding style and documentation
· b9849ed3
PRUVOST Florent
authored
1 year ago
doc/user/chapters/using.org
+
30
−
38
Options
@@ -687,34 +687,29 @@
In this program we use the tile data layout from PLASMA so that the call
#+begin_example
CHAMELEON_Desc_Create_User(&descA, NULL, ChamRealDouble,
NB, NB, NB*NB, N, N,
0, 0, N, N,
GRID_P, GRID_Q,
chameleon_getaddr_ccrb,
chameleon_getblkldd_ccrb,
chameleon_getrankof_2d, NULL);
CHAMELEON_Desc_Create(&descA, NULL, ChamRealDouble,
NB, NB, NB*NB, N, N,
0, 0, N, N,
GRID_P, GRID_Q);
#+end_example
is equivalent to the following call
#+begin_example
CHAMELEON_Desc_Create(&descA, NULL, ChamRealDouble,
NB, NB, NB*NB, N, N,
0, 0, N, N,
GRID_P, GRID_Q);
CHAMELEON_Desc_Create_User(&descA, NULL, ChamRealDouble,
NB, NB, NB*NB, N, N,
0, 0, N, N,
GRID_P, GRID_Q,
chameleon_getaddr_ccrb,
chameleon_getblkldd_ccrb,
chameleon_getrankof_2d, NULL);
#+end_example
functions *chameleon_getaddr_ccrb*, *chameleon_getblkldd_ccrb*,
*chameleon_getrankof_2d* being used in *Desc_Create*. It is interesting
to notice that the code is almost the same as Step5. The only
additional information to give is the way tiles are distributed
through the third function given to *CHAMELEON_Desc_Create_User*.
Here, because we have made experiments only with a 2-D
block-cyclic distribution, we have parameters P and Q in the
interface of *Desc_Create* but they have sense only for 2-D
block-cyclic distribution and then using *chameleon_getrankof_2d*
function. Of course it could be used with other distributions,
being no more the parameters of a 2-D block-cyclic grid but of
another distribution.
functions *chameleon_getaddr_ccrb*, *chameleon_getblkldd_ccrb*, *chameleon_getrankof_2d* being used in *Desc_Create*. It
is interesting to notice that the code is almost the same as Step5. The only additional information to give is the
way tiles are distributed through the third function given to *CHAMELEON_Desc_Create_User*. Here, because we have
made experiments only with a 2-D block-cyclic distribution, we have parameters P and Q in the interface of
*Desc_Create* but they have sense only for 2-D block-cyclic distribution and then using *chameleon_getrankof_2d*
function. Of course it could be used with other distributions, being no more the parameters of a 2-D block-cyclic
grid but of another distribution. And the last parameter ~void* get_rankof_arg~ of CHAMELEON_Desc_Create_User can be
used to get custom data in the *get_rankof* function.
**** Step7
@@ -733,23 +728,20 @@
that the function used to fill the tiles is provided by the user,
and therefore this approach is much more flexible.
The new function to understand is *CHAMELEON_
dbuild
_Tile*, e.g.
The new function to understand is *CHAMELEON_
map
_Tile*, e.g.
#+begin_example
struct data_pl data_A={(double)N, 51, N};
CHAMELEON_dbuild_Tile(ChamUpperLower, descA, (void*)&data_A,
Cham_build_callback_plgsy);
struct data_pl data_A={(double)N, 51};
CHAMELEON_map_Tile(ChamW, ChamUpperLower, descA, Cham_map_plgsy, (void*)&data_A);
#+end_example
The idea here is to let Chameleon fill the matrix data in a
task-based fashion (parallel) by using a function given by the
user. First, the user should define if all the blocks must be
entirelly filled or just the upper/lower part with, /e.g./
ChamUpperLower. We still relies on the same structure
*CHAM_desc_t* which must be initialized with the proper
parameters, by calling for example *CHAMELEON_Desc_Create*. Then, an
opaque pointer is used to let the user give some extra data used
by his function. The last parameter is the pointer to the user's
function.
The idea here is to let Chameleon fill the matrix data in a task-based fashion (parallel) by using a function given
by the user. First, the user has to give the access mode to the matrix between: *ChamR, *ChamW*, *ChamRW* depending on
the kind of operations the callback function needs to do on the tiles. In our example here we fill the matrix with
random values for the first time so that we use the access mode *ChamW*. Second, the user should define if all the
blocks must be entirelly filled or just the upper/lower part with, /e.g./ ChamUpperLower. We still relies on the
same structure *CHAM_desc_t* which must be initialized with the proper parameters, by calling for example
*CHAMELEON_Desc_Create*. Then comes the pointer to the user's function. And finally the last parameter is an opaque
pointer is used to let the user give some extra data used by his function.
*** Using custom data distributions
:PROPERTIES:
Loading