"TAJCHMAN Marc" <marc.tajch...@cea.fr> wrote on 09/22/2009 06:16:14 PM:
> Hi, > > As I'm doing several tests in X10 and many wrong data placement errors > ;-), execution frequently produces output like this : > > 0.err: Uncaught exception at place 0: x10.lang.BadPlaceException: > bad place exception > 0.err: x10.lang.BadPlaceException: bad place exception > 0.err: at No stacktrace recorded. > > Is there a way (compiler option, runtime option, exception catching, > other ?) to have more information about the source line were exception > occurs, wrong access to which variable, call stack trace, etc ? The stack trace *is* recorded, but isn't propagated properly across places, even in SVN HEAD. See http://jira.codehaus.org/browse/XTENLANG-540 . One solution is to attach to the process with gdb before the exception occurs, and set a breakpoint in x10aux::throwException(). This will let you see the stack trace for the invalid access. You should be able to find the corresponding line of X10 code from the comments in the generated C++ code. > Is there a function, macro, ... that can inform where a variable > (scalar or component of an array) is located ? UPC for example, has > such a function (upc_threadof). For any Ref, you can access the "location" property, which is of type Place. You can get the place id by accessing the "id" property of that Place value. > Also, the c++ compiler frequently issue the following warnings : > .../include/x10aux/bootstrap.h:104: warning : format ‘%ld’ expects > type ‘long int’, but argument 3 has type ‘x10_int’ > .../include/x10aux/bootstrap.h:113: warning : format ‘%ld’ expects > type ‘long int’, but argument 3 has type ‘x10_int’ > .../include/x10aux/bootstrap.h:126: warning : format ‘%ld’ expects > type ‘long int’, but argument 3 has type ‘x10_int’ > > Normally warnings like these ones are harmless, but one never knows. Fixed on the 1.7 branch, and will appear in the next 1.7 series release. > For info : > x10c++ version 1.7.6 > Polyglot compiler toolkit version 3.1.0 (2009-06-11 14:44:14) > (binary version downloaded from the web site) > > gcc/g++ : > Target: i486-linux-gnu > gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) > > Thanks in advance > Marc HTH, Igor -- Igor Peshansky (note the spelling change!) IBM T.J. Watson Research Center XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/) X10: Parallel Productivity and Performance (http://x10.sf.net/) ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users