The Queen's University of Belfast
Parallel Computer Centre

[Next] [Previous] [Top]

Performance Utilities


Performance Utilities

`An Overview of the cf77 compiling system'

Compiler Commands

syntax: - cf77 [options] sourcefile.f

options - specify the invocation of various components

cf77 -Z invokes the preprocessor and the mid processor in the following ways:

-Zp - invokes both fpp and fmp

-Zc - bypasses both fpp and fmp (default option)

-Zv - all phases except fmp

-Zu - all phases except fpp

Example sequence of events invoked by the following command:

cf77 -Zp prog.f -

fpp prog.f > prog.m

fmp prog.m > prog.j

cft77 prog.j

rm prog.m prog.j

segldr prog.o

rm prog.o

Whole system cf77 command

cf77 -Zp -Wd"fpp options" -Wu"fmp options" -Wf"cft77 options" prog.f

cf77 -Zp -o prog compiling system options

-Wd"-ei" dependency analyser options

-Wu"-x" translator options

-Wf"-em" compiler options

-Wl"-i dirs" loader options

file.f file1.f input filenames

Files within the compiling system

*.f = source

*.l = listing

*.s = CAL ie Cray Assembly Language

*.o = compiled code

*.m = code containing Autotasking/microtasking directives

*.j = Fortran code previously processed by fmp

*.a = library files

*.F = code to be processed by Generic preprocessor GPP

Compiler features

Compiler directives

Loop unwinding and unrolling

Optimization Strategies

Optimising Fortran Programs - Code Analysis

Types of optimization tools

Optimization Techniques

ja

a.out

ja -clst > acctfile

Example - Job Accounting

Job Accounting - Summary Report

===============================

Job Accounting File Name : /tmp/nqs.+++++03av/.jacct4001

Operating System : sn5227 sn5227 7.0.4.2 roo.5 CRAY Y-MP

User Name (ID) : ccg0002 (1474)

Group Name (ID) : cc (901)

Account Name (ID) : centre (13)

Job Name (ID) : scrip (4001)

Report Starts : 10/11/94 13:40:11

Report Ends : 10/11/94 13:40:18

Elapsed Time : 7 Seconds

User CPU Time : 12.4072 [ 12.4067] Seconds

Multitasking Breakdown

(Concurrent CPUs * Connect seconds = CPU seconds)

--------------- --------------- -----------

1 * 0.1625 = 0.1625

2 * 1.9370 = 3.8740

3 * 2.4148 = 7.2445

(Concurrent CPUs * Connect seconds = CPU seconds)

(Avg.) (total) (total)

-------------------------------------------

2.50 * 4.5143 = 11.2809

System CPU Time : 0.7885 Seconds

I/O Wait Time (Locked) : 1.1013 Seconds

I/O Wait Time (Unlocked) : 0.2744 Seconds

CPU Time Memory Integral : 0.8239 Mword-seconds

SDS Time Memory Integral : 0.0000 Mword-seconds

I/O Wait Time Memory Integral : 0.1312 Mword-seconds

Data Transferred : 0.2458 MWords

Maximum memory used : 0.1406 MWords

Logical I/O Requests : 122

Physical I/O Requests : 97

Number of Commands : 2

Billing Units : 00

Optimization Techniques

setenv NCPUS 1

procstat -R proc.raw a.out

procview -L -Sn proc.raw>proc.report

Example - Procstat

PROCSTAT FILE REPORT

Showing All User Files That Moved Data

(Sorted by File Name)

(Process ID is: 94616)

I/O Max File Bytes Avg I/O Rate

Filename Mode Size Processed (Megabytes/Sec)

-------------------------------------------------------

stderr WO 0 37 0.0 12

stdout WO 0 2649 0.012

===============================================

Total Files = 2 0 2786 0.012

%

Profview

cf77 -Wf"-ez" -l prof prog.f

setenv PROF_WPB=1

a.out

prof -x a.out > prof.raw

profview prof.raw OR

profview -LmhDc prof.raw > prof.report

Example - Profview

Example - Profview

Flowview

cf77 -F prog.f

a.out

flowview -Luch > flow.report

Example - Flowview



Example - Flowview



The arcane world of listing

cf77 -Wf"-esx" -c progn.f

ftref -c full -tfull progn.l > progn.xref

Jumpview

cf77 -Wf"-ez" -ltrace prog.f

jt a.out

jumpview -Lumch > jump.report

Example - Jumpview

Example - Jumpview

Autotasking analysis - Atexpert

cf77 -Zp -Wu"-p" prog.f

a.out

atexpert -L -rps -o -f atx.raw > atx.report

Example - atexpert



Example - atexpert

mtdump

XPROC and XFM

Optimising Fortran Programs - Code Optimization

Techniques to improve performance of inefficient code.

CFPP$ DIRECTIVE [SCOPE]

CMIC$ DIRECTIVE

CDIR$ DIRECTIVE

DO 10 I = 1, 10

A(I) = A(I+J)

10 CONTINUE

Optimising Fortran Programs - Changing the code

TIMING CODE

BEFORE = SECOND( )

CALL DOWORK( )

AFTER = SECOND( )

CPUTIME = AFTER - BEFORE


[Next] [Previous] [Top]
All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.
Maintained by Alan Rea, email A.Rea@qub.ac.uk
Generated with CERN WebMaker