Yaminabe fortran

Download Yaminabe fortran

Post on 24-Jul-2015

2.062 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>Fortran / @n_scattering 1</p><p>FORTRAN @n_scattering2012/9/15</p></li><li><p>2</p><p> [Twitter] @n_scattering</p><p> [facebook]http://www.facebook.com/seiichi.tanabetanabu</p><p> () </p><p>2012/9/15Fortran / @n_scattering</p><p>HPC (High-Performance Computing) </p><p>()</p></li><li><p>Agenda3</p><p>1. 2. Fortran3. Fortran4. Fortran</p><p>2012/9/15Fortran / @n_scattering</p><p>4. Fortran5. Fortran6. </p></li><li><p> 3/31(@))</p><p>2012/9/15Fortran / </p><p>@n_scattering4</p></li><li><p>5</p><p> twitter name</p><p>2012/9/15Fortran / @n_scattering</p><p> Fortran ()</p></li><li><p>6</p><p> HPCFortran</p><p>2012/9/15Fortran / @n_scattering</p><p> Fortran</p></li><li><p>7</p><p>2012/9/15Fortran / @n_scattering</p><p> CAE</p><p>L</p><p>m</p></li><li><p>8</p><p>2012/9/15Fortran / @n_scattering</p><p> 3</p><p> Fortran</p></li><li><p>Fortran 1954IBM</p><p> FORTRAN formula translation</p><p>2012/9/15Fortran / </p><p>@n_scattering9</p></li><li><p>Fortran10</p><p> FORTRAN/Fortran</p><p>2012/9/15Fortran / @n_scattering</p><p> () </p></li><li><p>Fortran11</p><p> FORTRAN77 </p><p>2012/9/15Fortran / @n_scattering</p><p> FORMATC</p></li><li><p>Fortran12</p><p> / COMMONBLOCK DATASAVE</p><p>2012/9/15Fortran / @n_scattering</p></li><li><p>Fortran13</p><p> Fortran 90/95</p><p>2012/9/15Fortran / @n_scattering</p><p> ()</p><p>gFortran, g95, Intel Fortran Composer </p></li><li><p>Fortran IBM John Warner Backus, 1924123 - 2007317</p><p>14</p><p> IBM 704 FORTRAN(1954)</p><p>2012/9/15Fortran / @n_scattering</p></li><li><p>Fortran15</p><p> 1957 IBM704FORTRAN 1966 American Standards Association </p><p>(ANSI)FORTRAN66</p><p>2012/9/15Fortran / @n_scattering</p><p> 1978 FORTRAN77</p><p> 1991 Fortran90</p><p> 95, 2003, 2008</p><p>()</p></li><li><p>Fortran16</p><p> FORTRAN77</p><p> Fortran90/95</p><p>2012/9/15Fortran / @n_scattering</p><p> Fortran90/95 /</p></li><li><p>Fortran17</p><p> FORTRAN77Fortran90Fortran780</p><p>2012/9/15Fortran / @n_scattering</p><p>32OK() Do While</p><p> FORTRANFortran</p></li><li><p>Fortran18</p><p> Fortran </p><p>GfortranG95</p><p>Fortran</p><p>2012/9/15Fortran / @n_scattering</p><p>GfortranG95 Intel Fortran Composer ()</p><p> Intel Visual Fortran</p><p> PGI Fortran</p><p> NAG Fortran etc.</p><p>Linux</p></li><li><p>Fortran19</p><p> (linear)() N(doenddo)</p><p>2012/9/15Fortran / @n_scattering</p><p> N(doenddo) If-Then-Else</p><p> () (While) GOTO</p></li><li><p>Fortran20</p><p> r</p><p>Program area</p><p>c</p><p>c area of circle, input r</p><p>implicit none</p><p>REAL*8 pi ,r, a</p><p>c calculate pi</p><p>pi=3.1415926535d0</p><p>2012/9/15Fortran / @n_scattering</p><p> pi=3.1415926535d0c read r from standard input (terminal)</p><p>write(*,*) 'Input Radius'</p><p>read(*,*) r</p><p>c calculate area</p><p>a = pi * r**2</p><p>c write area onto terminal screen</p><p>write (*,10) 'radius r=',r, 'a =',a</p><p>10 Format (a10, e20.10, a5, e22.12)</p><p>Stop 'area'</p><p>End</p></li><li><p>Fortran21</p><p> N</p><p>do i = i1, i2</p><p>2012/9/15Fortran / @n_scattering</p><p>do i = i1, i2</p><p>()end do</p></li><li><p>Fortran22</p><p> Program diff</p><p>Implicit None</p><p>c Declarations</p><p>c h stepsize for approximation, xrange and xstepsize</p><p>c</p><p>2012/9/15Fortran / @n_scattering</p><p>c</p><p>Real*8 f, h, result(3), x, xmin, xmax, xstep</p><p>Open(6, File='diff.dat', Status='Unknown')</p><p>h = 1.e-3</p><p>xmin = 0.0</p><p>xmax = 7.0</p><p>xstep = 0.01</p><p>Do 10 x=xmin, xmax, xstep</p><p>result(1) = (f(x+h) - f(x))/h</p><p>result(2) = (f(x+h/2) - f(x-h/2))/h</p><p>result(3) = (8*(f(x+h/4)-f(x-h/4)) - (f(x+h/2)-f(x-h/2)))/(3*h)</p><p>Write (6, 20) x, result(1), result(2), result(3)</p><p>10 Continue</p></li><li><p>Fortran23</p><p> f(x)(3)</p><p>2012/9/15Fortran / @n_scattering</p><p>10 Format(F5.3, TR4, F10.8, TR4, F10.8, TR4, F10.8) </p><p>Close(6)</p><p>Stop 'data saved in diff.dat'</p><p>End</p><p>c</p><p>c the function we want to integrate</p><p>Function f(x)</p><p>Implicit none</p><p>Real*8 f, x</p><p>f = cos(x)</p><p>Return</p><p>End</p></li><li><p>Fortran24</p><p> result(1) = (f(x+h) - f(x))/h</p><p> result(2) = (f(x+h/2) - f(x-h/2))/h</p><p>2012/9/15Fortran / @n_scattering</p><p> result(3) = (8*(f(x+h/4)-f(x-h/4)) -</p><p>(f(x+h/2)-f(x-h/2)))/(3*h)</p></li><li><p>Fortran25</p><p> If-Then-Else</p><p>if (1) then(1)</p><p>elseif (2) then</p><p>2012/9/15Fortran / @n_scattering</p><p>elseif (2) then(2)</p><p>else</p><p>(3)endif</p></li><li><p>Fortran26</p><p> Fizz-Buzz</p><p>Program fizzbuzz</p><p>C</p><p>implicit none</p><p>integer i,fb</p><p>do i=1,30</p><p>fb=0</p><p>if(mod(i,3).eq.0) then</p><p>write(*,*) 'fizz'</p><p>fb=1</p><p>2012/9/15Fortran / @n_scattering</p><p> fb=1endif</p><p>if(mod(i,5).eq.0) then</p><p>write(*,*) 'buzz'</p><p>fb=1</p><p>endif</p><p>if (fb.eq.0) then</p><p>write(*,*) i</p><p>endif</p><p>enddo</p><p>Stop 'fizzbuzz'</p><p>End</p></li><li><p>Fortran27</p><p>do while (1)(1)</p><p>2012/9/15Fortran / @n_scattering</p><p> Fortran90FORTRAN77</p><p>( 1)</p><p>end do</p></li><li><p>Fortran28</p><p> BLAS ()</p><p> LAPACK ()</p><p> FFTW ()</p><p>2012/9/15Fortran / @n_scattering</p><p> FFTW ()</p><p> AMD ACML</p><p> Intel MKL</p></li><li><p>29</p><p> 1CPU</p><p> OpenMP</p><p>2012/9/15Fortran / @n_scattering</p><p> OpenMP</p><p> OpenMPFortran</p></li><li><p>30</p><p>2012/9/15Fortran / @n_scattering</p></li><li><p>31</p><p> CPU</p><p> 1/N()</p><p>2012/9/15Fortran / @n_scattering</p><p>1/N</p></li><li><p>32</p><p> PCPC</p><p>2012/9/15Fortran / @n_scattering</p><p>MPI (Message Passing Interface)</p><p> MPIMPICH2OpenMPI</p></li><li><p>33</p><p>2012/9/15Fortran / @n_scattering</p></li><li><p>34</p><p> CPU</p><p> 1/N()</p><p>2012/9/15Fortran / @n_scattering</p><p>1/N</p></li><li><p>35</p><p>1. 2. Fortran3. Fortran4. Fortran</p><p>2012/9/15Fortran / @n_scattering</p><p>4. Fortran5. Fortran6. </p></li><li><p> ()36</p><p>2012/9/15Fortran / @n_scattering</p></li><li><p>37</p><p> Wikipedia FORTRAN ()(2001)</p><p> Fortran77 </p><p>2012/9/15Fortran / @n_scattering</p><p> Fortran77 (1986)</p><p> (MPI)http://accc.riken.jp/HPC/training/</p></li></ul>