June 24-25, 2008 Regional Grid Training, University of Belgrade, Serbia Hands-on: Compiling MPI codes with PGI Dušan Vudragović SCL, Institute of Physics Belgrade
A E G I S June 24-25, 2008 Advanced job types Job Collections Type = "Collection"; DAG jobs (Direct Acyclic Graphs) Type = “Dag"; Parametric jobs Type = "Parametric"; Interactive Jobs Type = "Interactive”; MPI Jobs (Message Passing Interface) JobType = ”MPICH”; UserGuide.html UserGuide.html Regional Grid Training, University of Belgrade, Serbia
A E G I S June 24-25, 2008 PGI Workstation High-performance compilers F77, F95, HPF, C and C++ compilers 64-bit x64 and 32-bit x86 processor m m Regional Grid Training, University of Belgrade, Serbia
A E G I S June 24-25, 2008 Simple Example (f77) Regional Grid Training, University of Belgrade, Serbia PROGRAM mpi INCLUDE 'mpif.h' INTEGER ierr, rank, size CALL MPI_INIT(ierr) CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr) CALL MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) PRINT *, 'I am ', rank, ' of ', size CALL MPI_FINALIZE(ierr) END #MPI_.28T9.29
A E G I S June 24-25, 2008 Simple Example (jdl) Regional Grid Training, University of Belgrade, Serbia JobType = "mpich"; NodeNumber = 3; Executable = "mpif"; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"mpif"}; OutputSandbox = {"std.out", "std.err"}; Requirements = (other.GlueCEInfoLRMSType == "pbs") && RegExp("ce64.phy.bg.ac.yu*", other.GlueCEUniqueID); #MPI_.28T9.29
A E G I S June 24-25, 2008 Advanced Example (pgi) Regional Grid Training, University of Belgrade, Serbia number_of_intervals= step=1.0D+00/dble(number_of_intervals) node_integral=0.0D+00 do counter = node_id+1, number_of_intervals, number_of_nodes x=step*(dble(counter) - 0.5D+00) node_integral=node_integral+f(x) end do
A E G I S June 24-25, 2008 Advanced Example (pgi vs. gnu) Regional Grid Training, University of Belgrade, Serbia Node: 1 Node integral: Node: 2 Node integral: Number of nodes: 3 Number of intervals: Node: 0 Node integral: PI exact : PI estimate: PI diff : E-07 Wall clock time: GNU
A E G I S June 24-25, 2008 Advanced Example (pgi vs. gnu) Regional Grid Training, University of Belgrade, Serbia Node: 1 Node integral: Node: 2 Node integral: Number of nodes: 3 Number of intervals: Node: 0 Node integral: PI exact : PI estimate: PI diff : E-07 Wall clock time: PGI