Escali 4.4 manual Tracing, Using Scali MPI Connect built-in trace

Page 50

/* find the global sum of the squares */

MPI_Reduce( &my_sum, &sum, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD ); /* let rank 0 compute the root mean square */

/* rank 0 broadcasts the RMS to the other nodes */

MPI_Bcast( &rms, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD ); /* perform filtering operation (contrast enhancement) */

/* gather back to rank 0 */

MPI_Gather( recvbuf, my_count, MPI_UNSIGNED_CHAR, pixels, my_count, MPI_UNSIGNED_CHAR, 0, MPI_COMM_WORLD );

/* write image to file */

MPI_Finalize();

}

This code uses collective operations (broadcast, scatter, reduce and gather) to employ multiple processes to perform operations on a image. For example, the figure below (Figure 4-1:)shows the result of processing an ultrasonic image of a fetus.

 

 

 

original

processed image

Figure 4-1:A ultrasound image before and after contrast enhancement

4.2 Tracing

Tracing enables features in Scali MPI Connect’s implementataion of MPI that report detail about the MPI calls. By capturing the printout of the tracing information the user can monitor the development of the application run, perform analysis of the application run, figure out how the application uses the communication mechanisms, and discover details that can be used to improve performance.

4.2.1 Using Scali MPI Connect built-in trace

To use built-in trace-facility you need to set the mpimon-option -trace “<options>” specifying what options you want to apply. The following options can be specified: (<...-list> is a semicolon-separated list of Posix-regular-expressions.)

-b

Trace beginning and end of each MPI_call

-s<seconds>

Start trace after <seconds> seconds

-S<seconds>

End trace after <seconds> seconds

-c<calls>

Start trace after <calls>MPI_calls

-C<calls>

End trace after <calls>MPI_calls

-m<mode>

Special modes for trace

 

<mode> = “sync”: Synchronize with MPI_Barrier before starting

 

the collective call

-p<selection>

Enable for process(es): 'n,m,o..' = (list) or 'n-m' = (range) or 'all'

Scali MPI Connect Release 4.4 Users Guide

38

Image 50
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