PCJ is a library for Java language that helps to perform parallel and distributed calculations. The current version is able to work on the multicore systems connected with the typical interconnect such as ethernet or infiniband providing users with the uniform view across nodes.

Download PCJ library (jar file of 29.04.2017 ver. 5.0.6)  Latest (bug fixing release)!

Download PCJ manual (pdf) for PCJ 5 New!

The PCJ library can be used with no cost at BSD license. It requires Java 8 and no additional tools or comilers.  The PCJ library for Java 7 is available in the dowload section.

The source code is available at GitHub: https://github.com/hpdcj/pcj

Version 5.0.6 fixes some bugs occuring with the massive communication.

Version 5.0.3 contains support for Intel KNL chips.

Version 5 introduces asyncPut() and asyncGet() methods; put() and get() methods are now synchronous. There is new handling of shared variables. The code developed for PCJ 4 hast to be modified. For details please reffer to the JavaDoc file.

The usage should be acknowledged by reference to the PCJ web site and/or reference to the papers:

Usage of the PCJ:

Contact: bala@icm.edu.pl faramir@icm.edu.pl

Number of tasks, tasks id's

PCJ library offers two useful methods:

public static int PCJ.threadCount()


which returns number of tasks running and


public static int PCJ.myId()


which returns id of the task. Task id is integer value of the range from 0 to PCJ.threadCount()-1.

Task synchronization

PCJ offers PCJ.barrier() method which allows to synchronize all tasks. While this line is reached, the execution is stopped until all tasks reach the synchronization line.


public static void PCJ.barrier()


Remember, that this line has to be executed by all tasks. The user can provide argument to barrier() which is integer id of the task to synchronize.

public static void PCJ.barrier(int id)


In this case two tasks are synchronized: one with the given id and one which starts s{\tt barrier()} method. Please note that both tasks have to execute method.