SAGE

From Tau Wiki
Jump to: navigation, search


On QSC (Alpha,Tru64), I edit Makefile_generic in SAGE and change: F90 = tau_f90.sh CC = tau_cc.sh (CC is not specified), and compile it. To run it (choose any no. of cpus), I use:

% bsub -q smallq -n 32 -o sage.output.txt -W 20 prun -t -n 32 ./sage.x timing_c.input

or on flasha:

% llogin -n 4
% mpirun -np 4 sage.x timing_c.input

I have a select.tau file that I have generated after optimizing the instrumentation. On flasha (linux x86), I need to edit Makefile_linux and change each reference of

F95 := pgf90
to
F95 := tau_f90.sh

and it has a weird section where it looks for the name of the compiler by doing a -V flag and matching it with Portland. After the match, I just put:

F95 := tau_f90.sh

The section looks like:

  ifeq (PGI, $(findstring PGI,$(COMPILER)))

    # Redstorm uses the PGI compiler however they invoke it with a
    # wrapper called ftn
    ifeq (REDSTORM, $(findstring REDSTORM, $(LINUX_MACH_TYPE)))
      F95 := ftn
    else
      F95 := pgf90
      F95 := tau_f90.sh
    endif

  endif

and

  else
    F95 := $(shell /usr/bin/which pgf90 2>/dev/null)
    ifeq (pgf90, $(findstring pgf90,$(F95)))
      WHICHCOMP := "$(shell $(F95) -V 2>&1)"
      ifeq (Portland, $(findstring Portland,$(WHICHCOMP)))
        COMPILER := PGI
      endif
    endif
    F95 := tau_f90.sh
  endif
endif

and also change

    override CC := pgcc
    override CC := tau_cc.sh

The selective instrumentation file is here: sage.select.tau