Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
228d7cf2
Commit
228d7cf2
authored
May 17, 2011
by
Thomas Jahns
🤸
Browse files
Add communicator to pack size estimation.
* It's required by MPI_Pack_size.
parent
7faa8c7b
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
228d7cf2
...
...
@@ -50,9 +50,9 @@ static int gridCompareP ( void * gridptr1, void * gridptr2 );
static
void
gridDestroyP
(
void
*
gridptr
);
static
void
gridPrintP
(
void
*
gridptr
);
#ifdef USE_MPI
static
int
gridGetSizeP
(
void
*
gridptr
);
static
int
gridGetSizeP
(
void
*
gridptr
,
MPI_Comm
comm
);
static
void
gridPackP
(
void
*
gridptr
,
void
*
buff
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
int
*
position
,
MPI_Comm
comm
);
#endif
resOps
gridOps
=
{
gridCompareP
,
gridDestroyP
,
gridPrintP
...
...
@@ -3675,7 +3675,7 @@ void gridGetIndexArray ( int ngrids, int * gridIndexArray )
#ifdef USE_MPI
int
gridGetSizeP
(
void
*
gridptr
)
int
gridGetSizeP
(
void
*
gridptr
,
MPI_Comm
comm
)
{
grid_t
*
gridP
=
(
grid_t
*
)
gridptr
;
int
size
=
0
;
...
...
src/institution.c
View file @
228d7cf2
...
...
@@ -32,7 +32,7 @@ static int instituteCompareP ( void * instituteptr1, void * instituteptr2 );
static
void
instituteDestroyP
(
void
*
instituteptr
);
static
void
institutePrintP
(
void
*
instituteptr
);
#ifdef USE_MPI
static
int
instituteGetSizeP
(
void
*
instituteptr
);
static
int
instituteGetSizeP
(
void
*
instituteptr
,
MPI_Comm
comm
);
static
void
institutePackP
(
void
*
instituteptr
,
void
*
buf
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
#endif
...
...
@@ -326,7 +326,7 @@ void institutePrintP ( void * instituteptr )
#ifdef USE_MPI
static
int
instituteGetSizeP
(
void
*
instituteptr
)
int
instituteGetSizeP
(
void
*
instituteptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
src/model.c
View file @
228d7cf2
...
...
@@ -36,7 +36,7 @@ static int modelCompareP ( void * modelptr1, void * modelptr2 );
static
void
modelDestroyP
(
void
*
modelptr
);
static
void
modelPrintP
(
void
*
modelptr
);
#ifdef USE_MPI
static
int
modelGetSizeP
(
void
*
modelptr
);
static
int
modelGetSizeP
(
void
*
modelptr
,
MPI_Comm
comm
);
static
void
modelPackP
(
void
*
modelptr
,
void
*
buff
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
#endif
...
...
@@ -264,7 +264,7 @@ void modelPrintP ( void * modelptr )
#ifdef USE_MPI
static
int
modelGetSizeP
(
void
*
modelptr
)
int
modelGetSizeP
(
void
*
modelptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
src/resource_handle.c
View file @
228d7cf2
...
...
@@ -335,10 +335,10 @@ int reshCountType ( resOps * ops )
#ifdef USE_MPI
static
size_
t
getPackBufferSize
()
in
t
getPackBufferSize
(
MPI_Comm
comm
)
{
int
nsp
,
i
;
size_
t
size
=
0
;
in
t
size
=
0
;
node
*
curr
;
nsp
=
namespaceGetActive
();
...
...
@@ -354,7 +354,7 @@ size_t getPackBufferSize ()
continue
;
size
+=
curr
->
ops
->
valGetSize
(
(
void
*
)
curr
->
ptr
)
+
size
+=
curr
->
ops
->
valGetSize
(
curr
->
ptr
,
comm
)
+
(
2
*
sizeof
(
int
));
}
...
...
@@ -386,7 +386,7 @@ void reshPackBufferCreate ( char ** buffer, size_t * size, MPI_Comm comm )
nsp
=
namespaceGetActive
();
*
size
=
getPackBufferSize
()
+
sizeof
(
int
)
;
*
size
=
getPackBufferSize
(
comm
)
+
sizeof
(
int
)
;
*
buffer
=
xcalloc
(
1
,
*
size
);
for
(
i
=
0
;
i
<
arraySizeAllocated
[
nsp
];
i
++
)
...
...
src/resource_handle.h
View file @
228d7cf2
...
...
@@ -27,7 +27,7 @@ typedef int ( * valCompareFunc )( void *, void * );
typedef
void
(
*
valDestroyFunc
)(
void
*
);
typedef
void
(
*
valPrintFunc
)(
void
*
);
#ifdef USE_MPI
typedef
int
(
*
valGetSizeFunc
)(
void
*
);
typedef
int
(
*
valGetSizeFunc
)(
void
*
,
MPI_Comm
comm
);
typedef
void
(
*
valPackFunc
)(
void
*
,
void
*
buf
,
int
size
,
int
*
pos
,
MPI_Comm
comm
);
#endif
...
...
src/stream_int.c
View file @
228d7cf2
...
...
@@ -69,7 +69,7 @@ static int streamCompareP ( void * streamptr1, void * streamptr2 );
static
void
streamDestroyP
(
void
*
streamptr
);
static
void
streamPrintP
(
void
*
streamptr
);
#ifdef USE_MPI
static
int
streamGetSizeP
(
void
*
streamptr
);
static
int
streamGetSizeP
(
void
*
streamptr
,
MPI_Comm
comm
);
static
void
streamPackP
(
void
*
streamptr
,
void
*
buff
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
#endif
...
...
@@ -573,7 +573,7 @@ void streamPrintP ( void * streamptr )
#ifdef USE_MPI
static
int
streamGetSizeP
(
void
*
streamptr
)
int
streamGetSizeP
(
void
*
streamptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
src/taxis.c
View file @
228d7cf2
...
...
@@ -38,7 +38,7 @@ static int taxisCompareP ( void * taxisptr1, void * taxisptr2 );
static
void
taxisDestroyP
(
void
*
taxisptr
);
static
void
taxisPrintP
(
void
*
taxisptr
);
#ifdef USE_MPI
static
int
taxisGetSizeP
(
void
*
taxisptr
);
static
int
taxisGetSizeP
(
void
*
taxisptr
,
MPI_Comm
comm
);
static
void
taxisPackP
(
void
*
taxisptr
,
void
*
buf
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
#endif
...
...
@@ -1272,7 +1272,7 @@ int taxisCompareP ( void * taxisptr1, void * taxisptr2 )
#ifdef USE_MPI
static
int
taxisGetSizeP
(
void
*
taxisptr
)
int
taxisGetSizeP
(
void
*
taxisptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
src/vlist.c
View file @
228d7cf2
...
...
@@ -48,7 +48,7 @@ vlist_compare(vlist_t *a, vlist_t *b)
static
void
vlistPrintKernel
(
vlist_t
*
vlistptr
);
#ifdef USE_MPI
static
int
vlistGetSizeP
(
void
*
vlistptr
);
static
int
vlistGetSizeP
(
void
*
vlistptr
,
MPI_Comm
comm
);
static
void
vlistPackP
(
void
*
vlistptr
,
void
*
buff
,
int
size
,
int
*
position
,
MPI_Comm
comm
);
#endif
...
...
@@ -1502,7 +1502,7 @@ int vlistHasTime(int vlistID)
#ifdef USE_MPI
static
int
vlistGetSizeP
(
void
*
vlistptr
)
int
vlistGetSizeP
(
void
*
vlistptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
src/zaxis.c
View file @
228d7cf2
...
...
@@ -65,7 +65,7 @@ static int zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 );
static
void
zaxisDestroyP
(
void
*
zaxisptr
);
static
void
zaxisPrintP
(
void
*
zaxisptr
);
#ifdef USE_MPI
static
int
zaxisGetSizeP
(
void
*
zaxisptr
);
static
int
zaxisGetSizeP
(
void
*
zaxisptr
,
MPI_Comm
comm
);
static
void
zaxisPackP
(
void
*
zaxisptr
,
void
*
buffer
,
int
size
,
int
*
pos
,
MPI_Comm
comm
);
#endif
...
...
@@ -1198,7 +1198,7 @@ int zaxisCompareP ( void * zaxisptr1, void * zaxisptr2 )
#ifdef USE_MPI
static
int
zaxisGetSizeP
(
void
*
zaxisptr
)
int
zaxisGetSizeP
(
void
*
zaxisptr
,
MPI_Comm
comm
)
{
xdebug
();
return
0
;
...
...
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