LAM/MPI logo

XMPI User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |  

From: Brian Wainscott (brian_at_[hidden])
Date: 2004-03-29 10:37:04


I hope this is the right place to post this, but I coudn't find any
other way to get a message to the current developers of XMPI

First, thanks for XMPI -- I find it very useful on occasion. The buoy
feature is a very nice addition, but I've had problems with it on
occasion, displaying them at the wrong point on the trace (depending on
the zoom factor and other things).

I poked through the code and came up with this admittedly rough fix. It
works, but probably isn't the best way to do things. In fact, I've got
a comment I put in there to that effect.

The following is a diff of my changes based on xmpi_trace.cc version
1.7:

diff -u xmpi_trace.cc.org xmpi_trace.cc
--- xmpi_trace.cc.org 2004-03-29 05:41:00.000000000 -0800
+++ xmpi_trace.cc 2004-03-29 05:41:02.000000000 -0800
@@ -730,7 +730,21 @@

   /* Loop drawing the buoys. */
   if (nbuoys > 0) {
+ double t1,t2;
+ t1 = tmin + (xpix / scale);
+ if (t1 < tmin)
+ t1 = tmin;
+ t2 = tmin + ((xpix + pixwidth) / scale);
+ if (t2 > tmax)
+ t2 = tmax;
     for (i = 0, pbuoy = buoys; i < nbuoys; ++i, ++pbuoy) {
+/*
+ This is really sloppy. BUOYs should be implemented like
+ arrows and traces, where the list is renewed as only being
+ between a pair of times. But I don't want to mess with that
+ now, so just skip those outside the proper time window here....
+*/
+ if(pbuoy->xmb_time < t1 || pbuoy->xmb_time > t2) continue;
       y = ((pbuoy->xmb_rank + 1) * yfactor * XMPI_TRDISP) -
        XMPI_TRHEIGHT;
       x = (int) ((pbuoy->xmb_time - tmin) * scale) - xpix;

I hope you find this useful!

-- 
Brian Wainscott |  "That man is no fool who gives what he cannot keep
brian_at_[hidden]  |   to gain what he cannot lose."  -- Jim Elliot