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:
- M. Nowicki, M. Ryczkowska, Ł. Górski, M. Szynkiewicz, P. Bała PCJ - a Java library for heterogenous parallel computing In: X. Zhuang (Ed.) Recent Advances in Information Science (Recent Advances in Computer Engineering Series vol 36) WSEAS Press 2016 pp. 66-72
- M. Nowicki, Ł. Górski, P. Grabarczyk, P. Bała PCJ - Java library for high performance computing in PGAS model In: W. W. Smari and V. Zeljkovic (Eds.) 2012 International Conference on High Performance Computing and Simulation (HPCS) IEEE 2014 pp. 202-209
- M. Nowicki, P. Bała PCJ-new approach for parallel computations in java In: P. Manninen, P. Oster (Eds.) Applied Parallel and Scientific Computing, LNCS 7782, Springer, Heidelberg (2013) pp. 115-125
- M. Nowicki, P. Bała Parallel computations in Java with PCJ library In: W. W. Smari and V. Zeljkovic (Eds.) 2012 International Conference on High Performance Computing and Simulation (HPCS) IEEE 2012 pp. 381-387
Usage of the PCJ:
- M Ryczkowska, M Nowicki, P Bala Level-synchronous BFS algorithm implemented in Java using PCJ Library In: 2016 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA}, 2016, pp. 596-601
- Ł Górski, F Rakowski, P Bała A case study of software load balancing policies implemented with the PGAS programming model In: W. W. Smari, V. Zejkovic (Eds) (eds.) 2016 International Conference on High Performance Computing \& Simulation (HPCS),
IEEE 2016, pp. 443 - 448
- M Ryczkowska, M Nowicki, P Bala The Performance Evaluation of the Java Implementation of Graph500 In: R. Wyrzykowski et all (eds.) Parallel Processing and Applied Mathematics, Springer 2016 pp. 221-230
- Ł Górski, F Rakowski, P Bała Parallel Differential Evolution in the PGAS Programming Model Implemented with PCJ Java Library In: R. Wyrzykowski et all (eds.) Parallel Processing and Applied Mathematics, Springer 2015, pp. 448-458
- M Nowicki, M Marchwiany, M Szpindler, P Bała On-line Service for Teaching Parallel Programming In:Euro-Par 2015: Parallel Processing Workshops, Springer 2015, pp. 78-89
- M. Ryczkowska Evaluating PCJ library for graph problems-Graph500 in PCJ In: W. W. Smari and V. Zeljkovic (Eds.) 2012 International Conference on High Performance Computing and Simulation (HPCS) IEEE 2014 pp. 1005-1007
Contact: bala@icm.edu.pl faramir@icm.edu.pl
The PCJ library was created with some principles.
- Tasks (PCJ threads)
- Each task executes its own set of instructions. Variables and instructions are private to the task. PCJ offers methods to synchronize tasks.
- Local variables
- Variables are accessed locally within each tasks and are stored in the local memory.
- Shared variables
- There is dedicated class called Storage which represents shared memory. Each task can access other tasks variables that are stored in a shared memory. Shareable variable has to have a special annotation @Shared.
There is distinction between nodes and tasks (PCJ threads). One instance of JVM is understood as node. In principle it can run on a single multicore node. One node can hold many tasks (PCJ threads) – separated instances of threads that run calculations. This design is aligned with novel computer architectures containing hundreds or thousands of nodes, each of them built of several or even more cores. This forces us to use different communication mechanism for inter- and intranode communication.
In the PCJ there is one node called Manager. It is responsible for setting unique identifiers to the tasks, sending messages to other tasks to start calculations, creating groups and synchronizing all tasks in calculations. In contrast to our previous version of the PCJ library, the Manager node has its own tasks and can execute parallel programs.
Execution in multinode multicore environment
The application using PCJ library is run as typical Java application using Java Virtual Machine (JVM). In the multinode environment one (or more) JVM has to be started on each node. PCJ library takes care on this process and allows user to start execution on multiple nodes, running multiple threads on each node. The number of nodes and threads can be easily configured, however the most resonable choice is to limit on each node number of threads to the number of available cores. Typically, single Java Virtual machine is run on each physical node although PCJ allows for multiple JVM scenario.
Since PCJ application is not running within single JVM, the communication between different threads has to be realized in different manners. If communicating threads run within the same JVM, the Java concurrency mechanisms can be used to synchronize and exchange information. If data exchange has to be realized between different JVM's the network communication using for example sockets has to be used.
The PCJ library handles both situations hiding details from the user. It distinguishes between inter- and intranode communication and pick up proper data exchange mechanism. Moreover, nodes are organized in the graph which allows to optimize global communication.