MPI MPI MPI.NET C# MPI Version2

Similar documents
WinHPC ppt

目 目 用方 用 用 方

para02-2.dvi

NUMAの構成

±é½¬£²¡§£Í£Ð£É½éÊâ

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p

MPI usage

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

Java updated

: : : TSTank 2

C/C++ FORTRAN FORTRAN MPI MPI MPI UNIX Windows (SIMD Single Instruction Multipule Data) SMP(Symmetric Multi Processor) MPI (thread) OpenMP[5]

スライド 1

Java (7) Lesson = (1) 1 m 3 /s m 2 5 m 2 4 m 2 1 m 3 m 1 m 0.5 m 3 /ms 0.3 m 3 /ms 0.6 m 3 /ms 1 1 3

1.ppt

8 if switch for while do while 2

Excel97関数編

Microsoft PowerPoint _MPI-01.pptx

Microsoft PowerPoint - KHPCSS pptx

Microsoft PowerPoint - 講義:コミュニケータ.pptx

明解Javaによるアルゴリズムとデータ構造

120802_MPI.ppt

CAC

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

untitled

10.00mm 2 A4 0 A4 MS 72pt 25mm MS 25mm MS 2

Java (5) 1 Lesson 3: x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java , 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flow

Microsoft Word - keisankigairon.ch doc


K227 Java 2

Microsoft PowerPoint - 講義:片方向通信.pptx

(Eclipse\202\305\212w\202\324Java2\215\374.pdf)

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B

2

PowerPoint Presentation

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a

Windows Web Windows Windows WinSock

アルゴリズムとデータ構造1

Microsoft PowerPoint - 演習2:MPI初歩.pptx

2

,,,,., C Java,,.,,.,., ,,.,, i

ex01.dvi

016-22_ŒÚ”Ł

<4D F736F F F696E74202D C097F B A E B93C782DD8EE682E890EA97705D>

ALG2012-A.ppt

2 A4 0 A mm 2 MS 72pt 25mm

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =


やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

86

演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 RIKEN AICS HPC Spring School /3/5

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

chap2.ppt

10K pdf

PowerPoint プレゼンテーション

Java演習(2) -- 簡単なプログラム --

r02.dvi

ohp02.dvi

明解Java入門編

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

TOEIC

oop1

デジタル表現論・第6回

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

I java A

とても使いやすい Boost の serialization

Microsoft Word ●MPI性能検証_志田_ _更新__ doc

Microsoft PowerPoint pptx

tkk0408nari

スライド 1

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

PowerPoint プレゼンテーション

ALG2012-C.ppt

Javaセキュアコーディングセミナー東京 第3回 入出力(File, Stream)と例外時の動作 演習解説

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

新・明解Java入門

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

新・明解Javaで学ぶアルゴリズムとデータ構造

untitled

コードのチューニング

ALG ppt


ex01.dvi

2.2 Java C main Java main 2 C 6 C Java 3 C Java ( ) G101Hello.java G101Hello main G101Hello.java /* G101Hello */ class G101Hello { /* main */ public s

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

ファイル操作-バイナリファイル

226

Prog2_9th

untitled

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

(Microsoft PowerPoint - \223\306\217KJAVA\221\346\202R\224\ ppt)

オブジェクト脳のつくり方

明解Javaによるアルゴリズムとデータ構造

RHEA key

演習準備

nakao

DPC-0401

Microsoft PowerPoint ppt

解答上の注意 1 解答は 解答 紙の問題番号に対応した解答欄にマークしなさい 2 選択肢は 問ごとに 意されています 問 1の選択肢は 問 2で使 しません 3 選択肢は量が多いため 探しやすさの観点よりグループ分けされています グループ分けに合わせて解答欄が区切られていますが 横 1 列で問題 1

Transcription:

MPI.NET C# 2 2009 2 27

MPI MPI MPI.NET C# MPI Version2

MPI (Message Passing Interface) MPI MPI Version 1 1994 1 1 1

1 ID MPI MPI_Send MPI_Recv if(rank == 0){ // 0 MPI_Send(); } else if(rank == 1){ // 1 MPI_Recv(); } else if(rank == 2){

MPI Version2 MPI-1 1997 MPI Version2 MPI Version 1 ( ) 2

MPI MPI MPI MPI.NET MPICH MPICH2 LAM/MPI MS-MPI Ver. 2 1 2 1 2.NET C# C, C++, fortran MPI.NET C#

MPI.NET.NET Framework.NET C# API

C# Microsoft.NET java.net (Visual Basic.NET Visual C++)

C# class Helloworld // { public static void Main() // { // System.Console.Write( Hello World\n ); } }

MPI ID

MPI 1. Visual Studio 2. 3. PowerShell MS-DOS

(Send) public void Send<T>(value, dest, tag) value dest tag int if (comm.rank == 0) { string value = Windows ; comm.send(value, 1, 9); }

(Receive) public T Receive<T>(source, tag) source tag int if (comm.rank == 0) { string value = Windows ; comm.send(value, 1, 9); } else if(comm.rank == 1) { string msg = comm.receive<string>(0, 9); } Console.Write(msg);

Tag public T Receive<T>(source, tag) source tag int

1 HelloWorld Visual Studio Hello World Hello World

(1/2) Visual Studio 2008 -> -> ->

(2/2) 3. 4. Message Passing Interface

HelloWorld using System; using MPI; class MPIHello { static void Main(string[] args) { // MPI.Environment ( MPI ) using (new MPI.Environment(ref args)) { Console.WriteLine("Hello World from rank " + Communicator.world.Rank + " (running on " + MPI.Environment.ProcessorName + ")"); } } }

+ 5. -> 6. C:\Documents and Settings\ \My Documents \Visual Studio 2008\Projects\ \ \bin\debug

+ 7-1. MS-DOS > mpiexec -np ( ) 7-2. PowerShell > job submit /scheduler:( ) /numcores:( ) /workdir:( ) /stdout:( ) mpiexec ( )

Hello World from rank (running on )

2 1 1 2 Send Receive ->

Point-to-Point Communication(1/2) HelloWorld 0 1 using System; using MPI; // MPI class PtoPHello { static void Main(string[] args) { // MPI using (new MPI.Environment(ref args)) { } } }

Point-to-Point Communication(2/2) // Intracommunicator comm = Communicator.world; int tag = 9; // if (comm.rank == 0) { comm.send( Hello World, 1, tag); // 1 } else if(comm.rank == 1) { string msg = comm.receive<string>(0, tag); // 0 Console.WriteLine(msg + " from rank " + comm.rank); }

Hello World from rank 1

for(i=0; i<num; i++){ comm.send( Hello World, i, tag); } MPI one-to-all, all-to-one, all-to-all

: one to all public void Broadcast<T>(ref T value, root) 1 ref T value root root

: all to one public T[] Gather<T>(value, root) value root root

: Reduction( ) public T Reduce<T>(value, Operation, root) value Opration root root

3 Broadcast Reduce ->

Collective Communication(1/2) using System; using MPI; // MPI class Collective { // public static int AddInts(int x, int y) { return x + y; } } static void Main(string[] args) { // MPI using (new MPI.Environment(ref args)) { } }

Collective Communication(2/2) Intracommunicator comm = Communicator.world; int msg = 0; if (comm.rank == 0) msg = 5; comm.broadcast(ref msg, 0); // 0 msg msg = comm.rank * msg; // * 5 Console.WriteLine(msg + from rank + comm.rank); // int sum = comm.reduce(msg, AddInts, 0); // 0 int sum2 = comm.reduce(msg, Operation<int>.Add, 0); // 0 int max = comm.reduce(msg, Operation<int>.Max, 0); // 0 int min = comm.reduce(msg, Operation<int>.Min, 0); // 0 if (comm.rank == 0) Console.WriteLine( Sum : + sum + Sum : + sum2 + Max : + max + Min : + min); // Reduce

5

MPI Version 2 MPI.NET

MPI Version 1 I/O 1 MPI_Gather 1

MPI Version 1 I/O 1 2 N I/O

MPI Version 2 I/O open close seek read write MPI

1. MPI_FILE 2. MPI_FILE_open 3. MPI_FILE_set_view 4. MPI_FILE_read/MPI_FILE_write 5. MPI_FILE_close

MPI Version 1 -np MPI Version 2 /

Broadcast

(1/2)

(2/2) N 3 1

MPI C# MPI.NET MPI version2

MPI.NET( ) http://www.osl.iu.edu/research/mpi.net/ MPI-2 Gropp, Lusk, Thakur ( ) 2002 MPI Version 2 http://www.mpi-forum.org/docs/mpi-20-html/mpi2-report.html http://compview.titech.ac.jp/members/endot/ adv-app-hpc/ 7