# filter1

How to download and try this example

    Usage: pl -gif [-map] filter1.htm

    // Demonstrates a use of proc getdata filter.
    //
    // Produces a line plot of the speedup of a parallel simulation
    // relative to the sequential version.
    //
    // The two lines compare the affect of using a communication library
    // to lower communication overhead by grouping messages together.
    //
    // contributed by Gothmog Gorbash

    #proc page
    pagesize: 9 6
    #if @DEVICE in png,gif
    	scale: 0.6
    #endif

    #proc getdata
      file: filter1.dat
    // data contains many fields not used in this particular plot
      fieldnames: pes seq orig l10 l40 l75 adapt comm spo sp10 sp40 sp75 spa spc
      pf_fieldnames: pes spa spc
      filter:
    // speedup is the sequential time divided by the parallel time
       ##set SPa = $arith(@@seq/@@adapt)
       ##set SPc = $arith(@@seq/@@comm)
    // just output the number of processors and our derived speedup columns for lineplot use
       ##print @@pes @@SPa @@SPc

    #proc areadef
    	title: Speedups for Adaptive Strategy w/ and w/o CommLib
    	titledetails: size=14  align=C style=B color=blue adjust=0,0.2
    	rectangle: 1 1 8 5
    	xrange: 1 512
    	xscaletype: log
    	yrange: 0 52
    	xaxis.label: PEs
    	xaxis.labeldetails: color=claret size=12
    	xaxis.selflocatingstubs: datafields 1 1

    #proc yaxis
    	stubs: inc 10
    	minortics: yes
    	minorticinc: 5
    	grid: color=tan1
    	label: Speedup
    	labeldetails: color=claret size=12

    // speedup of the adaptive strategy without communication library
    #proc lineplot
    xfield: pes
    yfield: spa
    linedetails: color=brightblue width=.6
    pointsymbol: shape=diamond style=outline fillcolor=yellow linecolor=brightblue
    legendlabel: W/o CommLib

    // speedup of the adaptive strategy with communication library
    #proc lineplot
    xfield: pes
    yfield: spc
    linedetails: color=red width=.6
    pointsymbol: shape=diamond style=outline fillcolor=yellow linecolor=red
    legendlabel: W/CommLib

    #proc legend
      location: min+0.35 max
      textdetails: size=10
      colortext: yes