jupiter test
This commit is contained in:
parent
804c6be5a2
commit
7ae92ef98b
13 changed files with 2170 additions and 0 deletions
7
jupiter/Makefile
Normal file
7
jupiter/Makefile
Normal file
|
@ -0,0 +1,7 @@
|
|||
all: reduce
|
||||
|
||||
reduce: hpc_mpi.c binom_reduce.c fib_reduce.c bin_reduce.c
|
||||
mpicc -Wall -Wextra -O3 -o reduce bin_reduce.c fib_reduce.c binom_reduce.c hpc_mpi.c
|
||||
|
||||
clean:
|
||||
rm reduce
|
86
jupiter/bin_reduce.c
Normal file
86
jupiter/bin_reduce.c
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* bin_reduce.c
|
||||
*
|
||||
* Created on: 16 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <mpi.h>
|
||||
#include "bin_reduce.h"
|
||||
|
||||
int int_log2(int x) {
|
||||
int r=0;
|
||||
while (x >>= 1) {
|
||||
r++;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
int Bin_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) {
|
||||
if (root != 0) {
|
||||
fprintf(stderr, "Sorry, root!=0 not allowed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int r, p, size;
|
||||
MPI_Status status;
|
||||
|
||||
MPI_Comm_rank(comm, &r);
|
||||
MPI_Comm_size(comm, &p);
|
||||
MPI_Type_size(datatype, &size);
|
||||
|
||||
int tree_depth = int_log2(p) + 1;
|
||||
int i = 0;
|
||||
int depth;
|
||||
int parent = 0;
|
||||
|
||||
// maximum possible number of nodes in a subtree with current depth
|
||||
int max_nodes = ((1 << tree_depth) - 1) / 2;
|
||||
|
||||
void *recv_left;
|
||||
void *recv_right;
|
||||
|
||||
if (r == root) {
|
||||
recv_right = recvbuf;
|
||||
} else {
|
||||
MPI_Alloc_mem(count * size, MPI_INFO_NULL, &recv_right);
|
||||
}
|
||||
|
||||
for (depth = 1; i != r; depth++) {
|
||||
parent = i;
|
||||
if (r > i + max_nodes) {
|
||||
i += max_nodes + 1;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
max_nodes /= 2;
|
||||
}
|
||||
|
||||
if (depth != tree_depth && r + 1 < p) {
|
||||
MPI_Alloc_mem(count * size, MPI_INFO_NULL, &recv_left);
|
||||
MPI_Recv(recv_left, count, datatype, r + 1, 0, comm, &status);
|
||||
MPI_Reduce_local(sendbuf, recv_left, count, datatype, op);
|
||||
|
||||
if (r + max_nodes + 1 < p) {
|
||||
MPI_Recv(recv_right, count, datatype, r + max_nodes + 1, 0, comm,
|
||||
&status);
|
||||
MPI_Reduce_local(recv_left, recv_right, count, datatype, op);
|
||||
} else {
|
||||
memcpy(recv_right, recv_left, count * size);
|
||||
}
|
||||
|
||||
MPI_Free_mem(recv_left);
|
||||
} else {
|
||||
memcpy(recv_right, sendbuf, count * size);
|
||||
}
|
||||
|
||||
if (r != root) {
|
||||
MPI_Send(recv_right, count, datatype, parent, 0, comm);
|
||||
MPI_Free_mem(recv_right);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
14
jupiter/bin_reduce.h
Normal file
14
jupiter/bin_reduce.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* bin_reduce.h
|
||||
*
|
||||
* Created on: 16 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#ifndef BIN_REDUCE_H_
|
||||
#define BIN_REDUCE_H_
|
||||
|
||||
int Bin_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
|
||||
|
||||
#endif /* BIN_REDUCE_H_ */
|
62
jupiter/binom_reduce.c
Normal file
62
jupiter/binom_reduce.c
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* binom_reduce.c
|
||||
*
|
||||
* Created on: 18 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#include <mpi.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "binom_reduce.h"
|
||||
|
||||
void swap(void **a, void **b) {
|
||||
void *temp;
|
||||
temp = *a;
|
||||
*a = *b;
|
||||
*b = temp;
|
||||
}
|
||||
|
||||
int Binom_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) {
|
||||
|
||||
if (root != 0) {
|
||||
fprintf(stderr, "Sorry, root!=0 not allowed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int r, p, size;
|
||||
MPI_Status status;
|
||||
void *recv;
|
||||
void *reduced;
|
||||
|
||||
MPI_Comm_rank(comm, &r);
|
||||
MPI_Comm_size(comm, &p);
|
||||
MPI_Type_size(datatype, &size);
|
||||
|
||||
MPI_Alloc_mem(count * size, MPI_INFO_NULL, &recv);
|
||||
MPI_Alloc_mem(count * size, MPI_INFO_NULL, &reduced);
|
||||
|
||||
memcpy(reduced, sendbuf, count * size);
|
||||
|
||||
int i = 1;
|
||||
while ((r + i) % (2 * i) != 0 && i < p) {
|
||||
if (r + i < p) {
|
||||
MPI_Recv(recv, count, datatype, r + i, i, comm, &status);
|
||||
MPI_Reduce_local(reduced, recv, count, datatype, op);
|
||||
swap(&reduced, &recv);
|
||||
}
|
||||
i <<= 1;
|
||||
}
|
||||
|
||||
if (r != root) {
|
||||
MPI_Send(reduced, count, datatype, r - i, i, comm);
|
||||
} else {
|
||||
memcpy(recvbuf, reduced, count * size);
|
||||
}
|
||||
|
||||
MPI_Free_mem(reduced);
|
||||
MPI_Free_mem(recv);
|
||||
|
||||
return 0;
|
||||
}
|
14
jupiter/binom_reduce.h
Normal file
14
jupiter/binom_reduce.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* binom_reduce.h
|
||||
*
|
||||
* Created on: 18 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#ifndef BINOM_REDUCE_H_
|
||||
#define BINOM_REDUCE_H_
|
||||
|
||||
int Binom_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
|
||||
|
||||
#endif /* BINOM_REDUCE_H_ */
|
86
jupiter/fib_reduce.c
Normal file
86
jupiter/fib_reduce.c
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* fib_reduce.c
|
||||
*
|
||||
* Created on: 18 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <mpi.h>
|
||||
#include "fib_reduce.h"
|
||||
|
||||
int Fib_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) {
|
||||
if (root != 0) {
|
||||
fprintf(stderr, "Sorry, root!=0 not allowed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int r, p, size;
|
||||
MPI_Status status;
|
||||
void *recv_right;
|
||||
|
||||
MPI_Comm_rank(comm, &r);
|
||||
MPI_Comm_size(comm, &p);
|
||||
MPI_Type_size(datatype, &size);
|
||||
|
||||
int temp;
|
||||
int right = 1;
|
||||
int fib = 1;
|
||||
|
||||
while (fib - 1 < p) {
|
||||
temp = fib;
|
||||
fib += right;
|
||||
right = temp;
|
||||
}
|
||||
|
||||
int left = fib - right;
|
||||
int i = 0;
|
||||
int parent = 0;
|
||||
|
||||
while (i != r) {
|
||||
parent = i;
|
||||
if (r >= i + left) {
|
||||
i += left;
|
||||
temp = left;
|
||||
left = right - left;
|
||||
right = temp;
|
||||
} else {
|
||||
i++;
|
||||
right -= left;
|
||||
left -= right;
|
||||
}
|
||||
}
|
||||
|
||||
if (r == root) {
|
||||
recv_right = recvbuf;
|
||||
} else {
|
||||
MPI_Alloc_mem(size * count, MPI_INFO_NULL, &recv_right);
|
||||
}
|
||||
|
||||
if (right - 1 > 0 && r + 1 < p) {
|
||||
void *recv_left;
|
||||
MPI_Alloc_mem(count * size, MPI_INFO_NULL, &recv_left);
|
||||
MPI_Recv(recv_left, count, datatype, r + 1, 0, comm, &status);
|
||||
MPI_Reduce_local(sendbuf, recv_left, count, datatype, op);
|
||||
|
||||
if (left - 1 > 0 && r + left < p) {
|
||||
MPI_Recv(recv_right, count, datatype, r + left, 0, comm, &status);
|
||||
MPI_Reduce_local(recv_left, recv_right, count, datatype, op);
|
||||
} else {
|
||||
memcpy(recv_right, recv_left, count * size);
|
||||
}
|
||||
|
||||
MPI_Free_mem(recv_left);
|
||||
} else {
|
||||
memcpy(recv_right, sendbuf, count * size);
|
||||
}
|
||||
|
||||
if (r != root) {
|
||||
MPI_Send(recv_right, count, datatype, parent, 0, comm);
|
||||
MPI_Free_mem(recv_right);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
14
jupiter/fib_reduce.h
Normal file
14
jupiter/fib_reduce.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* fib_reduce.h
|
||||
*
|
||||
* Created on: 18 Jun 2016
|
||||
* Author: johannes
|
||||
*/
|
||||
|
||||
#ifndef FIB_REDUCE_H_
|
||||
#define FIB_REDUCE_H_
|
||||
|
||||
int Fib_Reduce(const void *sendbuf, void *recvbuf, int count,
|
||||
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
|
||||
|
||||
#endif /* FIB_REDUCE_H_ */
|
192
jupiter/hpc_mpi.c
Normal file
192
jupiter/hpc_mpi.c
Normal file
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
============================================================================
|
||||
Name : hpc_mpi.c
|
||||
Author :
|
||||
Version :
|
||||
Copyright : Your copyright notice
|
||||
Description : Hello MPI World in C
|
||||
============================================================================
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <mpi.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "bin_reduce.h"
|
||||
#include "binom_reduce.h"
|
||||
#include "fib_reduce.h"
|
||||
|
||||
void usage(char *progname, int rank) {
|
||||
if (rank == 0) {
|
||||
fprintf(stderr,
|
||||
"USAGE: %s [-b] [-o operation] size\n supported operations:\n 0 MAX\n 1 MIN\n 2 SUM\n 3 PROD\n 4 LAND\n 5 BAND\n 6 LOR\n 7 BOR\n 8 LXOR\n 9 BXOR\n",
|
||||
progname);
|
||||
}
|
||||
MPI_Finalize();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
void fill(int *a, int count, int rank) {
|
||||
srand(time(NULL) + rank);
|
||||
for (int i = 0; i < count; i++) {
|
||||
a[i] = rand();
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int r;
|
||||
int p;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &r);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &p);
|
||||
|
||||
int opt;
|
||||
int benchmark = 0;
|
||||
char oparg = '0';
|
||||
|
||||
while ((opt = getopt(argc, argv, "bo:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'b':
|
||||
benchmark = 1;
|
||||
break;
|
||||
case 'o':
|
||||
oparg = optarg[0];
|
||||
break;
|
||||
default:
|
||||
usage(argv[0], r);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind >= argc) {
|
||||
usage(argv[0], r);
|
||||
}
|
||||
|
||||
int size = atoi(argv[optind]);
|
||||
MPI_Op op;
|
||||
|
||||
switch (oparg) {
|
||||
case '0':
|
||||
op = MPI_MAX;
|
||||
break;
|
||||
case '1':
|
||||
op = MPI_MIN;
|
||||
break;
|
||||
case '2':
|
||||
op = MPI_SUM;
|
||||
break;
|
||||
case '3':
|
||||
op = MPI_PROD;
|
||||
break;
|
||||
case '4':
|
||||
op = MPI_LAND;
|
||||
break;
|
||||
case '5':
|
||||
op = MPI_BAND;
|
||||
break;
|
||||
case '6':
|
||||
op = MPI_LOR;
|
||||
break;
|
||||
case '7':
|
||||
op = MPI_BOR;
|
||||
break;
|
||||
case '8':
|
||||
op = MPI_LXOR;
|
||||
break;
|
||||
default:
|
||||
op = MPI_BXOR;
|
||||
break;
|
||||
}
|
||||
|
||||
int *a;
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &a);
|
||||
fill(a, size, r);
|
||||
|
||||
if (benchmark) {
|
||||
int *red;
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &red);
|
||||
double start, end, global_end;
|
||||
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
start = MPI_Wtime();
|
||||
MPI_Reduce(a, red, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
end = MPI_Wtime();
|
||||
MPI_Reduce(&end, &global_end, 1, MPI_DOUBLE, MPI_MAX, 0,
|
||||
MPI_COMM_WORLD);
|
||||
if (r == 0) {
|
||||
printf("%f, ", global_end - start);
|
||||
}
|
||||
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
start = MPI_Wtime();
|
||||
Fib_Reduce(a, red, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
end = MPI_Wtime();
|
||||
MPI_Reduce(&end, &global_end, 1, MPI_DOUBLE, MPI_MAX, 0,
|
||||
MPI_COMM_WORLD);
|
||||
if (r == 0) {
|
||||
printf("%f, ", global_end - start);
|
||||
}
|
||||
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
start = MPI_Wtime();
|
||||
Bin_Reduce(a, red, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
end = MPI_Wtime();
|
||||
MPI_Reduce(&end, &global_end, 1, MPI_DOUBLE, MPI_MAX, 0,
|
||||
MPI_COMM_WORLD);
|
||||
if (r == 0) {
|
||||
printf("%f, ", global_end - start);
|
||||
}
|
||||
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
start = MPI_Wtime();
|
||||
Binom_Reduce(a, red, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
end = MPI_Wtime();
|
||||
MPI_Reduce(&end, &global_end, 1, MPI_DOUBLE, MPI_MAX, 0,
|
||||
MPI_COMM_WORLD);
|
||||
if (r == 0) {
|
||||
printf("%f\n", global_end - start);
|
||||
}
|
||||
|
||||
MPI_Free_mem(red);
|
||||
} else {
|
||||
int *red;
|
||||
int *rfib;
|
||||
int *rbin;
|
||||
int *rbinom;
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &red);
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &rfib);
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &rbin);
|
||||
MPI_Alloc_mem(size * sizeof(int), MPI_INFO_NULL, &rbinom);
|
||||
|
||||
MPI_Reduce(a, red, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
Fib_Reduce(a, rfib, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
Bin_Reduce(a, rbin, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
Binom_Reduce(a, rbinom, size, MPI_INT, op, 0, MPI_COMM_WORLD);
|
||||
|
||||
if (r == 0) {
|
||||
if (memcmp(red, rfib, size * sizeof(int))) {
|
||||
printf("Fib_Reduce does not match\n");
|
||||
}
|
||||
if (memcmp(red, rbin, size * sizeof(int))) {
|
||||
printf("Bin_Reduce does not match\n");
|
||||
}
|
||||
if (memcmp(red, rbinom, size * sizeof(int))) {
|
||||
printf("Binom_Reduce does not match\n");
|
||||
}
|
||||
|
||||
printf("All checks done\n");
|
||||
}
|
||||
|
||||
MPI_Free_mem(red);
|
||||
MPI_Free_mem(rfib);
|
||||
MPI_Free_mem(rbin);
|
||||
MPI_Free_mem(rbinom);
|
||||
}
|
||||
|
||||
MPI_Free_mem(a);
|
||||
|
||||
MPI_Finalize();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
BIN
jupiter/reduce
Executable file
BIN
jupiter/reduce
Executable file
Binary file not shown.
1081
jupiter/report/nodes
Normal file
1081
jupiter/report/nodes
Normal file
File diff suppressed because it is too large
Load diff
351
jupiter/report/report.tex
Executable file
351
jupiter/report/report.tex
Executable file
|
@ -0,0 +1,351 @@
|
|||
\documentclass[a4paper, DIV=12]{scrartcl}
|
||||
\usepackage[english]{babel}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[dvipsnames]{xcolor}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{stmaryrd}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{pdflscape}
|
||||
\usepackage{listingsutf8}
|
||||
\usepackage{spverbatim}
|
||||
\usepackage{placeins}
|
||||
\usepackage{lmodern}
|
||||
%\usepackage{helvet}
|
||||
\usepackage{booktabs}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{microtype}
|
||||
\usepackage{framed}
|
||||
\usepackage[colorlinks=true,
|
||||
linkcolor=blue,
|
||||
urlcolor=blue,
|
||||
breaklinks=true,
|
||||
citecolor=blue]{hyperref}
|
||||
\usepackage{prettyref}
|
||||
\usepackage{lastpage}
|
||||
\usepackage{subcaption}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{adjustbox}
|
||||
\usepackage{pdfpages}
|
||||
\usepackage{xspace}
|
||||
\usepackage[inline]{enumitem}
|
||||
\usepackage[abbreviate=false,maxbibnames=99,backend=biber]{biblatex}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{tikz}
|
||||
\usepackage[ruled,linesnumbered]{algorithm2e}
|
||||
|
||||
\setkomafont{disposition}{\normalfont\bfseries}
|
||||
|
||||
\setlist[itemize]{itemsep=0.1em}
|
||||
\setlist[enumerate]{itemsep=0.1em}
|
||||
|
||||
|
||||
\newrefformat{tbl}{\hyperref[#1]{Table~\ref*{#1}}}
|
||||
\newrefformat{fig}{\hyperref[#1]{Figure~\ref*{#1}}}
|
||||
\newrefformat{lst}{\hyperref[#1]{Listing~\ref*{#1}}}
|
||||
\newrefformat{equ}{\hyperref[#1]{Equation~\ref*{#1}}}
|
||||
\newrefformat{sec}{\hyperref[#1]{Section~\ref*{#1}}}
|
||||
\newrefformat{alg}{\hyperref[#1]{Algorithm~\ref*{#1}}}
|
||||
\renewcommand{\arraystretch}{1.2}
|
||||
|
||||
\newcommand\bigforall{\mbox{\Large $\mathsurround0pt\forall$}}
|
||||
\everymath{\displaystyle}
|
||||
|
||||
\lstset{ %
|
||||
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or
|
||||
basicstyle=\ttfamily, % the size of the fonts that are used for the code
|
||||
breakatwhitespace=true, % sets if automatic breaks should only happen at whitespace
|
||||
breaklines=true, % sets automatic line breaking
|
||||
captionpos=b, % sets the caption-position to bottom
|
||||
escapeinside={(*}{*)}, % if you want to add LaTeX within your code
|
||||
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
|
||||
frame=single, % adds a frame around the code
|
||||
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
|
||||
language=TeX, % the language of the code
|
||||
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
|
||||
numbersep=5pt, % how far the line-numbers are from the code
|
||||
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
|
||||
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
|
||||
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
|
||||
showstringspaces=false, % underline spaces within strings only
|
||||
showtabs=false, % show tabs within strings adding particular underscores
|
||||
stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
|
||||
tabsize=2, % sets default tabsize to 2 spaces
|
||||
title=\lstname, % show the filename of files included with \lstinputlisting; also try caption instead of title
|
||||
emph=[3]{int:,array,set,of,int,if,then,else,constraint,var,union,endif,function,where,in,div,predicate,let,opt,full,format,def,for,True,False,return,or},
|
||||
emphstyle=[3]\color{ForestGreen},
|
||||
emph=[2]{length,max,forall,startEmptyBuffer,fix,startEmptyBufferShow,exactly,cumulative,occurs,deopt,sum,,all},
|
||||
emphstyle=[2]\color{blue},
|
||||
commentstyle=\color{BrickRed},
|
||||
stringstyle =\color{red},
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\subject{High Performance Computing}
|
||||
\title{Reduction trees for MPI Reductions}
|
||||
\subtitle{Project 2}
|
||||
|
||||
\author{Johannes Winklehner\\1226104 \and Armin Friedl\\1053597}
|
||||
\date{\today}
|
||||
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\newpage
|
||||
|
||||
\section{Problem Description}
|
||||
\label{sec:description}
|
||||
|
||||
The purpose of this project is to compare different implementations of the collective communication call MPI\_Reduce.
|
||||
The compared implementations should all use different forms of Tree Reduction algorithms.
|
||||
As a baseline for the comparison serves a given implementation of the MPI standard, which is in our case NEC MPI.
|
||||
\begin{description}
|
||||
\item[Binomial Tree]
|
||||
A binomial tree has a non-fixed degree where each tree $B_i$ has exactly $i$ subtrees of size $B_0$ to $B_{i-1}$.
|
||||
The number of nodes in such a tree is equal to $2^i$ and the depth is $i$.
|
||||
\item[Fibonacci Tree]
|
||||
The Fibonacci tree uses a fixed degree of $2$ where a tree of size $F_i$ has one subtree of size $T_{i-1}$ and one of $T_{i-2}$.
|
||||
Therefore the number of nodes in this kind of tree is $fib(i+3)-1$ using the Fibonacci function $fib(x) = fib(x-1)+fib(x-2)$ and its depth is as well $i$.
|
||||
\item[Binary Tree]
|
||||
The binary tree used for reduction is a common complete binary tree where a tree $T_i$ has two subtrees $T_{i-1}$.
|
||||
Such a tree has $2^{i+1}-1$ nodes and its depth is as for the other types $i$.
|
||||
\end{description}
|
||||
|
||||
\begin{center}
|
||||
\begin{minipage}{.4\textwidth}
|
||||
\begin{tikzpicture}
|
||||
\node [circle,draw]{$B_i$}
|
||||
child { node [circle,draw]{$B_{i-1}$}}
|
||||
child {node [circle,draw] {$B_{i-2}$}}
|
||||
child {node {\dots} edge from parent[draw=none]}
|
||||
child {node [circle,draw] {$B_0$}};
|
||||
\end{tikzpicture}
|
||||
%\caption{Binomial Tree of size $i$}
|
||||
\end{minipage}
|
||||
\begin{minipage}{.2\textwidth}
|
||||
\begin{tikzpicture}
|
||||
\node [circle,draw]{$F_i$}
|
||||
child { node [circle,draw]{$F_{i-1}$}}
|
||||
child {node [circle,draw] {$F_{i-2}$}};
|
||||
\end{tikzpicture}
|
||||
%\caption{Fibonacci Tree of size $i$}
|
||||
\end{minipage}
|
||||
\begin{minipage}{.2\textwidth}
|
||||
\begin{tikzpicture}
|
||||
\node [circle,draw]{$T_i$}
|
||||
child { node [circle,draw]{$T_{i-1}$}}
|
||||
child {node [circle,draw] {$T_{i-2}$}};
|
||||
\end{tikzpicture}
|
||||
%\caption{Complete Binary Tree of size $i$}
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
|
||||
All three implementations of the reduce function must use exactly the same interface as the MPI standard defines it.
|
||||
This interface is shown in \prettyref{lst:reduce}.
|
||||
This requires that all implementations support any arbitrary MPI datatype as well as operations.
|
||||
The standard also provides some constraints regarding the associativity and commutativity of executable operations.
|
||||
Every MPI operation must be associative, but does not necessarily have to be commutative.
|
||||
This means that all results of the operation must be computed in the MPI rank order of all processes.
|
||||
|
||||
\begin{lstlisting}[language=C, caption=MPI Reduce interface, label=lst:reduce]
|
||||
int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
|
||||
\end{lstlisting}
|
||||
|
||||
The standard also defines additional features of the reduce function, for example an in place operator for the root process.
|
||||
However since those details where not mentioned in the assignment description, we did not consider them as part of the project.
|
||||
|
||||
The basic algorithm for a tree reduction, which will be shown in the next section, is very similar for all kinds of trees and uses Point-to-Point communication between tree nodes.
|
||||
The assumption for our implementations to be efficient is that the underlying communication network is fully connected and allows for bidirectional communication.
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Implemented Algorithms}
|
||||
\label{sec:algorithms}
|
||||
|
||||
The basic algorithm for a tree reduction is very simple and is shown in \prettyref{alg:reduce}.
|
||||
At first the parent and all child nodes have to be determined to know the communication partners of each process.
|
||||
Then each process receives the partial results from all of its children and calculates its own result from the received data.
|
||||
To ensure the correctness of the result for non commutative operations the iteration of child nodes has to be done in rank order.
|
||||
Processes which are leaf nodes in the tree have no children and therefore skip the receiving part of the algorithm.
|
||||
If a process has a parent and is therefore not the root process, it sends its result to the determined parent node.
|
||||
However if the process is the root process the reduction is finished and can be returned.
|
||||
|
||||
\begin{algorithm}
|
||||
\caption{Tree Reduce}
|
||||
\label{alg:reduce}
|
||||
\KwIn{An array $\vec{a}$ of a given $datatype$ with size $count$ for each process}
|
||||
\KwOut{The result of the reduction on the $root$ process}
|
||||
determine $parent$ and $children$\;
|
||||
$result = \vec{a}$\;
|
||||
\ForAll{child in children}{
|
||||
receive $result$ from $child$\;
|
||||
$result =$ local reduce of received array and $result$\;
|
||||
}
|
||||
\eIf{parent exists}{
|
||||
send $result$ to $parent$\;
|
||||
}{
|
||||
$output = result$\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
The calculation of the parent and child nodes is the only aspect which has to be changed for all possible kinds of trees.
|
||||
However there are of course certain optimizations possible where some knowledge about the structure of the tree can be used.
|
||||
Such implementation details will be shown in the following part.
|
||||
The code for all our implementations can be found in the Appendix in \prettyref{sec:appendix}.
|
||||
|
||||
\subsection{Binomial Tree Reduce}
|
||||
|
||||
The first of the three implementations we completed was the binomial tree reduction.
|
||||
Since there were already some examples and explanations on how reductions and broadcasts work on binomial trees presented during the lectures, this was probably the most straight forward part of the project.
|
||||
When looking at some trees of different sizes we quickly noticed, that the position of each node is static and the tree only grows in one direction.
|
||||
This fact can be used in a sense that the children do not have to be precomputed but instead can be calculated during the loop before the corresponding receive operation.
|
||||
A comparison between a $B_2$ and a $B_3$ tree is shown in \prettyref{fig:binomtrees}.
|
||||
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\begin{scope}
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}}
|
||||
child {node [circle,draw] {$2$}
|
||||
child {node [circle,draw] {$3$}}};
|
||||
\end{scope}
|
||||
\begin{scope}[shift={(5,0)}]
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}}
|
||||
child {node [circle,draw] {$2$}
|
||||
child {node [circle,draw] {$3$}}}
|
||||
child {node [circle,draw] {$4$}
|
||||
child {node [circle,draw] {$5$}}
|
||||
child {node [circle,draw] {$6$}
|
||||
child {node [circle,draw] {$7$}}}};
|
||||
\end{scope}
|
||||
\end{tikzpicture}
|
||||
\caption{Comparison between a $B_2$ and a $B_3$}
|
||||
\label{fig:binomtrees}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
|
||||
From some of those trees we then determined that for the node with rank $r$ the child in each iteration is $r+i$ where $i=1$ at the start and is multiplied by $2$ after each iteration.
|
||||
Before each iteration there is an additional condition, which checks if the node has any children left or if it should send the result.
|
||||
|
||||
\subsection{Fibonacci Tree Reduce}
|
||||
|
||||
The core difference of a Fibonacci tree compared to a binomial tree is the fixed degree of $2$.
|
||||
To guarantee the correct order of the computed operation the position of a node inside the tree is not only dependent on the rank of the process, but also on the total size of the tree.
|
||||
This is due to the fact that all ranks in one subtree must be lower than the ranks in the second subtree.
|
||||
Therefore the position of a node with a certain rank changes depending on the tree size.
|
||||
This can be seen in the comparison of the trees $F_2$ and $F_3$ in \prettyref{fig:fibtrees}.
|
||||
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\begin{scope}
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}}
|
||||
child {node [circle,draw] {$2$}
|
||||
child {node [circle,draw] {$3$}}};
|
||||
\end{scope}
|
||||
\begin{scope}[shift={(5,0)}]
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}
|
||||
child { node [circle,draw]{$2$}}}
|
||||
child {node [circle,draw] {$3$}
|
||||
child {node [circle,draw] {$4$}}
|
||||
child {node [circle,draw] {$5$}
|
||||
child {node [circle,draw] {$6$}}}};
|
||||
\end{scope}
|
||||
\end{tikzpicture}
|
||||
\caption{Comparison between a $F_2$ and a $F_3$}
|
||||
\label{fig:fibtrees}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
|
||||
During the receiving step of the algorithm we do not need a loop any more, since there are always two or less children for each node.
|
||||
On the other hand the calculation of the children now has to be done in a loop.
|
||||
As a first step we have to determine the size of the tree which can contain all processes.
|
||||
This can be done by searching the Fibonacci numbers for the first value which is greater than the number of processes.
|
||||
Since we know the size of both subtrees using the Fibonacci numbers we can determine whether a node is supposed to be in the left or right subtree.
|
||||
When doing this recursively the position of a node and its children can be calculated.
|
||||
The runtime of this part depends on the size of the tree and is therefore bound by the Fibonacci numbers.
|
||||
|
||||
Now that all communication partners have been determined each process has to execute at most two receives and afterwards one send command.
|
||||
Noticeable when comparing this technique to the biomial tree is that there is already one less node in a tree $F_3$ than in the $B_3$.
|
||||
This means that the binomial tree can handle more processes in the same number of rounds.
|
||||
|
||||
\subsection{Binary Tree Reduce}
|
||||
|
||||
The reduction using a binary tree can be implemented in a very similar way like the Fibonacci tree since the degree is also two.
|
||||
The key difference is of course the structure of the trees and therefore the calculation of the children.
|
||||
Again the position of certain nodes changes depending on the size of the tree since the lower ranks must be in the left subtree and the higher ones in the right subtree.
|
||||
The structure of such trees can be shown rather nice because they are simply complete binary trees.
|
||||
There is again a comparison between a tree $T_2$ and $T_3$ which is shown in \prettyref{fig:bintrees}.
|
||||
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\begin{scope}
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}
|
||||
child { node [circle,draw]{$2$}}
|
||||
child { node [circle,draw]{$3$}}}
|
||||
child { node [circle,draw]{$4$}
|
||||
child { node [circle,draw]{$5$}}
|
||||
child { node [circle,draw]{$6$}}};
|
||||
\end{scope}
|
||||
\begin{scope}[shift={(5,0)}]
|
||||
\node [circle,draw]{$0$}
|
||||
child { node [circle,draw]{$1$}
|
||||
child { node [circle,draw]{$2$}
|
||||
child { node [circle,draw]{$3$}}
|
||||
child { node [circle,draw]{$4$}}}
|
||||
child { node [circle,draw]{$5$}
|
||||
child { node [circle,draw]{$6$}}
|
||||
child { node [circle,draw]{$7$}}}}
|
||||
child { node [circle,draw]{$8$}
|
||||
child { node [circle,draw]{$9$}
|
||||
child { node [circle,draw]{$10$}}
|
||||
child { node [circle,draw]{$11$}}}
|
||||
child { node [circle,draw]{$12$}
|
||||
child { node [circle,draw]{$13$}}
|
||||
child { node [circle,draw]{$14$}}}};
|
||||
\end{scope}
|
||||
\end{tikzpicture}
|
||||
\caption{Comparison between a $T_2$ and a $T_3$}
|
||||
\label{fig:bintrees}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
|
||||
The tree size as well as the computation of the child nodes can be done using a logarithmic function on the number of processes.
|
||||
The rest works in exactly the same way as the previously explained algorithms.
|
||||
When structuring the tree like this the drawback is that in each round a node receives data from both children.
|
||||
As a result the number of rounds for this algorithm is the size of the tree plus an additional round.
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Results}
|
||||
\label{sec:results}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Analysis}
|
||||
\label{sec:analysis}
|
||||
|
||||
\section{Appendix}
|
||||
\label{sec:appendix}
|
||||
|
||||
\lstinputlisting[language=C]{../binom_reduce.c}
|
||||
|
||||
\lstinputlisting[language=C]{../fib_reduce.c}
|
||||
|
||||
\lstinputlisting[language=C]{../bin_reduce.c}
|
||||
|
||||
\end{document}
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: t
|
||||
%%% End:
|
251
reduce/jupiter_log
Normal file
251
reduce/jupiter_log
Normal file
|
@ -0,0 +1,251 @@
|
|||
#######
|
||||
4 Nodes (war noch vom laptop so eingestellt)
|
||||
(128 weiter unten)
|
||||
######
|
||||
|
||||
0.000079, 0.000320, 0.000295, 0.000378
|
||||
0.000074, 0.000273, 0.000273, 0.000369
|
||||
0.000081, 0.000263, 0.000281, 0.000382
|
||||
0.000085, 0.000307, 0.000292, 0.000376
|
||||
0.000056, 0.000285, 0.000298, 0.000386
|
||||
0.000073, 0.000272, 0.000261, 0.000382
|
||||
0.000100, 0.000296, 0.000275, 0.000374
|
||||
0.000083, 0.000277, 0.000286, 0.000359
|
||||
0.000089, 0.000277, 0.000292, 0.000350
|
||||
0.000074, 0.000284, 0.000295, 0.000403
|
||||
0.000037, 0.000307, 0.000289, 0.000363
|
||||
0.000037, 0.000307, 0.000289, 0.000372
|
||||
0.000094, 0.000278, 0.000297, 0.000366
|
||||
0.000072, 0.000276, 0.000294, 0.000370
|
||||
0.000092, 0.000306, 0.000289, 0.000371
|
||||
0.000102, 0.000297, 0.000298, 0.000337
|
||||
0.000081, 0.000290, 0.000270, 0.000370
|
||||
0.000093, 0.000271, 0.000227, 0.000368
|
||||
0.000032, 0.000284, 0.000295, 0.000381
|
||||
0.000083, 0.000267, 0.000300, 0.000363
|
||||
0.000080, 0.000301, 0.000284, 0.000357
|
||||
0.000077, 0.000300, 0.000281, 0.000361
|
||||
0.000078, 0.000273, 0.000280, 0.000378
|
||||
0.000094, 0.000291, 0.000291, 0.000374
|
||||
0.000086, 0.000296, 0.000279, 0.000370
|
||||
0.000075, 0.000302, 0.000286, 0.000374
|
||||
0.000096, 0.000280, 0.000278, 0.000368
|
||||
0.000091, 0.000278, 0.000280, 0.000385
|
||||
0.000079, 0.000300, 0.000267, 0.000372
|
||||
0.000093, 0.000324, 0.000289, 0.000386
|
||||
0.000064, 0.000303, 0.000295, 0.000361
|
||||
0.000067, 0.000293, 0.000277, 0.000369
|
||||
0.000061, 0.000280, 0.000309, 0.000388
|
||||
0.000060, 0.000282, 0.000275, 0.000387
|
||||
0.000074, 0.000292, 0.000295, 0.000366
|
||||
0.000055, 0.000310, 0.000310, 0.000395
|
||||
0.000064, 0.000286, 0.000274, 0.000387
|
||||
0.000070, 0.000343, 0.000298, 0.000371
|
||||
0.000059, 0.000327, 0.000296, 0.000355
|
||||
0.000066, 0.000309, 0.000313, 0.000371
|
||||
0.000061, 0.000325, 0.000301, 0.000363
|
||||
0.000054, 0.000296, 0.000312, 0.000353
|
||||
0.000068, 0.000311, 0.000292, 0.000334
|
||||
0.000055, 0.000313, 0.000312, 0.000395
|
||||
0.000073, 0.000293, 0.000316, 0.000385
|
||||
0.000049, 0.000297, 0.000334, 0.000327
|
||||
0.000113, 0.000330, 0.000309, 0.000369
|
||||
0.000086, 0.000317, 0.000334, 0.000364
|
||||
0.000121, 0.000317, 0.000285, 0.000386
|
||||
0.000065, 0.000316, 0.000281, 0.000391
|
||||
0.000078, 0.000330, 0.000307, 0.000386
|
||||
0.000089, 0.000321, 0.000295, 0.000398
|
||||
0.000078, 0.000288, 0.000266, 0.000379
|
||||
0.000067, 0.000321, 0.000310, 0.000384
|
||||
0.000051, 0.000315, 0.000313, 0.000392
|
||||
0.000059, 0.000270, 0.000306, 0.000353
|
||||
0.000061, 0.000277, 0.000324, 0.000351
|
||||
0.000059, 0.000292, 0.000278, 0.000379
|
||||
0.000066, 0.000290, 0.000308, 0.000369
|
||||
0.000068, 0.000319, 0.000306, 0.000369
|
||||
0.000079, 0.000342, 0.000299, 0.000362
|
||||
0.000086, 0.000290, 0.000306, 0.000329
|
||||
0.000074, 0.000326, 0.000320, 0.000358
|
||||
0.000086, 0.000324, 0.000276, 0.000369
|
||||
0.000086, 0.000287, 0.000316, 0.000381
|
||||
0.000078, 0.000289, 0.000309, 0.000375
|
||||
0.000086, 0.000279, 0.000308, 0.000399
|
||||
0.000073, 0.000284, 0.000319, 0.000381
|
||||
0.000085, 0.000289, 0.000320, 0.000355
|
||||
0.000089, 0.000284, 0.000289, 0.000352
|
||||
0.000080, 0.000310, 0.000293, 0.000372
|
||||
0.000077, 0.000309, 0.000321, 0.000355
|
||||
0.000082, 0.000312, 0.000327, 0.000344
|
||||
0.000079, 0.000308, 0.000318, 0.000349
|
||||
0.000085, 0.000276, 0.000303, 0.000366
|
||||
0.000086, 0.000281, 0.000301, 0.000369
|
||||
0.000084, 0.000324, 0.000317, 0.000344
|
||||
0.000078, 0.000323, 0.000324, 0.000360
|
||||
0.000079, 0.000317, 0.000307, 0.000351
|
||||
0.000086, 0.000324, 0.000292, 0.000335
|
||||
0.000092, 0.000282, 0.000323, 0.000352
|
||||
0.000093, 0.000284, 0.000305, 0.000357
|
||||
0.000069, 0.000282, 0.000291, 0.000361
|
||||
0.000065, 0.000283, 0.000348, 0.000362
|
||||
0.000082, 0.000283, 0.000332, 0.000359
|
||||
0.000075, 0.000282, 0.000308, 0.000363
|
||||
0.000080, 0.000285, 0.000324, 0.000395
|
||||
0.000079, 0.000278, 0.000324, 0.000369
|
||||
0.000092, 0.000285, 0.000280, 0.000389
|
||||
0.000072, 0.000291, 0.000295, 0.000344
|
||||
0.000289, 0.000488, 0.000435, 0.000500
|
||||
0.000274, 0.000498, 0.000459, 0.000476
|
||||
0.000293, 0.000493, 0.000444, 0.000472
|
||||
0.000286, 0.000487, 0.000464, 0.000443
|
||||
0.000286, 0.000495, 0.000443, 0.000460
|
||||
0.000288, 0.000490, 0.000434, 0.000477
|
||||
0.000281, 0.000494, 0.000445, 0.000488
|
||||
0.000287, 0.000497, 0.000441, 0.000454
|
||||
0.000283, 0.000493, 0.000446, 0.000493
|
||||
0.000280, 0.000497, 0.000456, 0.000467
|
||||
0.000268, 0.000496, 0.000460, 0.000497
|
||||
0.000296, 0.000493, 0.000437, 0.000488
|
||||
0.000288, 0.000500, 0.000434, 0.000474
|
||||
0.000274, 0.000495, 0.000452, 0.000494
|
||||
0.000287, 0.000513, 0.000445, 0.000458
|
||||
0.000276, 0.000507, 0.000455, 0.000462
|
||||
0.000266, 0.000523, 0.000444, 0.000481
|
||||
0.000289, 0.000498, 0.000450, 0.000452
|
||||
0.000280, 0.000500, 0.000444, 0.000477
|
||||
0.000291, 0.000496, 0.000448, 0.000490
|
||||
0.000268, 0.000490, 0.000463, 0.000491
|
||||
0.000275, 0.000502, 0.000461, 0.000429
|
||||
0.000287, 0.000506, 0.000459, 0.000470
|
||||
0.000290, 0.000470, 0.000433, 0.000491
|
||||
0.000282, 0.000505, 0.000456, 0.000486
|
||||
0.000286, 0.000499, 0.000443, 0.000446
|
||||
0.000286, 0.000505, 0.000425, 0.000480
|
||||
0.000287, 0.000493, 0.000435, 0.000489
|
||||
0.000296, 0.000497, 0.000436, 0.000482
|
||||
0.000283, 0.000502, 0.000437, 0.000481
|
||||
|
||||
|
||||
###############
|
||||
128 Nodes
|
||||
##############
|
||||
|
||||
0.001423, 0.010527, 0.011216, 0.007915
|
||||
0.001583, 0.010761, 0.007790, 0.007523
|
||||
0.005105, 0.010514, 0.010397, 0.008525
|
||||
0.001912, 0.010999, 0.009773, 0.008951
|
||||
0.001417, 0.011615, 0.007892, 0.007056
|
||||
0.002139, 0.011192, 0.008403, 0.008883
|
||||
0.001530, 0.011251, 0.010655, 0.007843
|
||||
0.000908, 0.010983, 0.008241, 0.007438
|
||||
0.001443, 0.010820, 0.008684, 0.007246
|
||||
0.001434, 0.011852, 0.007938, 0.014589
|
||||
0.002544, 0.010459, 0.008159, 0.007793
|
||||
0.001190, 0.010157, 0.009110, 0.007532
|
||||
0.001485, 0.010681, 0.009171, 0.016911
|
||||
0.001452, 0.011990, 0.010636, 0.007362
|
||||
0.000635, 0.009944, 0.008845, 0.007214
|
||||
0.002349, 0.011137, 0.008412, 0.007326
|
||||
0.001594, 0.036317, 0.010826, 0.008947
|
||||
0.001511, 0.010940, 0.009171, 0.007273
|
||||
0.001771, 0.012931, 0.008162, 0.007424
|
||||
0.002400, 0.010192, 0.010569, 0.007622
|
||||
0.002252, 0.011366, 0.010217, 0.007527
|
||||
0.002073, 0.010105, 0.009903, 0.007704
|
||||
0.001149, 0.009766, 0.010242, 0.012813
|
||||
0.000692, 0.011484, 0.008555, 0.009047
|
||||
0.001911, 0.009549, 0.009007, 0.013493
|
||||
0.001556, 0.011702, 0.009885, 0.007622
|
||||
0.002667, 0.010914, 0.008396, 0.007473
|
||||
0.001327, 0.033075, 0.008079, 0.007954
|
||||
0.001325, 0.011110, 0.009938, 0.007436
|
||||
0.002329, 0.013789, 0.011313, 0.007457
|
||||
0.002847, 0.012693, 0.010290, 0.007719
|
||||
0.002078, 0.011750, 0.010464, 0.007352
|
||||
0.002651, 0.010754, 0.009233, 0.007812
|
||||
0.001510, 0.011784, 0.012512, 0.007720
|
||||
0.002257, 0.012360, 0.011453, 0.007401
|
||||
0.000999, 0.010785, 0.009869, 0.007446
|
||||
0.001172, 0.010467, 0.009537, 0.008367
|
||||
0.003635, 0.010977, 0.008568, 0.007967
|
||||
0.001927, 0.028448, 0.010648, 0.007833
|
||||
0.001819, 0.011384, 0.011378, 0.008298
|
||||
0.001261, 0.010867, 0.011335, 0.007355
|
||||
0.001770, 0.011615, 0.010273, 0.007152
|
||||
0.000851, 0.011733, 0.008788, 0.007554
|
||||
0.002743, 0.011774, 0.010634, 0.023600
|
||||
0.000726, 0.010587, 0.010193, 0.008776
|
||||
0.003511, 0.011246, 0.009143, 0.008450
|
||||
0.001786, 0.010541, 0.009575, 0.008444
|
||||
0.001841, 0.013403, 0.009916, 0.008117
|
||||
0.002300, 0.012268, 0.008905, 0.007337
|
||||
0.002357, 0.038350, 0.009327, 0.007263
|
||||
0.002450, 0.011415, 0.010024, 0.009226
|
||||
0.002156, 0.009976, 0.009906, 0.007613
|
||||
0.002958, 0.009751, 0.008883, 0.007574
|
||||
0.002630, 0.011010, 0.009578, 0.007373
|
||||
0.002986, 0.010966, 0.010309, 0.007879
|
||||
0.001183, 0.012113, 0.009108, 0.007364
|
||||
0.002107, 0.012717, 0.009929, 0.012675
|
||||
0.004194, 0.011639, 0.010241, 0.007162
|
||||
0.002092, 0.010517, 0.010630, 0.007451
|
||||
0.002423, 0.012716, 0.011221, 0.007786
|
||||
0.002269, 0.011900, 0.009345, 0.007349
|
||||
0.004156, 0.011327, 0.010491, 0.007586
|
||||
0.003442, 0.011944, 0.009757, 0.008357
|
||||
0.002529, 0.011903, 0.008969, 0.007779
|
||||
0.003898, 0.012122, 0.009828, 0.008710
|
||||
0.003049, 0.011043, 0.010476, 0.008408
|
||||
0.003459, 0.011524, 0.010034, 0.007622
|
||||
0.001340, 0.011194, 0.010547, 0.008139
|
||||
0.002932, 0.044099, 0.008790, 0.008521
|
||||
0.002238, 0.013103, 0.011316, 0.007359
|
||||
0.003232, 0.011804, 0.009233, 0.008882
|
||||
0.002309, 0.013058, 0.011676, 0.007837
|
||||
0.002402, 0.012257, 0.008650, 0.008161
|
||||
0.003113, 0.012122, 0.010738, 0.007667
|
||||
0.003227, 0.011315, 0.009671, 0.007762
|
||||
0.001248, 0.012854, 0.008333, 0.007865
|
||||
0.003184, 0.012221, 0.009565, 0.016082
|
||||
0.002652, 0.011411, 0.009768, 0.008202
|
||||
0.003076, 0.011869, 0.009907, 0.018098
|
||||
0.004364, 0.018211, 0.009823, 0.007346
|
||||
0.003833, 0.011617, 0.009764, 0.007497
|
||||
0.003996, 0.012395, 0.009361, 0.008784
|
||||
0.002699, 0.011295, 0.011187, 0.007320
|
||||
0.001496, 0.011816, 0.011889, 0.007976
|
||||
0.003110, 0.010636, 0.010253, 0.007299
|
||||
0.002436, 0.013888, 0.012042, 0.007480
|
||||
0.001381, 0.012875, 0.010993, 0.007982
|
||||
0.007304, 0.011763, 0.009085, 0.008662
|
||||
0.002435, 0.011138, 0.010000, 0.007938
|
||||
0.003047, 0.017045, 0.011815, 0.007368
|
||||
0.007250, 0.020993, 0.016791, 0.019335
|
||||
0.020108, 0.019623, 0.019852, 0.018558
|
||||
0.021048, 0.020917, 0.017506, 0.026342
|
||||
0.010625, 0.020686, 0.017678, 0.019717
|
||||
0.012119, 0.023216, 0.019099, 0.024307
|
||||
0.010711, 0.025056, 0.017727, 0.021506
|
||||
0.019902, 0.021389, 0.018060, 0.019652
|
||||
0.017337, 0.021270, 0.019072, 0.020715
|
||||
0.017063, 0.022475, 0.017213, 0.019892
|
||||
0.010866, 0.023339, 0.017099, 0.016779
|
||||
0.014018, 0.021322, 0.017725, 0.020691
|
||||
0.017098, 0.020692, 0.017857, 0.019307
|
||||
0.011796, 0.022911, 0.018350, 0.019114
|
||||
0.007441, 0.024832, 0.019000, 0.023395
|
||||
0.010426, 0.022471, 0.019743, 0.018615
|
||||
0.004704, 0.020193, 0.020343, 0.019890
|
||||
0.018454, 0.020124, 0.018710, 0.020075
|
||||
0.014124, 0.022323, 0.017434, 0.018036
|
||||
0.014397, 0.020529, 0.017530, 0.017375
|
||||
0.017171, 0.022485, 0.019506, 0.021915
|
||||
0.017853, 0.024796, 0.016510, 0.020963
|
||||
0.016884, 0.020556, 0.016464, 0.021348
|
||||
0.018404, 0.023604, 0.017321, 0.018496
|
||||
0.014773, 0.021855, 0.017078, 0.018384
|
||||
0.007068, 0.025689, 0.017681, 0.021732
|
||||
0.020259, 0.020446, 0.018205, 0.019775
|
||||
0.013275, 0.027091, 0.017392, 0.022117
|
||||
0.018307, 0.024328, 0.017570, 0.022194
|
||||
0.018106, 0.021358, 0.024156, 0.024603
|
||||
0.012186, 0.023272, 0.017615, 0.019082
|
12
reduce/run.sh
Executable file
12
reduce/run.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
NODES=128
|
||||
|
||||
i=10
|
||||
while [ $i -le 10000 ]; do
|
||||
for j in $(seq 1 1 30);
|
||||
do
|
||||
mpirun -np $NODES reduce -b $i
|
||||
done
|
||||
let i*=10
|
||||
done
|
Loading…
Reference in a new issue