Escali 4.4 manual Setting up a Scali MPI Connect environment, Compiling and linking, Running

Page 33

Chapter 3

Using Scali MPI Connect

 

 

 

 

This chapter describes how to setup, compile, link and run a program using Scali MPI Connect, and briefly discusses some useful tools for debugging and profiling.

Please note that the "Scali MPI Connect Release Notes" are also available as a file in the /opt/scali/doc/ScaMPI directory.

3.1 Setting up a Scali MPI Connect environment

3.1.1 Scali MPI Connect environment variables

The use of Scali MPI Connect requires that some environment variables be defined. These are usually set in the standard startup scripts (e.g..bashrc when using bash), but can also be defined manually.

MPI_HOME

Installation directory. For a standard installation, the variable should be set

 

as:export MPI_HOME=/opt/scali

LD_LIBRARY_PATH Path to dynamic link libraries. Must be set to include the path to the directory where these libraries can be found:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$MPI_HOME/lib

PATH

Path variable. Must be updated to include the path to the directory where

 

the MPI binaries can be found:

 

export PATH=${PATH}:$MPI_HOME/bin

Normally, the Scali MPI Connect library’s header files mpi.h and mpif.h reside in the $MPI_HOME/include directory.

3.2 Compiling and linking

MPI is an "Application Programming Interface" (API) and not an "Application Binary Interface" (ABI). This means that in general applications should be recompiled and linked when used with Scali MPI Connect. Since the MPICH-implementation is widely used Scali has made SMC ABI- compatible, depending on the versions of MPICH and SMC used. Please check the "Scali MPI Connect Release Notes" for details. For applications that are dynamically linked with MPICH it should only be necessary to change the library-path (LD_LIBRARY_PATH). For applications with the necessary object files, only a relinking is needed.

3.2.1 Running

Start the hello-worldprogram on the three nodes called nodeA, nodeB and nodeC.

%mpimon hello-world -- nodeA 1 nodeB 1 nodeC 1

The hello-worldprogram should produce the following output:

Hello-world, I'm rank 0; Size is 3

Hello-world, I'm rank 1; Size is 3

Hello-world, I'm rank 2; Size is 3

Scali MPI Connect Release 4.4 Users Guide

21

Image 33
Contents Scali MPI ConnectTM Users Guide Copyright 1999-2005 Scali AS. All rights reserved AcknowledgementScali Bronze Software Certificate Maintenance II Software License Terms CommencementGrant of License 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 Terms and conventions Typographic conventionsGUI style font Typographic conventions Scali MPI Connect components Description of Scali MPI ConnectSMC network devices Network devices Direct Access Transport DATShared Memory Device Ethernet DevicesUsing detctl Using detstat3.2 DET Infiniband Myrinet4.1 GM 5.1 IBCommunication protocols on DAT-devices 6 SCIChannel buffer Inlining protocol Eagerbuffering protocolTransporter protocol MPI-2 Features Support for other interconnectsZerocopy protocol 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 programsMpimon monitor program Basic usageIdentity of parallel processes 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 TotalviewControlling communication resources Communication resources on DAT-devicesChannelinlinethreshold size to set threshold for inlining 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 Giving numeric values to mpimon PrefixPostfix 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 Appendix a Programs in the ScaMPItst packageImage contrast enhancement Scali MPI Connect Release 4.4 Users Guide Original File formatWhen things do not work troubleshooting Why does not my program start to run?Appendix B Why can I not start mpid? Why does my program terminate abnormally?General problems 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 optionsUninstalling SMC Troubleshooting Network providersScali kernel drivers Troubleshooting the GM provider Troubleshooting 3rdparty DAT providersScali MPI Connect Release 4.4 Users Guide Appendix D Bracket expansion and grouping Bracket expansionGrouping 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