Escali 4.4 manual Finding the best algorithm

Page 62

Section: 5.4 Collective operations

 

4

pair4

 

5

pipe0

 

6

pipe1

def

7

safe

8 smp

By looping through these alternatives the performance of IS varies:

algorithm 0: Mop/s total = 95.60

algorithm 1: Mop/s total = 78.37

algorithm 2: Mop/s total = 34.44

algorithm 3: Mop/s total = 61.77

algorithm 4: Mop/s total = 41.00

algorithm 5: Mop/s total = 49.14

algorithm 6: Mop/s total = 85.17

algorithm 7: Mop/s total = 60.22

algorithm 8: Mop/s total = 48.61

For this particular combination of Alltoallv-algorithm and application (IS) the performance varies significantly, with algorithm 0 close to doubling the performance over the default.

5.4.1 Finding the best algorithm

Consider the image processing example from Chapter 4 which containes four collective operations. All of these can be tuned with respect to algorithm according to the following pattern:

user% for a in <range>; do

\>; SCAMPI_<MPI-function>_ALGORITHM=$a \

\>;mpimon <application> -- <nodes> ><application>.out.$a; \ \>; done

For example, trying out the alternative algorithms for MPI_Reduce with two processes can be done as follows (assuming Bourne Again Shell [bash]:

user% for a in 0 1 2 3 4 5 6 7 8; do \>; SCAMPI_REDUCE_ALGORITHM=$a

\>; mpimon ./kollektive-8 ./uf256-8.pgm -- r1 r2; \>; done

Given that the application then reports the timing of the relevant parts of the code a best choice can be made. Note however that with multiple collective operations working in the same program there may be interference between the algorithms. Also, the performance of the implementations is interconnect dependent.

Scali MPI Connect Release 4.4 Users Guide

50

Image 62
Contents Scali MPI ConnectTM Users Guide Acknowledgement Copyright 1999-2005 Scali AS. All rights reservedScali Bronze Software Certificate Grant of License MaintenanceII Software License Terms Commencement Sub-license and distribution SupportLicense Manager Export RequirementsSCALI’s Obligations LICENSEE’s ObligationsTitle to Intellectual Property Rights TransferWarranty of Title and Substantial Performance Compliance with LicensesLimitation on Remedies and Liabilities Scali MPI Connect Release 4.4 Users Guide ViiProprietary Information MiscellaneousGoverning Law Scali MPI Connect Release 4.4 Users Guide Table of contents Profiling with Scali MPI Connect Appendix a Example MPI code Scali MPI Connect Release 4.4 Users Guide Chapter Scali MPI Connect product contextSupport Scali mailing lists SMC FAQ SMC release documentsProblem reports Platforms supportedLicensing How to read this guideAcronyms and abbreviations FeedbackNIC GUI style font Terms and conventionsTypographic conventions Typographic conventions Description of Scali MPI Connect Scali MPI Connect componentsSMC network devices Shared Memory Device Direct Access Transport DATNetwork devices Ethernet Devices3.2 DET Using detctlUsing detstat 4.1 GM MyrinetInfiniband 5.1 IBChannel buffer Communication protocols on DAT-devices6 SCI Transporter protocol Inlining protocolEagerbuffering protocol Zerocopy protocol MPI-2 FeaturesSupport for other interconnects Scali MPI Connect Release 4.4 Users Guide MPI-2 Features Scali MPI Connect environment variables Setting up a Scali MPI Connect environmentCompiling and linking RunningCompiler support Linker flagsRunning Scali MPI Connect programs Naming conventionsIdentity of parallel processes Mpimon monitor programBasic usage Standard output Controlling options to mpimonStandard input Program specHow to provide options to mpimon Network optionsMpirun wrapper script Mpirun usageRunning with dynamic interconnect failover capabilities Running with tcp error detection TfdrSuspending and resuming jobs Part partDebugging and profiling Debugging with a sequential debuggerAssistance for external profiling Using built-in segment protect violation handlerBuilt-in-tools for debugging Debugging with Etnus TotalviewChannelinlinethreshold size to set threshold for inlining Controlling communication resourcesCommunication resources on DAT-devices Good programming practice with SMC Using MPIIsend, MPIIrecvUsing MPIBsend Matching MPIRecv with MPIProbeFatal errors Error and warning messagesUser interface errors and warnings Unsafe MPI programsMpimon options Postfix Giving numeric values to mpimonPrefix Scali MPI Connect Release 4.4 Users Guide Profiling with Scali MPI Connect ExampleUsing Scali MPI Connect built-in trace TracingAbsRank MPIcallcommNamerankcall-dependant-parameters where +relSecs S eTime whereFeatures ExampleUsing Scali MPI Connect built-in timing TimingMPIcallDcallsDtimeDfreq TcallsTtimeTfreq Commrank send to toworldTocommonFields where Using the scanalyzeCommrank recv from fromworldFromcommonFields Count!avrLen!zroLen!inline!eager!transporter! whereFor timing Using SMCs built-in CPU-usage functionality This produces the following reportScali MPI Connect Release 4.4 Users Guide Tuning communication resources Automatic buffer managementCaching the application program on the nodes How to optimize MPI performanceBenchmarking First iteration is very slowCollective operations Memory consumption increase after warm-upFinding the best algorithm Image contrast enhancement Appendix aPrograms in the ScaMPItst package Scali MPI Connect Release 4.4 Users Guide File format OriginalAppendix B When things do not work troubleshootingWhy does not my program start to run? General problems Why can I not start mpid?Why does my program terminate abnormally? Per node installation of Scali MPI Connect Appendix CInstall Scali MPI Connect for Myrinet Install Scali MPI Connect for TCP/IPInstall Scali MPI Connect for Direct Ethernet ExampleInstall and configure SCI management software Install Scali MPI Connect for InfinibandInstall Scali MPI Connect for SCI License optionsScali kernel drivers Uninstalling SMCTroubleshooting Network providers Troubleshooting 3rdparty DAT providers Troubleshooting the GM providerScali MPI Connect Release 4.4 Users Guide Grouping Appendix D Bracket expansion and groupingBracket expansion Scali MPI Connect Release 4.4 Users Guide Appendix E Related documentationScali MPI Connect Release 4.4 Users Guide List of figures Scali MPI Connect Release 4.4 Users Guide Index Transporter protocolSSP