WinHPC ppt

Similar documents
MPI MPI MPI.NET C# MPI Version2

目 目 用方 用 用 方

NUMAの構成

para02-2.dvi

Microsoft PowerPoint - KHPCSS pptx

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

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

スライド 1

44 6 MPI 4 : #LIB=-lmpich -lm 5 : LIB=-lmpi -lm 7 : mpi1: mpi1.c 8 : $(CC) -o mpi1 mpi1.c $(LIB) 9 : 10 : clean: 11 : -$(DEL) mpi1 make mpi1 1 % mpiru

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

MPI usage

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

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

chap2.ppt

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

演習 II 2 つの講義の演習 奇数回 : 連続系アルゴリズム 部分 偶数回 : 計算量理論 部分 連続系アルゴリズム部分は全 8 回を予定 前半 2 回 高性能計算 後半 6 回 数値計算 4 回以上の課題提出 ( プログラム + 考察レポート ) で単位

1.ppt

Microsoft PowerPoint 並列アルゴリズム04.ppt

ex01.dvi

115 9 MPIBNCpack 9.1 BNCpack 1CPU X = , B =

¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶·

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

コードのチューニング

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


58 7 MPI 7 : main(int argc, char *argv[]) 8 : { 9 : int num_procs, myrank; 10 : double a, b; 11 : int tag = 0; 12 : MPI_Status status; 13 : 1 MPI_Init

86

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

: : : TSTank 2

ex01.dvi

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

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

スライド 1

Java updated

DKA ( 1) 1 n i=1 α i c n 1 = 0 ( 1) 2 n i 1 <i 2 α i1 α i2 c n 2 = 0 ( 1) 3 n i 1 <i 2 <i 3 α i1 α i2 α i3 c n 3 = 0. ( 1) n 1 n i 1 <i 2 < <i

tuat1.dvi

K227 Java 2

情報処理演習 II

XMPによる並列化実装2

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

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

XcalableMP入門

XACC講習会

joho07-1.ppt

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

86 8 MPIBNCpack 15 : int n, myid, numprocs, i; 16 : double pi, start_x, end_x; 17 : double startwtime = 0.0, endwtime; 18 : int namelen; 19 : char pro

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

Microsoft PowerPoint - 演習1:並列化と評価.pptx

untitled

120802_MPI.ppt

:30 12:00 I. I VI II. III. IV. a d V. VI

Microsoft PowerPoint MPI.v...O...~...O.e.L.X.g(...Q..)

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

講義の流れ 並列プログラムの概要 通常のプログラムと並列プログラムの違い 並列プログラム作成手段と並列計算機の構造 OpenMP による並列プログラム作成 処理を複数コアに分割して並列実行する方法 MPI による並列プログラム作成 ( 午後 ) プロセス間通信による並列処理 処理の分割 + データの

スライド 1

課題 S1 解説 C 言語編 中島研吾 東京大学情報基盤センター

01_OpenMP_osx.indd

Microsoft Word - C.....u.K...doc

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

かし, 異なったプロセス間でデータを共有するためには, プロセス間通信や特殊な共有メモリ領域を 利用する必要がある. このためマルチプロセッサマシンの利点を最大に引き出すことができない. こ の問題はマルチスレッドを用いることで解決できる. マルチスレッドとは,1 つのプロセスの中に複 数のスレッド

Microsoft PowerPoint - 講習 _kido.pptx[読み取り専用]

r07.dvi

Microsoft PowerPoint _MPI-01.pptx

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

とても使いやすい Boost の serialization

ohp07.dvi

2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q B

C C UNIX C ( ) 4 1 HTML 1

コードのチューニング

& & a a * * ptr p int a ; int *a ; int a ; int a int *a

2002 avidemux MPEG-4 : : : G99P045-1

1.overview


Microsoft PowerPoint - scls_biogrid_lecture_v2.pptx

Krylov (b) x k+1 := x k + α k p k (c) r k+1 := r k α k Ap k ( := b Ax k+1 ) (d) β k := r k r k 2 2 (e) : r k 2 / r 0 2 < ε R (f) p k+1 :=

( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

ohp03.dvi

スライド 1

r08.dvi

Gfarm/MPI-IOの 概要と使い方

MPI

untitled

main

untitled

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

P06.ppt

ohp08.dvi

8 if switch for while do while 2

10K pdf

1) OOP 2) ( ) 3.2) printf Number3-2.cpp #include <stdio.h> class Number Number(); // ~Number(); // void setnumber(float n); float getnumber();

TOEIC

:30 12:00 I. I VI II. III. IV. a d V. VI

Excel97関数編

超初心者用

oop1

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

(OnePoint) ( URL Web Copyright 2005 Microsoft Corporation. All rights reserved. Microsoft Windows Visual Basic Visual Studio Microsoft Corporation

Transcription:

MPI.NET C# 2 2009 1 20

MPI.NET MPI.NET C#

MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World

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 Message Passing Interface MPI MPI-1 MPI-2 2 MPI.NET MPICH MPICH2 LAM/MPI MS-MPI Ver. 2 1 2 1 2.NET C# C, C++, fortran

MPI 1 1 ID

1 if else

C# Visual Studio 2008 Visual C# 2008 Express Edition.NET.NET Framework 3.5 MPI.NET MPI.NET SDK 1.0 OS Windows HPC Server 2008 HPC Pack 2008 SDK Microsoft Compute Cluster Server 2003 Microsoft Compute Cluster Pack SDK

MPI.NET 1 1 Send Receive ImmediateSend ImmediateReceive Barrier Gather Broadcast Reduce

Send Receive ImmediateSend ImmediateReceive

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);

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

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

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

1 1 (2/2) // Intracommunicator comm = Communicator.world; int tag = 9; // if (comm.rank == 0) { comm.send( HelloWorld, 1, tag); // 1 } else if(comm.rank == 1) { string msg = comm.receive<string>(0, tag); // 0 Console.Write(msg); }

& Shift + F6 -> PowerShell > job submit /scheduler:( ) /numcores:( ) /workdir:( ) mpiexec ( )

C mpich (1/2) #include <stdio.h> #include <string.h> #include <mpi.h> // using MPI int main(int argc, char *argv[]) { char msg[20]; // int rank; // int tag = 9; // new MPI.Environment(ref args) MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank);

C mpich (2/2) if (rank == 0) { sprintf(msg, HelloWorld ); MPI_Send(msg, strlen(msg), MPI_CHAR, 1, tag, MPI_COMM_WORLD); } else if(rank == 1) { MPI_Status status; MPI_Recv(msg, 20, MPI_CHAR, 0, tag, MPI_COMM_WORLD, &status); } } printf( %s\n, msg); MPI_Finalize(); return 0;

MPI.NET mpich MPI.NET comm.send(value, dest, tag) 3 4 mpich MPI_Send(void *msg, int count, MPI_Datatype datatype, int dest, int tag, MPI_COMM comm) msg count MPI_Datatype dest tag comm 6

for(i=0; i<num; i++){ comm.send( HelloWorld, 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

(1/3) -1 1 = 4

(2/3) 1. 2. 0 Reduce 3. 0 Reduce 4. 0 http://www.osl.iu.edu/research/mpi.net/

(3/3) Random random = new Random(comm.Rank); // int num = 10000; // int count = 0; // for (int i = 0; i < num; ++i) { double x = (random.nextdouble() - 0.5) * 2; double y = (random.nextdouble() - 0.5) * 2; if (x * x + y * y <= 1.0) ++ count; } int total = comm.reduce(count, Operation<int>.Add, 0); if (comm.rank == 0) Pi = 4*(double) total/(comm.size*(double)num));

C# MPI.NET MPI.NET MPI.NET C#

MPI.NET( ) http://www.osl.iu.edu/research/mpi.net/ MPI.NET http://www.osl.iu.edu/research/mpi.net/document ation/reference/current/index.html