Escali 4.4 manual Debugging and profiling, Debugging with a sequential debugger

Page 41

Section: 3.7 Debugging and profiling

As this feature is limited to tcp communication only, it will not have any effect when using native RDMA drivers such as Infiniband or Myrinet. Note that the combination of tfdr and failover mode is not supported in this version of Scali MPI Connect.

Data errors will be logged using the standard syslog mechanism.

3.7 Debugging and profiling

The complexity of debugging programs can grow dramatically when going from serial to parallel programs. So to assist in debugging MPI programs Scali MPI Connect has a nnumber of features built-in, like starting processes directly in a debugger and tracing proceses’ traffic patterns.

3.7.1 Debugging with a sequential debugger

SMC applications can be debugged using a sequential debugger. By default, the GNU debugger gdb is invoked by mpimon. If another debugger is to be used, specify the debugger using the mpimon option -debugger <debugger>.

To set debug-mode for one or more MPI-processes, specify the MPI-process(es) to debug using the mpimon option -debug <select>. In addition, note that the mpimon option -display <display> should be used to set the display for the xterm terminal emulator. An xterm terminal emulator, and one debugger, is started for each of the MPI-processes being debugged.

For example, to debug an application using the default gdb debugger do:

user% mpimon -debug all <application +parameters> -- <node specification>

Initially, for both MPI-process 0 and MPI-process 1, an xterm window is opened. Next, in the upper left hand corner of each xterm window, a message containing the application program’s run parameter(s) is displayed. Typically, the first line reads Run parameters: run <programoptions>. The information following the colon, i.e. run <programoptions>, is needed by both the debugger and the SMC application being debugged. Finally, one debugger is started for each session. In each debugger's xterm window, first input the appropriate debugging action before the MPI-process is started. Then, when ready to run the MPI-process, paste <programoptions> into the debugger to start running.

Figure 3-1: /opt/scali/bin/mpirun -debug all ./kollektive-8 ./ultrasound_fetus-256x256-8.pgm

Scali MPI Connect Release 4.4 Users Guide

29

Image 41
Contents Scali MPI ConnectTM Users Guide Copyright 1999-2005 Scali AS. All rights reserved AcknowledgementScali Bronze Software Certificate Grant of License MaintenanceII Software License Terms Commencement License Manager SupportSub-license and distribution Export RequirementsLICENSEE’s Obligations SCALI’s ObligationsTransfer Title to Intellectual Property RightsCompliance with Licenses Warranty of Title and Substantial PerformanceScali MPI Connect Release 4.4 Users Guide Vii Limitation on Remedies and LiabilitiesMiscellaneous Proprietary InformationGoverning 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 Scali MPI Connect product context ChapterProblem reports Scali mailing lists SMC FAQ SMC release documentsSupport Platforms supportedAcronyms and abbreviations How to read this guideLicensing FeedbackNIC GUI style font Terms and conventionsTypographic conventions Typographic conventions Scali MPI Connect components Description of Scali MPI ConnectSMC network devices Network devices Direct Access Transport DATShared Memory Device Ethernet Devices3.2 DET Using detctlUsing detstat Infiniband Myrinet4.1 GM 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 Compiling and linking Setting up a Scali MPI Connect environmentScali MPI Connect environment variables RunningLinker flags Compiler supportNaming conventions Running Scali MPI Connect programsIdentity of parallel processes Mpimon monitor programBasic usage Standard input Controlling options to mpimonStandard output Program specNetwork options How to provide options to mpimonMpirun usage Mpirun wrapper scriptSuspending and resuming jobs Running with tcp error detection TfdrRunning with dynamic interconnect failover capabilities Part partDebugging with a sequential debugger Debugging and profilingBuilt-in-tools for debugging Using built-in segment protect violation handlerAssistance for external profiling Debugging with Etnus TotalviewChannelinlinethreshold size to set threshold for inlining Controlling communication resourcesCommunication resources on DAT-devices Using MPIBsend Using MPIIsend, MPIIrecvGood programming practice with SMC Matching MPIRecv with MPIProbeUser interface errors and warnings Error and warning messagesFatal errors Unsafe MPI programsMpimon options Postfix Giving numeric values to mpimonPrefix Scali MPI Connect Release 4.4 Users Guide Example Profiling with Scali MPI ConnectTracing Using Scali MPI Connect built-in trace+relSecs S eTime where AbsRank MPIcallcommNamerankcall-dependant-parameters whereExample FeaturesTiming Using Scali MPI Connect built-in timingMPIcallDcallsDtimeDfreq TcallsTtimeTfreq Commrank recv from fromworldFromcommonFields Using the scanalyzeCommrank send to toworldTocommonFields where Count!avrLen!zroLen!inline!eager!transporter! whereFor timing This produces the following report Using SMCs built-in CPU-usage functionalityScali MPI Connect Release 4.4 Users Guide Automatic buffer management Tuning communication resourcesBenchmarking How to optimize MPI performanceCaching the application program on the nodes First iteration is very slowMemory consumption increase after warm-up Collective operationsFinding the best algorithm Image contrast enhancement Appendix aPrograms in the ScaMPItst package Scali MPI Connect Release 4.4 Users Guide Original File formatAppendix 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? Appendix C Per node installation of Scali MPI ConnectInstall Scali MPI Connect for Direct Ethernet Install Scali MPI Connect for TCP/IPInstall Scali MPI Connect for Myrinet ExampleInstall Scali MPI Connect for SCI Install Scali MPI Connect for InfinibandInstall and configure SCI management software License optionsScali kernel drivers Uninstalling SMCTroubleshooting Network providers Troubleshooting the GM provider Troubleshooting 3rdparty DAT providersScali MPI Connect Release 4.4 Users Guide Grouping Appendix D Bracket expansion and groupingBracket expansion Scali MPI Connect Release 4.4 Users Guide Related documentation Appendix EScali MPI Connect Release 4.4 Users Guide List of figures Scali MPI Connect Release 4.4 Users Guide Transporter protocol IndexSSP