Questions tagged [x10-language]

X10 is a programming language developed by IBM that emphasizes parallelism for high-performance computing.

X10 is a parallel programming language which implements the Asynchronous Partitioned Global Address Space model. It is a statically typed, object-oriented language with a base syntax similar to Scala.

An X10 program executes over a collection of places, which are regions of uniform memory access. Multiple parallel activities operate on data within a place. An activity may spawn additional local or remote asynchronous activities, and detect their termination.

X10 is developed by IBM with community contributions, and is distributed as free software under the Eclipse Public Licence.

References

18 questions
3
votes
2 answers

Translating Java to X10

I'm translating a Java program into X10 and have run into a couple problems that I was wondering if anyone could help me translate. Here's one Java segment that I'm trying to translate: ArrayList[] list = new ArrayList[this.V]; for (int…
Matt Nowak
  • 31
  • 3
2
votes
2 answers

Importing x10 objects into java

We need to pass an x10 arraylist[string] to a Java method as an object. What we tried is this.The method signature in Java interface is as follows. public void getX10ArrayList ( ArrayList nameList): We implement that method inside an X10…
Nandula
  • 23
  • 4
2
votes
1 answer

What is the difference of 'async' before or after 'for' in X10?

I'm currently learning for an exam. In an multiple choice question of an old exam are two different versions of a for loop marked as valid: finish async for (i in array) async { ... } and finish for (i in array) async { ... } What is the…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
2
votes
1 answer

X10 Parallel processing shared variable

Please forgive me if my question is not professional. I am reading tutorials of IBM's x10. Here's the code that computes PI but confuses me: public static def countPoints(n: Int, rand: ()=>Double) { var inCircle: Double = 0.0; for (var j:Long = 1;…
Xiu
  • 69
  • 1
  • 8
1
vote
1 answer

Difference between places and workers in APGAS framework and how are the workers implemented in Java?

I have been reading the Lifeline Global Load Balancing Paper (the paper is available on the link http://www.cs.columbia.edu/~martha/courses/4130/au12/p201-saraswat.pdf). I am new to x10 language. I am actually confused between the terminology of…
unkemptArc99
  • 39
  • 1
  • 5
1
vote
0 answers

How to run X10 program with Sockets backend?

I am working on a project, in which, a part is to send message from one process to another which are running on different machines. (I have to code it in X10 language). From this link, I figured out that, we can send message between processes which…
Shinichi
  • 11
  • 3
1
vote
1 answer

X10 reading from a file not as expected

I encountered following behavior when reading from a text file. val input = new File(inputFileName); val inp = input.openRead(); Console.OUT.println(inp.lines().next()); if (inp.lines().hasNext()) Console.OUT.println(inp.lines().next()); my…
Marina
  • 15
  • 4
1
vote
1 answer

Port old X10 Example to version 2.5

I have an old X10 example in class which I'm trying to compile. import x10.array.Array; import x10.io.Console; ... public static def main(args: Array[String](1)) { val regionTest = 1..12; val testArray = new Array[Int](1..12, (Point)=>0); …
joschuck
  • 403
  • 4
  • 14
1
vote
1 answer

X10 code does not recognize the second core of the CPU

I wrote a canonical "Hello, World" demo class in X10: class Hello { public static def main(args:Rail[String]):void { finish for (p in Place.places()) { at (p) async Console.OUT.println(here+" says hello"); } …
1
vote
1 answer

How do I generate and print Fibonacci numbers in X10?

I would like to generate and print the first 10 Fibonacci numbers. I don't want to be efficient, but I want to see some (working) X10 code that is easy to understand. My try // file Fibonacci.x10 public class Fibonacci { public static def…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1
vote
1 answer

How can I compile the x10 example?

I'm currently reading this and I try to compile the very first example // file HelloWorld.x10 public class HelloWorld { public static def main(args: Array[String](1)){ x10.io.Console.OUT.println("Hello, World"); } } I have Linux…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1
vote
1 answer

X10 x10.lang.FailedDynamicCheckException: !(here == x$0.home) C++ Backend

i'm playing around with X10 currently, and i'm getting multiple exceptions. This is the code i created: Main.x10 public class Main { // main Method for the Main class public static def main(argv:Rail[String]) { Console.OUT.println("This is the…
Martze
  • 921
  • 13
  • 32
1
vote
1 answer

X10 - Segmentation fault with multi-Places

I'm completely new to the X10 language and I tried the following code and I get a segmentation fault when using more than one Place. I get the same error when running X10's Monte Carlo sample with more than one Place. I am using X10 version 2.3 on a…
Auxiliary
  • 2,687
  • 5
  • 37
  • 59
0
votes
1 answer

What is the correct way to call this sorting funtion in x10?

I am trying to sort an array in x10 using qsort(). First I was writing sequential code, so there were no issues. Now, I am trying to parallelize my code. Now I need to run this sort function from different places. public def qsort_cmp_idx(var…
Dheeraj
  • 15
  • 6
0
votes
1 answer

Need help in understanding Dist and DistArray

I don't understand the following piece of code. val array = new Array[INT](1..1000, ([i]:Point) => 0); val dist = Dist.makeBlock(array.region); val distArray = DistArray.make(dist, ([i]:Point) => array(i)); This is all. The expressions in () are…
user2965601
1
2