Hi,

http://pastebin.com/CwFKvXXJ - Test Pgm and partial SkipList implementation.
http://pastebin.com/V6BimYjx - AtomicMarkableReference.

I initialize the reference of head and tail to null in the constructor. 
1. nextNode(i) = new AtomicMarkableReference[Node](null, false);

2. The guide tells "If the field target is null, a NullPointerException is
thrown".

Is that causing some issues? But I have to initialize the reference part to
null.
How to solve such issues?

Regards,
Aditya

-----Original Message-----
From: Aditya Sriram M [mailto:aditya.mattapar...@iiitb.org] 
Sent: Saturday, February 19, 2011 9:48 AM
To: x10-users@lists.sourceforge.net
Subject: [X10-users] Facing issues with our first X10 program

Hi,

 

We were able to write some X10 code for SkipList. (as per the logic given in
"The Art of Parallel Processing Programming - section 14.4.2" at
https://softwaretrans.svn.sourceforge.net/svnroot/softwaretrans/BenchMarks/S
kipListBenchMark/)

 

SkipNodeTest.x10 contains the main() code and contains a couple of two
simple statements:

a.    Make an object of Class LockFreeSkipList

b.    Call add() functionality for the same.

 

It compiled well. However, while running it, instead of pointing errors in
X10 code (NullPointerException), the IDE points to some java files which it
generated.

 

Could someone help me out with some leads?

 

Stack trace:

x10.lang.NullPointerException: null

      at
AtomicMarkableReference$ReferenceBooleanPair.access$0(AtomicMarkableReferenc
e.java:37)

      at
AtomicMarkableReference.getReference$G(AtomicMarkableReference.java:109)

      at
LockFreeSkipList.find_1_$_LockFreeSkipList$Node_$_2_$_LockFreeSkipList$Node_
$(LockFreeSkipList.java:443)

      at LockFreeSkipList.add(LockFreeSkipList.java:219)

      at SkipNodeTest.main(SkipNodeTest.java:39)

      at SkipNodeTest$Main.runtimeCallback(SkipNodeTest.java:25)

      at x10.runtime.impl.java.Runtime$3.apply(Runtime.java:97)

      at x10.lang.Runtime$5.apply(Runtime.java:2236)

      at x10.lang.Activity.run(Activity.java:566)

      at x10.lang.Runtime$Worker$6.apply(Runtime.java:1154)

      at x10.runtime.impl.java.Runtime.runAtLocal(Runtime.java:177)

      at x10.lang.Runtime$Worker.loop(Runtime.java:1149)

      at x10.lang.Runtime$Worker.apply(Runtime.java:950)

      at x10.lang.Runtime$Pool.apply(Runtime.java:1480)

      at x10.lang.Runtime.start(Runtime.java:2244)

      at x10.runtime.impl.java.Runtime.apply(Runtime.java:75)

      at x10.runtime.impl.java.Thread$1.run(Thread.java:35)

      at java.lang.Thread.run(Unknown Source)

 

Thanks and Regards,

?  Aditya Sriram Mattaparthi,

. International Institute of Information Technology, Bangalore - 100.

 

 

 

----------------------------------------------------------------------------
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to