-
Notifications
You must be signed in to change notification settings - Fork 0
How to Install and Run
In order to provide Fiji an OpenMPI support we need to add scijava-parallel-mpi-1.0-SNAPSHOT.jar
to its classpath.
To build the extension from the source codes, download the code from Github https://github.com/fiji-hpc/scijava-parallel-mpi
and run build.sh
script which will take care of compilation and installation of the final jar file into the default Fiji plugin directory.
git clone https://github.com/fiji-hpc/scijava-parallel-mpi
cd scijava-parallel-mpi
./build.sh
After the script is complete, you should be able to find the package installed in Fiji.app/jars/scijava-parallel-mpi-1.0-SNAPSHOT.jar
TBD
This section illustrates the parallel execution on IT4Innovations clusters. Nevertheless, OpenMPI environment is so widespread environment that the following commands will work (with some parameter modifications) on almost any cluster or supercomputer.
-
Start a new MPI interactive job on Salomon with 2 nodes and 1 hour walltime
qsub -q qexp -l select=2:ncpus=24:mpiprocs=1:ompthreads=24,walltime=01:00:00 -I -X
-
Set up an environment with Java and OpenMPI libraries
module load Java/1.8.0_144
module load OpenMPI/4.0.0-GCC-6.3.0-2.27
In order to run the script without OpenMPI you would normally use, e.g.,
~/Fiji.app/ImageJ-linux64 --ij2 --headless --console --run scijava-parallel-mpi/scripts/canny.py 'input_path="/home/user/FluorescentCells.tif",output_path="output_canny.tif"'
- To execute the script parallel you need to run it in OpenMPI environment using
mpirun
and specify the number of instances-np 2
( as we have in the previous command allocated 2 nodes withqsub
call).mpirun -np 2 --bind-to none ~/Fiji.app/ImageJ-linux64 --ij2 --headless --console --run scijava-parallel-mpi/scripts/canny.py 'input_path="/home/user/FluorescentCells.tif",output_path="output_canny.tif"'
Because Fiji internally uses threads, it is recommended to add --bind-to none
option.
For the debugging purposes we can add additional options, where --merge-stderr-to-stdout
merges stderr to stdout for each process, --timestamp-output
puts timestamp to each line of output to stdout, stderr, and stddiag, --tag-output
tags each line with the process jobid and MPI_COMM_WORLD rank of the process that generated the output, and the channel which generated it. Final command with debug outputs running on 2 nodes using OpenMPI can look like
mpirun -np 2 --bind-to none --tag-output --timestamp-output --merge-stderr-to-stdout ~/Fiji.app/ImageJ-linux64 --ij2 --headless --console --run scijava-parallel-mpi/scripts/canny.py 'input_path="/home/user/FluorescentCells.tif",output_path="output_canny.tif"'