Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PaMPA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PaMPA
PaMPA
Commits
cddbf553
Commit
cddbf553
authored
Mar 07, 2018
by
LACHAT Cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some fixes due to project merges
parent
85a704f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
8 deletions
+51
-8
CMakeLists.txt
CMakeLists.txt
+1
-1
src/libpampa/dmesh_overlap.h
src/libpampa/dmesh_overlap.h
+0
-1
src/libpampa/dmesh_redist.c
src/libpampa/dmesh_redist.c
+50
-6
No files found.
CMakeLists.txt
View file @
cddbf553
...
@@ -129,7 +129,7 @@ elseif (INT_SIZE STREQUAL "long")
...
@@ -129,7 +129,7 @@ elseif (INT_SIZE STREQUAL "long")
add_definitions
(
-DLONG
)
add_definitions
(
-DLONG
)
endif
()
endif
()
option
(
PAMPA_ADAPT
"Adapt functions"
O
N
)
option
(
PAMPA_ADAPT
"Adapt functions"
O
FF
)
if
(
PAMPA_ADAPT
)
if
(
PAMPA_ADAPT
)
add_definitions
(
-DPAMPA_ADAPT
)
add_definitions
(
-DPAMPA_ADAPT
)
endif
()
endif
()
...
...
src/libpampa/dmesh_overlap.h
View file @
cddbf553
...
@@ -100,7 +100,6 @@ dmeshOverlap2 (
...
@@ -100,7 +100,6 @@ dmeshOverlap2 (
Gnum
hashnbr
,
Gnum
hashnbr
,
Gnum
hashmsk
);
Gnum
hashmsk
);
static
int
int
dmeshOvlpProcVertResize
(
dmeshOvlpProcVertResize
(
DmeshOvlpProcVert
*
restrict
*
hashtabptr
,
DmeshOvlpProcVert
*
restrict
*
hashtabptr
,
...
...
src/libpampa/dmesh_redist.c
View file @
cddbf553
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
#include <ptscotch.h>
#include <ptscotch.h>
#include "dmesh_dgraph.h"
#include "dmesh_dgraph.h"
#include "dgraph_graph.h"
#include "dgraph_graph.h"
#include "dmesh_overlap.h"
#include "dmesh_redist.h"
#include "dmesh_redist.h"
//! This routine computes another distributed mesh which corresponds to the
//! This routine computes another distributed mesh which corresponds to the
...
@@ -79,6 +80,31 @@ dmeshRedist (
...
@@ -79,6 +80,31 @@ dmeshRedist (
Gnum
const
dstovlpglbval
,
Gnum
const
dstovlpglbval
,
Dmesh
*
const
dstmeshptr
)
//!< XXX
Dmesh
*
const
dstmeshptr
)
//!< XXX
{
{
return
(
dmeshRedistFull
(
srcmeshptr
,
srcpartloctax
,
srcpermgsttax
,
dstvertlocdlt
,
dstedgelocdlt
,
dstovlpglbval
,
dstmeshptr
,
NULL
,
~
0
,
~
0
,
~
0
));
}
//! This routine computes another distributed mesh which corresponds to the
//! partition, with all arguments (especially for the overlap).
//XXX ne pas oublier de mettre un mot sur le fait que c'est cette fonction qui
//initialise le Dmesh destinataire en faisant une copie du communicateur
//!
//! \returns 0 : if the computation succeeded.
//! \returns !0 : on error.
int
dmeshRedistFull
(
Dmesh
*
const
srcmeshptr
,
//!< XXX
Gnum
*
const
srcpartloctax
,
//!< XXX
Gnum
*
const
srcpermgsttax
,
//!< XXX
Gnum
const
dstvertlocdlt
,
//!< XXX
Gnum
const
dstedgelocdlt
,
//!< XXX
Gnum
const
dstovlpglbval
,
Dmesh
*
const
dstmeshptr
,
//!< XXX
DmeshOvlpProcVert
*
const
ovphashtab
,
Gnum
ovphashsiz
,
/* Size of hash table */
Gnum
ovphashnbr
,
Gnum
ovphashmsk
)
{
//errorPrint("is not yet implemented");
//errorPrint("is not yet implemented");
//return (1);
//return (1);
...
@@ -101,6 +127,7 @@ dmeshRedist (
...
@@ -101,6 +127,7 @@ dmeshRedist (
Gnum
*
dstenttloctx2
;
Gnum
*
dstenttloctx2
;
Gnum
dstpermlocnbr
;
Gnum
dstpermlocnbr
;
Gnum
*
dstpermloctax
;
Gnum
*
dstpermloctax
;
DmeshRedistVert
*
dstpermloctx2
;
DmeshRedistVert
*
dstenttpermloctax
;
DmeshRedistVert
*
dstenttpermloctax
;
Gnum
srcpermlocnbr
;
Gnum
srcpermlocnbr
;
Gnum
*
srcpermloctax
;
Gnum
*
srcpermloctax
;
...
@@ -254,10 +281,10 @@ dmeshRedist (
...
@@ -254,10 +281,10 @@ dmeshRedist (
/* Exchanging entity numbers */
/* Exchanging entity numbers */
if
(
memAllocGroup
((
void
**
)
(
void
*
)
if
(
memAllocGroup
((
void
**
)
(
void
*
)
&
dstenttloctax
,
(
size_t
)
(
vrcvlocnbr
*
sizeof
(
Gnum
)),
&
dstenttloctax
,
(
size_t
)
(
vrcvlocnbr
*
sizeof
(
Gnum
)),
&
dstenttloctx2
,
(
size_t
)
(
dstpermlocnbr
*
sizeof
(
Gnum
)),
&
dstenttloctx2
,
(
size_t
)
(
dstpermlocnbr
*
sizeof
(
Gnum
)),
&
dstpermloctax
,
(
size_t
)
(
dstpermlocnbr
*
sizeof
(
Gnum
)),
&
dstpermloctax
,
(
size_t
)
((
dstpermlocnbr
*
2
)
*
sizeof
(
Gnum
)),
&
dstenttpermloctax
,
(
size_t
)
(
dstpermlocnbr
*
sizeof
(
DmeshRedistVert
)),
&
dstenttpermloctax
,
(
size_t
)
(
dstpermlocnbr
*
sizeof
(
DmeshRedistVert
)),
(
void
*
)
NULL
)
==
NULL
)
{
(
void
*
)
NULL
)
==
NULL
)
{
errorPrint
(
"out of memory"
);
errorPrint
(
"out of memory"
);
cheklocval
=
1
;
cheklocval
=
1
;
...
@@ -456,6 +483,22 @@ dmeshRedist (
...
@@ -456,6 +483,22 @@ dmeshRedist (
}
}
}
}
if
(
dstpermloctax
!=
NULL
)
{
for
(
vertlocnum
=
baseval
+
vrcvlocnbr
-
1
,
vertlocnnd
=
baseval
-
1
;
vertlocnum
>
vertlocnnd
;
vertlocnum
--
)
{
if
(
dstpermloctax
[
vertlocnum
]
!=
~
0
)
{
// XXX ne pourrait-on pas faire sans le postulat sur dstpermloctax ?
dstpermloctax
[
vertlocnum
]
-=
vertlocbas
;
dstenttloctx2
[
dstpermloctax
[
vertlocnum
]]
=
dstenttloctax
[
vertlocnum
];
dstpermloctax
[
2
*
vertlocnum
]
=
dstpermloctax
[
vertlocnum
];
dstpermloctax
[
2
*
vertlocnum
+
1
]
=
vertlocnum
;
}
}
intSort2asc1
(
dstpermloctax
+
baseval
,
vrcvlocnbr
);
dstpermloctx2
=
(
DmeshRedistVert
*
)
(
dstpermloctax
+
baseval
)
-
baseval
;
}
else
dstpermloctx2
=
NULL
;
for
(
enttlocnum
=
baseval
,
enttlocnnd
=
srcmeshptr
->
enttglbnbr
+
baseval
;
enttlocnum
<
enttlocnnd
;
enttlocnum
++
)
{
for
(
enttlocnum
=
baseval
,
enttlocnnd
=
srcmeshptr
->
enttglbnbr
+
baseval
;
enttlocnum
<
enttlocnnd
;
enttlocnum
++
)
{
DmeshEntity
*
restrict
enttlocptr
;
DmeshEntity
*
restrict
enttlocptr
;
Dvalues
*
valslocptr
=
srcmeshptr
->
valslocptr
;
Dvalues
*
valslocptr
=
srcmeshptr
->
valslocptr
;
...
@@ -515,7 +558,7 @@ dmeshRedist (
...
@@ -515,7 +558,7 @@ dmeshRedist (
else
else
bvrtlocnum
=
enttlocptr
->
mvrtloctax
[
vertlocnum
]
-
dstvertlocbas
;
bvrtlocnum
=
enttlocptr
->
mvrtloctax
[
vertlocnum
]
-
dstvertlocbas
;
dstenttpermloctax
[
vertlocnum
].
vertnum
=
dstpermloct
ax
[
bvrtlocnum
]
;
dstenttpermloctax
[
vertlocnum
].
vertnum
=
dstpermloct
x2
[
bvrtlocnum
].
indxval
;
dstenttpermloctax
[
vertlocnum
].
indxval
=
vertlocnum
;
dstenttpermloctax
[
vertlocnum
].
indxval
=
vertlocnum
;
}
}
...
@@ -578,7 +621,8 @@ dmeshRedist (
...
@@ -578,7 +621,8 @@ dmeshRedist (
return
(
cheklocval
);
return
(
cheklocval
);
}
}
if
(
dstpermloctax
==
NULL
)
{
CHECK_FERR
(
dmeshValueLink
(
dstmeshptr
,
(
void
**
)
&
dstvaluloctmp
,
(
valulocptr
->
flagval
&
~
PAMPA_VALUE_ALLOCATED
),
&
dummy
,
&
dummy2
,
valulocptr
->
typeval
,
enttlocnum
,
valulocptr
->
tagnum
),
srcmeshptr
->
proccomm
);
if
(
dstpermloctx2
==
NULL
)
{
dstvaluloctm2
=
dstvaluloctmp
;
dstvaluloctm2
=
dstvaluloctmp
;
}
}
else
{
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment