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
9527776c
Commit
9527776c
authored
Nov 27, 2012
by
James Dinan
Browse files
[svn-r10680] Updated RMA tests to use shared squelch code
Reviewer: goodell
parent
e1d9becf
Changes
13
Hide whitespace changes
Inline
Side-by-side
test/mpi/rma/compare_and_swap.c
View file @
9527776c
...
...
@@ -10,22 +10,10 @@
#include <assert.h>
#include <mpi.h>
#include "mpitest.h"
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
#include "squelch.h"
#define ITER 100
const
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nproc
;
int
errors
=
0
,
all_errors
=
0
;
...
...
test/mpi/rma/fetch_and_op.c
View file @
9527776c
...
...
@@ -10,22 +10,10 @@
#include <assert.h>
#include <mpi.h>
#include "mpitest.h"
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT || verbose) { \
SQ_COUNT++; \
X \
} \
} while (0)
#include "squelch.h"
#define ITER 100
const
int
verbose
=
0
;
#if defined (FOP_TYPE_CHAR)
# define TYPE_C char
# define TYPE_MPI MPI_CHAR
...
...
test/mpi/rma/get_accumulate.c
View file @
9527776c
...
...
@@ -10,17 +10,7 @@
#include <string.h>
#include <mpi.h>
#include "mpitest.h"
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT || verbose) { \
SQ_COUNT++; \
X \
} \
} while (0)
#include "squelch.h"
#define ITER 100
#define COUNT 5
...
...
@@ -49,8 +39,6 @@ static int SQ_COUNT = 0;
# define TYPE_MPI TYPE_MPI_BASE
#endif
const
int
verbose
=
0
;
void
reset_bufs
(
TYPE_C
*
win_ptr
,
TYPE_C
*
res_ptr
,
TYPE_C
*
val_ptr
,
TYPE_C
value
,
MPI_Win
win
)
{
int
rank
,
nproc
,
i
;
...
...
test/mpi/rma/put_base.c
View file @
9527776c
...
...
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 1024
#define YDIM 1024
...
...
@@ -31,19 +32,6 @@
#define SUB_YDIM 1024
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
,
*
dst_buf
;
...
...
@@ -61,9 +49,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Put Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
1
.
0
+
rank
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
@@ -86,9 +71,6 @@ int main(int argc, char **argv) {
MPI_Get_address
(
base_ptr
,
&
base_int
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
" + iteration %d
\n
"
,
i
);
for
(
j
=
0
;
j
<
SUB_YDIM
;
j
++
)
{
MPI_Get_address
(
&
src_buf
[
j
*
XDIM
],
&
idx_loc
[
j
]);
idx_loc
[
j
]
=
idx_loc
[
j
]
-
base_int
;
...
...
test/mpi/rma/put_bottom.c
View file @
9527776c
...
...
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 1024
#define YDIM 1024
...
...
@@ -29,19 +30,6 @@
#define SUB_YDIM 1024
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
,
*
dst_buf
;
...
...
@@ -57,9 +45,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Put Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
1
.
0
+
rank
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
@@ -77,9 +62,6 @@ int main(int argc, char **argv) {
int
blk_len
[
SUB_YDIM
];
MPI_Datatype
src_type
,
dst_type
;
if
(
rank
==
0
)
if
(
verbose
)
printf
(
" + iteration %d
\n
"
,
i
);
for
(
j
=
0
;
j
<
SUB_YDIM
;
j
++
)
{
MPI_Get_address
(
&
src_buf
[
j
*
XDIM
],
&
idx_loc
[
j
]);
idx_rem
[
j
]
=
j
*
XDIM
*
sizeof
(
double
);
...
...
test/mpi/rma/strided_acc_indexed.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 16
#define YDIM 16
...
...
@@ -27,21 +28,6 @@
#define SUB_YDIM 8
#define ITERATIONS 1
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
/*
static int verbose = 0;
*/
int
main
(
int
argc
,
char
**
argv
)
{
int
itr
,
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
;
...
...
@@ -56,12 +42,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
win_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
/*
Commment this out to avoid gcc --enable-stricttest warning.
if (rank == 0)
if (verbose) ("MPI RMA Strided Accumulate Test:\n");
*/
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
-
1
.
0
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
test/mpi/rma/strided_acc_onelock.c
View file @
9527776c
...
...
@@ -17,24 +17,12 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 1024
#define YDIM 1024
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
buffer
,
*
src_buf
;
...
...
@@ -49,9 +37,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
buffer
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
buffer
+
i
)
=
1
.
0
+
rank
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
test/mpi/rma/strided_acc_subarray.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 1024
#define YDIM 1024
...
...
@@ -27,19 +28,6 @@
#define SUB_YDIM 512
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
;
...
...
@@ -54,9 +42,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
win_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
-
1
.
0
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
test/mpi/rma/strided_get_indexed.c
View file @
9527776c
...
...
@@ -20,25 +20,13 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 8
#define YDIM 1024
#define SUB_XDIM 8
#define SUB_YDIM 256
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
loc_buf
;
...
...
@@ -57,9 +45,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
win_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
loc_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Get Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
1
.
0
+
rank
;
*
(
loc_buf
+
i
)
=
-
1
.
0
;
...
...
test/mpi/rma/strided_getacc_indexed.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 8
#define YDIM 1024
...
...
@@ -27,19 +28,6 @@
#define SUB_YDIM 2
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
,
*
dst_buf
;
...
...
@@ -55,9 +43,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
-
1
.
0
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
test/mpi/rma/strided_getacc_indexed_shared.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 8
#define YDIM 1024
...
...
@@ -27,19 +28,6 @@
#define SUB_YDIM 2
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
rank
,
nranks
,
rank_world
,
nranks_world
;
int
i
,
j
,
peer
,
bufsize
,
errors
;
...
...
@@ -61,9 +49,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test (shared memory window):
\n
"
);
MPI_Win_allocate_shared
(
bufsize
,
1
,
MPI_INFO_NULL
,
shr_comm
,
&
win_buf
,
&
buf_win
);
MPI_Win_fence
(
0
,
buf_win
);
...
...
test/mpi/rma/strided_putget_indexed.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 8
#define YDIM 1024
...
...
@@ -27,19 +28,6 @@
#define SUB_YDIM 255
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
rank
,
nranks
,
peer
,
bufsize
,
errors
;
double
*
win_buf
,
*
src_buf
,
*
dst_buf
;
...
...
@@ -55,9 +43,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test:
\n
"
);
for
(
i
=
0
;
i
<
XDIM
*
YDIM
;
i
++
)
{
*
(
win_buf
+
i
)
=
-
1
.
0
;
*
(
src_buf
+
i
)
=
1
.
0
+
rank
;
...
...
test/mpi/rma/strided_putget_indexed_shared.c
View file @
9527776c
...
...
@@ -20,6 +20,7 @@
#include <math.h>
#include <mpi.h>
#include "mpitest.h"
#include "squelch.h"
#define XDIM 8
#define YDIM 1024
...
...
@@ -27,19 +28,6 @@
#define SUB_YDIM 255
#define ITERATIONS 10
static
const
int
SQ_LIMIT
=
10
;
static
int
SQ_COUNT
=
0
;
#define SQUELCH(X) \
do { \
if (SQ_COUNT < SQ_LIMIT) { \
SQ_COUNT++; \
X \
} \
} while (0)
static
int
verbose
=
0
;
int
main
(
int
argc
,
char
**
argv
)
{
int
rank
,
nranks
,
rank_world
,
nranks_world
;
int
i
,
j
,
peer
,
bufsize
,
errors
;
...
...
@@ -61,9 +49,6 @@ int main(int argc, char **argv) {
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
src_buf
);
MPI_Alloc_mem
(
bufsize
,
MPI_INFO_NULL
,
&
dst_buf
);
if
(
rank
==
0
)
if
(
verbose
)
printf
(
"MPI RMA Strided Accumulate Test (shared memory window):
\n
"
);
MPI_Win_allocate_shared
(
bufsize
,
1
,
MPI_INFO_NULL
,
shr_comm
,
&
win_buf
,
&
buf_win
);
MPI_Win_fence
(
0
,
buf_win
);
...
...
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