Professor Gannon, I enjoyed speaking with you at ICS94, and I appreciate your offer to take a look at what we have been working on here at Michigan. I have included the following files in a tar'd uuencoded file to follow. The top directory is kkinstru.gannon. It contains four directories and several subfiles as follows: // This directory contains the entire source instrumentation program. It runs // with sage++-1.3.1 and I've been running it on a sun4. kkinstru: Makefile kkinstru.C // Currently empty, the source file 'kkinstru' from the directory kkinstru is // copied here in the 'make'. bin: // This file contains the instrumentation Makefile and four test files to be // instrumented, and the 'post-instrumentation versions (prefixed by 'kki.'). // Note if you trying running this code, it will ask for parallel region // numbers as you instrument the code. Use the numbers 1, 2, 3, 4 as you // run the commands 'instru kki.main.F', 'instru kki.lu.F', 'instru // kki.matmult.F', and 'instru kki.simple1.F'. usr: main.F lu.F matmult.F simple1.F main.proj lu.proj matmult.proj simple1.proj main.lst lu.lst matmult.lst simple1.lst kki.main.F kki.lu.F kki.matmult.F kki.simple1.F instru Makefile.instru // The main problem I have is trying to get the shadow variables to appear // in the appropriate location upon instrumentation. They should appear // immediately after the declaration of the shadowee array. In the following // directory I supply the 'desired' code. I also supply excerpts from the // TWO applicable sections in the file kkinstru/kkinstru.C. Note that the // 'main' procedure and the called subroutines are instrumented by different // sections of code. Please note in the instrumentation of the 'main' routine, // I managed to get the shadow arrays to appear ABOVE the shadowee. Putting // them below introduces an indefinite recursion by the method I used. I've // had no luck in moving the location of the instrumented shadow array in // called subroutines. desired: des.kki.main.F des.kki.lu.F des.kki.matmult.F des.kki.simple1.F instru.main.code.extract instru.calledsubroutine.code.extract // Any help you could give would be appreciated. Please let me know if // anything is unclear. // Thanks again, // Eric L. Boyd // firstname.lastname@example.org // Other minor problems. If you don't have time to address these, I understand. // I am mentioning them because I suspect most are a problem with sage. a) When I updated from sage v1.0.0 to v1.3.1, the original author's kkinstru.C no longer worked. I had to comment out the following case in a switch statment in kkinstru.C. #ifdef I_THINK_ITS_OLD_SAGE_STUFF case PROC_COM: #endif b) When I compile, I get the following warning message. (This is also appeared after porting to v1.3.1.) Is there something wrong? bagabolts [ 104 ] src -: make g++ -I/a/eiffel/n/eiffel/z/projects/sage/sage++-1.3.1/lib/include -I/a/eiffel/n/ eiffel/z/projects/sage/sage++-1.3.1/h -g -c kkinstru.C kkinstru.C: In function `void instrumentFile(class SgFile *)': kkinstru.C:542: warning: implicit declaration of function `int exit(...)' g++ kkinstru.o /a/eiffel/n/eiffel/z/projects/sage/sage++-1.3.1/lib/sun4/libSage ++.a /a/eiffel/n/eiffel/z/projects/sage/sage++-1.3.1/lib/sun4/libsage.a /a/eiffe l/n/eiffel/z/projects/sage/sage++-1.3.1/lib/sun4/libdb.a /a/eiffel/n/eiffel/z/pr ojects/sage/sage++-1.3.1/lib/sun4/libann.a -o kkinstru c) Are there plans to get multiple files in a foo.proj file to work? d) In the file lu.F, if line 15 is replaced from: c external iowner_proc to: external iowner_proc then line 96 in file kki.lu.F appears after instrumentation as: integer function iowner_proc () instead of: integer function iowner_proc (i, j, pv, ph, nv, nh) Is this a sage bug, a bug in kkinstru.C, or a misinterpreation of Fortran language semantics? e) I believe this problem is an inadequacy of kkinstru.C, but I am not sure how to fix it. In kki.matmult.F, line 33, as follows: c(i,j) = c(i,j) + a(i,k) * b(k,j) is instrumented as follows: c(i,j) = c(i,j) + a(i,k) * b(k,j) call SH$WRITE(3,ISH$pregion,ISH$_c((loc (c(i,j)) - loc ( +c) + mod (loc (c),128)) / 128 + 1)) call SH$READ(3,ISH$pregion,ISH$_c((loc (c(i,j)) - loc (c +) + mod (loc (c),128)) / 128 + 1)) call SH$READ(1,ISH$pregion,ISH$_a((loc (a(i,k)) - loc (a +) + mod (loc (a),128)) / 128 + 1)) call SH$READ(2,ISH$pregion,ISH$_b((loc (b(k,j)) - loc (b +) + mod (loc (b),128)) / 128 + 1)) when it should be instrumented as follows: c(i,j) = c(i,j) + a(i,k) * b(k,j) call SH$READ(3,ISH$pregion,ISH$_c((loc (c(i,j)) - loc (c +) + mod (loc (c),128)) / 128 + 1)) call SH$READ(1,ISH$pregion,ISH$_a((loc (a(i,k)) - loc (a +) + mod (loc (a),128)) / 128 + 1)) call SH$READ(2,ISH$pregion,ISH$_b((loc (b(k,j)) - loc (b +) + mod (loc (b),128)) / 128 + 1)) call SH$WRITE(3,ISH$pregion,ISH$_c((loc (c(i,j)) - loc ( +c) + mod (loc (c),128)) / 128 + 1)) Any ideas?