Ateji PX FAQ

Is Ateji PX a preprocessor?

it is understandable that one might think of it as a preprocessor, since it takes an extension to a language as input, and translates it into another source file in the standard language. However, a preprocessor, in the sense of the C/C++ preprocessor, is a text manipulation tool that replaces pieces of text by other pieces of text, without any understanding of the contents. In contrast, Ateji PX is a full compiler that analyzes the whole program. That being said, the Ateji PX compiler is slightly unusual in the sense that it outputs Java source code rather than JVM byte-code. The latter would actually have been easier, but providing standard Java source code makes it easy to integrate with all development tools requiring source code as input. The ability to see the output code also increases the confidence users have in the tool.

Which Java versions are required?

Ateji PX requires a JVM version 1.6 or higher.

Which Eclipse versions are supported?

We support versions 3.4 (Ganymede), 3.5 (Galileo), 3.6 (Helios) and 3.7 (Indigo). It does not matter whose distribution it is, or whether it is on Windows or Linux.

Are other IDEs supported, such as IDEA IntelliJ or NetBeans ?

No, but Ateji PX can be used from these IDEs as an external tool.

Can Ateji PX be integrated into my build process?

Yes, in addition to the Eclipse plugin, Ateji PX comes also as a command line tool that can be embedded into your build process.

How do I debug an Ateji PX program? How do I trace errors back to the original source code?

Within Eclipse, you can put breakpoints on the Ateji PX source code, step through it and examine variables, without ever seeing the generated Java code. You can give names to parallel branches in order to identify them in the threads viewer. Outside Eclipse, without Ateji integration support, you’ll have to debug the generated Java source code and report changes to the original Ateji PX code.

Does Ateji PX require a specific JVM?

Ateji PX will work with any standard JVM. Depending on the application, the choice of a specific JVM can have an important impact on performance.

Does Ateji PX require a runtime component?

Yes. Although most of the work is done at compile time, a small run-time library must be embedded into Ateji PX applications. It contains a fast scheduler for lightweight branches implementing some form of work stealing scheduling.

 

This is a plain standard and portable JAR file. When using the Eclipse plugin, the JAR file is automatically embedded in the application. When compiling from the command line, it is added by specific a compilation option.

What about compatibility?

Ateji PX is compatible at the source level and byte-code level with all Java and JVM-based programs and libraries.

Does Ateji PX work with application servers?

Yes. The generated Java source code and the runtime JAR only use standard portable features

Who are the users of Ateji PX?

They are users in need of high-performance and Java compatibility, in sectors such as investment banking, bioinformatics, cheminformatics, data analytics or aerospace. Because these industries generally do not have a long history of legacy code in FORTRAN or C/C++, they have been adopting Java more aggressively in the last ten years than some of the older science and engineering disciplines. However, with the prevalence of Java in Computer Science education since the late 1990s, and the improvements made in the performance of compiled Java code, we expect more and more new developments to occur in Java, which will increase the market for ATEJI PX. Typical application areas include data mining and statistics over large data volumes, and connections with Java-based user interfaces.

Is Ateji PX a standard?

Not at this point. We are considering to submit a Java Specification Request (JSR, see http://jcp.org/en/jsr/overview) proposing the integration of Ateji PX parallel constructs into the Java standard. In the meantime, simply consider Ateji PX as a new JVM-based language, that also happens to be compatible at the source level.

How does Ateji PX relate to Scala?

Scala is a JVM-based functional language, unrelated to Java at the source-code level. Functional languages make it easier to express code without side-effects, amenable to easier parallelization on shared-memory machines. Scala however does not provide explicit parallel constructs like those in Ateji PX.

How does Ateji PX relate to Erlang?

Erlang is an efficient parallel programming language used mostly in telephone switches and embedded systems. It relies on spawning lightweight processes and a powerful pattern matching mechanism for filtering incoming messages. This can be simulated in Ateji PX using specific channels instead of patterns.

How does Ateji PX relate to Cilk?

Cilk (http://supertech.csail.mit.edu/cilk/) is an extension of C/C++ with spawn and fork/join constructs for expressing task parallelism. Ateji PX is an extension of Java that can express most idioms of parallelism. Both rely on lightweight "processes" and work stealing for their implementation.

How does Ateji PX relate to OpenMP?

People with an HPC or simulation background who are first exposed to Ateji PX tend to compare it to OpenMP. OpenMP is a set of preprocessing directives for C/C++ programs, primarily designed for expressing data parallelism. Ateji PX is an extension of Java that can express most idioms of parallelism. In particular, Ateji PX can express in a simple and concise syntax most of the programs that OpenMP can express. The reverse is not true however: OpenMP is mostly only about data parallelism.

How does Ateji PX relate to Java7 ?

Java 7, delayed several times and now announced for mid-2012, is expected to bring two "new" additions to the Java concurrency packages, namely fork/join and parallel array. Both are covered by Ateji PX in a simple and intuitive syntax. With Ateji PX, there is no need to wait for Java 7 to obtain the same results – and in a much simpler way.

How does Ateji PX relate to the Lambda project?

The lambda project by itself does not relate to parallelism. It promises a way to express closures in a reasonably concise syntax, which is required for making the Java 7 parallel array library usable in practice (it can be used without closures but is very verbose). Ateji PX offers a simple and concise syntax for parallelism that does not require the help of closures.

How many cores have you scaled up to?

Current tests have been run on 2 to 16 cores, with a speedup of 12.5x on 16 cores for a simple matrix multiplication algorithm. There is no reason to stop there, other than the availability of test systems, and we are currently planning tests on systems with more cores. If you have a target system on which you would like to evaluate the performance of your parallelized Java programs, please contact Ateji or download an evaluation license from our Web site (www.ateji.com/px). Please let us know what your results are.

How do you detect and prevent data dependencies?

An important aspect of parallel programming on shared memory is indeed to avoid accessing in one branch a value that is yet to be set in another branch. At this time, Ateji PX facilitates the expression of parallel constructs, and because the code is clearer than if you insert threads manually, it makes it easier to understand the dependencies – but the language or the compiler do not prevent the programmer from inadvertently causing a problem. A future release of the compiler (planned for 2011) will introduce dependency checking, and the programmer will be able to insert directives in the code to help the compiler determine which ambiguous situations are actually safe. Because Ateji PX is a compiler, not a preprocessor, it has complete information about the program's use of data elements, and can therefore perform this reasoning.

What is the relationship between a channel and a process?

As Lamport put it, "processes are in the eye of beholder" (http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-132.pdf). While most parallel programming frameworks are based on some notion of processes or tasks, typically without any formal definition, the Ateji PX programming model relies on channels as the basic building block. This is consistent with the mathematical foundation on which Ateji PX is firmly based, namely pi-calculus (http://en.wikipedia.org/wiki/Pi_calculus). In practice, Ateji PX doesn't lock you into any specific framework. It is easy to define your specific notion of process using the primitives of Ateji PX when what you need is processes, or actors, data-flow elements, etc.

How do you declare private vs. shared variables?

OpenMP provides a way to specify whether loop variables must be private or shared. This is required because OpenMP is a set of proprocessor directives that do not integrate tightly into the language. In Ateji PX, the lexical scope of the parallel constructs allow the compiler to determine whether a variable, for example a loop index, needs to be duplicated for each thread, or whether it can be a shared variable. There is no need for a specific private or shared declaration.

What is your relationship with Sun/Oracle, since Java came from Sun?

We are independent of Oracle and their Sun division. Many organizations have developed tools and extensions for the Java language, and a formal relationship with Sun and its successor are not mandatory to do so. There is a strong, independent Java Community that helps evolve the language and environments.

You show the parallel symbol ("||") as the key construct in Ateji PX. What about the square brackets?

The square brackets in Ateji PX play the same role, surrounding a piece of code containing parallel branches, as the braces play surrounding sequential code. Namely, [ || a; || b; ] composes in parallel while { a; b; } composes sequentially. For example, " a ; [ || b || c ] ; d " means that the program must first execute a, then it can execute b and c in parallel, but then both b and c must have terminated before proceeding with the execution of d.

What reference materials do you provide?

Together with the free download, you’ll find the language manual and a large library of code samples.

Is there a training course for Ateji PX?

Yes, we teach a two-day course and we have training materials available for educators.

Where can I learn more about Ateji PX ?

Read the whitepapers:

manual, code samples and API. Follow Ateji's blog. Consult the FAQ.

 

Java Parallel Programming FAQ

Why parallel programming in Java?
How to boost java performance?
Is multicore programming in Java possible?
What is Java concurrency?
How to develop multithreaded Java code?
What is the problem with Java threads?
What are Java parallel extensions?
How to do cloud computing in Java?

Why parallel programming in Java?

It is already impossible to buy single-core desktop PC. Dual-core and quad-core processors are everywhere. Chip-makers have announced plans to launch 80-core processors by 2011. Research labs are prototyping processors that will contain between 500 and 1000 cores. As a consequence, java parallel programming has simply become unavoidable. To unleash the full performance of multicore platforms java developers need to write parallel programs.

How to boost java performance?

The first step to performance is to identify bottlenecks of the Java application using JVM profiling for example. Then the application can be parallelized, either by introducing Java threads, or using a more intuitive language-based solution such as Ateji PX.

Is multicore programming in Java possible?

Java provides built-in support for multithreaded programming. A multithreaded program contains two or more parts that can run concurrently. Each part of such a program is called a java thread and can run on its own core. It is important for a Java programmer to understand both the power and limitations of Java threads.

What is Java concurrency?

Concurrency is the ability to run several parts of a program in parallel.  Java concurrency should improve the performance of a program when two (or more) tasks are performed asynchronously or in parallel.From a technical standpoint, concurrent programming or multithreading are a form of multitasking The book Java Concurrency in Practice by Brian Goetz provides detailed explanations of java concurrency.

How to develop multithreaded Java code?

The Java Thread API allows programmers to write applications that can take advantage of multiple processors. The Java concurrency package provides more high-level functionality. But thread programming poses many difficulties: many developers often find themselves falling prey to problems such as incorrect application behavior.

To simplify Java multi-threading and overcome problems inherent to the use of Java threads, Ateji has developed Ateji PX. Ateji PX is an innovative development tool that makes Java parallel programming simple and intuitive, close to the way we "think" parallel, efficient, and easily accessible to all Java application developers with minimal training. Experience has shown that Java developers on their own were able to compile and run their first multithreaded programs within a couple of hours.

What is the problem with Java threads?

According to Edward A. Lee (University of California at Berkeley), threads seem to be a small step from sequential to parallel computation. But, in fact they represent a huge step. They discard the most essential and appealing properties of sequential computation: understandability, predictability, and determinism

Read more:

What are Java parallel extensions?

Java is sequential in the sense that it requires that statements be ordered. In contrast, a parallel language can compose statements without imposing any ordering on them. A Java parallel extension is a super set of the Java language in which some parallel primitives are added. For example, Ateji PX extends Java with a new symbol || to compose parallel statements.

How to do cloud computing in Java?

Stay tuned! Very soon Ateji will be releasing a cloud computing version of Ateji PX for Java. The same Ateji PX Java source code will run in the cloud and on multicore servers without modifications.

 

SEO by AceSEF