Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
3d9b2111
Commit
3d9b2111
authored
May 30, 2011
by
Deike Kleberg
Browse files
More implemtation of grid pack/unpack.
parent
9eb6e312
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
3d9b2111
This diff is collapsed.
Click to expand it.
src/grid.h
View file @
3d9b2111
...
...
@@ -3,6 +3,8 @@
typedef
unsigned
char
mask_t
;
enum
{
CHAR
=
0
,
INTEGER
=
1
,
DOUBLE
=
2
,
stringlen
=
256
};
typedef
struct
{
int
self
;
int
type
;
/* grid type */
...
...
@@ -54,14 +56,14 @@ typedef struct {
int
ysize
;
int
locked
;
int
lcomplex
;
char
xname
[
256
];
char
yname
[
256
];
char
xlongname
[
256
];
char
ylongname
[
256
];
char
xstdname
[
256
];
char
ystdname
[
256
];
char
xunits
[
256
];
char
yunits
[
256
];
char
xname
[
stringlen
];
char
yname
[
stringlen
];
char
xlongname
[
stringlen
];
char
ylongname
[
stringlen
];
char
xstdname
[
stringlen
];
char
ystdname
[
stringlen
];
char
xunits
[
stringlen
];
char
yunits
[
stringlen
];
}
grid_t
;
...
...
src/pio_rpc.c
View file @
3d9b2111
...
...
@@ -11,6 +11,9 @@
#include
"vlist.h"
#include
"namespace.h"
extern
void
gridUnpack
(
char
*
,
int
,
int
*
,
MPI_Comm
);
MPI_Comm
commGlob
;
int
sizeGlob
;
int
rankGlob
;
...
...
@@ -213,7 +216,7 @@ void rpcUnpackResources ( char * unpackBuffer, int unpackBufferSize,
int
token1
,
token2
,
nspTarget
;
int
unpackBufferPos
=
0
;
char
text
[
4096
];
while
(
unpackBufferPos
<
unpackBufferSize
)
{
xmpi
(
MPI_Unpack
(
unpackBuffer
,
unpackBufferSize
,
&
unpackBufferPos
,
...
...
@@ -228,7 +231,7 @@ void rpcUnpackResources ( char * unpackBuffer, int unpackBufferSize,
&
nspTarget
,
1
,
MPI_INT
,
comm
));
break
;
case
GRID
:
u
npack
Grid
(
unpackBuffer
,
unpackBufferSize
,
&
unpackBufferPos
,
gridU
npack
(
unpackBuffer
,
unpackBufferSize
,
&
unpackBufferPos
,
comm
);
break
;
case
ZAXIS
:
...
...
src/pio_util.c
View file @
3d9b2111
...
...
@@ -204,4 +204,10 @@ int xminInt ( int a, int b )
}
/****************************************************/
/****************************************************/
int
xchecksum
(
int
type
,
int
count
,
void
*
buffer
)
{
return
0
;
}
src/pio_util.h
View file @
3d9b2111
...
...
@@ -132,4 +132,6 @@ void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line, \
__LINE__, tag, source, text )
int
xmaxInt
(
int
,
int
);
int
xminInt
(
int
,
int
);
int
xchecksum
(
int
,
int
,
void
*
);
#endif
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment