Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
8f1763f9
Commit
8f1763f9
authored
Apr 22, 2015
by
Jeff Hammond
Committed by
Junchao Zhang
Apr 30, 2015
Browse files
compress test cases with loop
Signed-off-by:
Junchao Zhang
<
jczhang@mcs.anl.gov
>
parent
66b5407a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/mpi/f90/f90types/createf90types.c
View file @
8f1763f9
...
...
@@ -11,6 +11,8 @@
#include <string.h>
#include "mpitest.h"
static
int
cases
[
3
][
2
]
=
{{
3
,
10
},{
3
,
MPI_UNDEFINED
},{
MPI_UNDEFINED
,
10
}};
/*
static char MTEST_Descrip[] = "Test the routines to access the Fortran 90 datatypes from C";
*/
...
...
@@ -132,7 +134,7 @@ int main( int argc, char *argv[] )
int
p
,
r
;
int
errs
=
0
;
int
err
;
int
i
,
nLoop
=
1
;
int
i
,
j
,
nLoop
=
1
;
MPI_Datatype
newtype
;
MTest_Init
(
0
,
0
);
...
...
@@ -146,42 +148,27 @@ int main( int argc, char *argv[] )
MPI_Comm_set_errhandler
(
MPI_COMM_WORLD
,
MPI_ERRORS_RETURN
);
for
(
i
=
0
;
i
<
nLoop
;
i
++
)
{
/* printf( "+" );fflush(stdout); */
/* This should be a valid type similar to MPI_REAL */
p
=
3
;
r
=
10
;
err
=
MPI_Type_create_f90_real
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"REAL"
,
p
,
r
,
MPI_COMBINER_F90_REAL
,
err
,
newtype
);
r
=
MPI_UNDEFINED
;
err
=
MPI_Type_create_f90_real
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"REAL"
,
p
,
r
,
MPI_COMBINER_F90_REAL
,
err
,
newtype
);
p
=
MPI_UNDEFINED
;
r
=
10
;
err
=
MPI_Type_create_f90_real
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"REAL"
,
p
,
r
,
MPI_COMBINER_F90_REAL
,
err
,
newtype
);
/* These should be a valid type similar to MPI_REAL */
for
(
j
=
0
;
j
<
3
;
j
++
)
{
p
=
cases
[
j
][
0
];
r
=
cases
[
j
][
1
];
err
=
MPI_Type_create_f90_real
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"REAL"
,
p
,
r
,
MPI_COMBINER_F90_REAL
,
err
,
newtype
);
}
/* This should be a valid type similar to MPI_COMPLEX */
p
=
3
;
r
=
10
;
err
=
MPI_Type_create_f90_complex
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"COMPLEX"
,
p
,
r
,
MPI_COMBINER_F90_COMPLEX
,
err
,
newtype
);
r
=
MPI_UNDEFINED
;
err
=
MPI_Type_create_f90_complex
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"COMPLEX"
,
p
,
r
,
MPI_COMBINER_F90_COMPLEX
,
err
,
newtype
);
p
=
MPI_UNDEFINED
;
r
=
10
;
err
=
MPI_Type_create_f90_complex
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"COMPLEX"
,
p
,
r
,
MPI_COMBINER_F90_COMPLEX
,
err
,
newtype
);
/* These should be a valid type similar to MPI_COMPLEX */
for
(
j
=
0
;
j
<
3
;
j
++
)
{
p
=
cases
[
j
][
0
];
r
=
cases
[
j
][
1
];
err
=
MPI_Type_create_f90_complex
(
p
,
r
,
&
newtype
);
errs
+=
checkType
(
"COMPLEX"
,
p
,
r
,
MPI_COMBINER_F90_COMPLEX
,
err
,
newtype
);
}
/* This should be a valid type similar to MPI_INTEGER */
p
=
3
;
r
=
10
;
err
=
MPI_Type_create_f90_integer
(
p
,
&
newtype
);
errs
+=
checkType
(
"INTEGER"
,
p
,
r
,
MPI_COMBINER_F90_INTEGER
,
err
,
newtype
);
...
...
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