Skip to content
Snippets Groups Projects
Commit 63cd4db9 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Capture progress

parent daddce91
No related branches found
No related tags found
2 merge requests!11Draft: Fast one-sided MPI version,!8Draft: RDMA version with wrapped infinity calls
swiftmpistepsim
swiftmpirdamstepsim
*.o
*~
CFLAGS = -g -O0 -Wall
all: swiftmpistepsim
all: swiftmpistepsim swiftmpirdmastepsim
swiftmpistepsim: swiftmpistepsim.c mpiuse.c mpiuse.h atomic.h cycle.h clocks.h clocks.c
mpicc $(CFLAGS) -o swiftmpistepsim swiftmpistepsim.c mpiuse.c clocks.c
swiftmpirdmastepsim: swiftmpirdmastepsim.c mpiuse.c mpiuse.h atomic.h cycle.h clocks.h clocks.c
mpicc $(CFLAGS) -o swiftmpirdmastepsim swiftmpirdmastepsim.c mpiuse.c clocks.c
clean:
rm -f swiftmpistepsim
rm -f swiftmpirdmastepsim
......@@ -24,10 +24,9 @@ int main(int argc, char *argv[]) {
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 0) {
MPI_Win_create((void *)base, SIZE * sizeof(int), sizeof(int),
MPI_INFO_NULL, MPI_COMM_WORLD, &win);
MPI_Win_create((void *)base, SIZE * sizeof(int), sizeof(int), MPI_INFO_NULL,
MPI_COMM_WORLD, &win);
MPI_Barrier(MPI_COMM_WORLD);
printf("%d: tmp[0,SIZE] = %d,%d base[0,SIZE] = %d,%d\n", rank, tmp[0],
......@@ -67,14 +66,16 @@ int main(int argc, char *argv[]) {
int oldval[1];
newval[0] = DONE;
oldval[0] = DONE;
printf("%d: compare: newval in: %d outval in: %d\n", rank, newval[0], oldval[0]);
printf("%d: compare: newval in: %d outval in: %d\n", rank, newval[0],
oldval[0]);
MPI_Compare_and_swap(&newval[0], &tmp[SIZE], &oldval[0], MPI_INT, 0, SIZE,
win);
// Complete the RMA for this operation locally, so we can continue and
// modify the buffer.
MPI_Win_flush_local(0, win);
printf("%d: compare: newval out: %d oldval out: %d\n", rank, newval[0], oldval[0]);
printf("%d: compare: newval out: %d oldval out: %d\n", rank, newval[0],
oldval[0]);
fflush(stdout);
MPI_Win_unlock(0 /* otherrank */, win);
......
This diff is collapsed.
......@@ -76,7 +76,7 @@ static double log_clocks_cpufreq = 2194844448.0;
static void datacheck_fill(size_t size, void *data) {
unsigned char *p = (unsigned char *)data;
for (size_t i = 0; i < size; i++) {
p[i] = 170; /* 10101010 in bits. */
p[i] = 170; /* 10101010 in bits. */
}
}
......@@ -488,7 +488,8 @@ int main(int argc, char *argv[]) {
message("==================");
if (verbose) {
if (!usetics) message("using fast untimed injections");
if (datacheck) message("checking data pattern on send and recv completion");
if (datacheck)
message("checking data pattern on send and recv completion");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment