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
- nodes.unique - file containing list of nodes used to run JVMs. In principle this list contains unique names (no duplicated names). This file is used by the mpiexec or other command to start parallel application.
- nodes.txt - file containing list of nodes used to start PCJ threads.This list may contain duplicated entries showing that on the particular node multiple PCJ threads will be started (within single JVM). The number of PCJ threads used to run application (PCJ.threadsCount()) will be equal to the number of lines (entries) in this file.
Linux Cluster
module load pgi/13.4 module load opempi mpoexec -hostsfile nodes.unique bash -c 'java -cp pcj.jar PcjExampleHelloWorld' |
Linux Cluster with SLURM
#!/bin/csh #PBS -N go #PBS -l nodes =128: ppn =1 #PBS -l mem =512 mb #PBS -l walltime =0:10:00 #PBS module load openmpi cat $PBS_NODEFILE > nodes.txt uniq $PBS_NODEFILE > nodes.unique mpiexec -hostsfile nodes.unique bash -c 'java -d64 -Xnoclassgc -Xrs -cp pcj .jar PcjExampleHelloWorld' |
The job is than executed by submitting it with the qsub command: qsub go.csh
IBM Power 7 (AIX) with Load Leveler
In order to optimize execution on the multinode systems like IBM Power 7, the PCJ application should exclusively use computer nodes. However, the number of applications running on each nodes is 1 which is Java VM. The poe command is
used to invoke Java VM's on the nodes reserved for the execution.
#@ job_type = parallel
#@ node = 2 #@ tasks_per_node= 1 #@ queue
cat $LOADL_HOSTFILE > nodes.txt uniq $LOADL_HOSTFILE > nodes.unique
poe "java -Xnoclassgc -Xmx6g -cp .:pcj.jar PcjHelloWorld" -hfile nodes.unique -statistic print -bindproc yes -task_affinity core |
Cray XC40 with SLURM
#!/bin/bash -l module load java srun hostname > nodes.txt srun -N 132 -n 132 -c 48 java -cp .:PCJ-4.1.0.jar PcjHelloWorld |
The job is than executed by submitting it with the command: sbatch go_xc40.sh
The output is in the file slurm-1234.out (1234 is number of slurm job).
Example output looks as follows:
PCJ version 4.1.0.SNAPSHOT-8f78778 built on 2016-01-09 12:26:58.311 CET.
Starting PcjHelloWorld with 6336 thread(s)...
Hello from thread 0 out of 6336
Hello from thread 2 out of 6336
Hello from thread 1 out of 6336
Hello from thread 247 out of 6336
....