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 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, Ł. Górski, P. Bała PCJ – Java Library for Highly Scalable HPC and Big Data Processing 2018 International Conference on High Performance Computing \& Simulation (HPCS), pp:12-20 IEEE, 2018
- 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
Full paper list can be found here: http://pcj.icm.edu.pl/pcj-papers
Contact: firstname.lastname@example.org email@example.com
- 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.
module load pgi/13.4
module load opempi
mpoexec -hostsfile nodes.unique bash -c 'java -cp pcj.jar PcjExampleHelloWorld'
Linux Cluster with SLURM
#PBS -N go
#PBS -l nodes =128: ppn =1
#PBS -l mem =512 mb
#PBS -l walltime =0:10:00
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
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
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