-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
285 lines (219 loc) · 11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
PPM_RC program README
=======================
v1.0, Feb 2016
Introduction
------------
Purpose : 2D-3D distributed parallel region competitioni[1] segmentation algorithm
Images can be so large that they do not fit the main memory of a single computer.
We address this issue by developing a distributed parallel algorithm for segmentation
of large fluorescence microscopy images.
The algorithm is based on the versatile Region Competition[2] method, which has
previously proven useful in microscopy image analysis.
The present distributed implementation decomposes the input image into smaller sub-images
that are distributed across multiple computers. Using network communication, the computers
orchestrate to collectively solve the global segmentation problem.
[1] Y. Afshar, and I. F. Sbalzarini. A Parallel Distributed-Memory Particle Method
Enables Acquisition-Rate Segmentation of Large Fluorescence Microscopy Images.
PLoS ONE 11(4):e0152528, 2016.
[2] J. Cardinale, G. Paul, and I. F. Sbalzarini. Discrete region competition for unknown
numbers of connected regions. IEEE Trans. Image Process., 21(8):3531–3545, 2012
Initial release of PPM_RC source program.
Getting the code
------------
You can download the latest version from here (https://github.com/yafshar/PPM_RC).
The very latest version is always available via 'github' by invoking one of the following:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
## For the traditional ssh-based Git interaction:
$ git clone [email protected]:yafshar/PPM_RC.git
## For HTTP-based Git interaction
$ git clone https://github.com/yafshar/PPM_RC.git
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Package contents
----------------
The package you checked out by GIT access should contain on the toplevel the
following files and directories:
-----------------------------------
34K COPYING The License
7.5K COPYING.LESSER
38B Makefile.am
4.2K Makefile.in The Makefile template used by configure
653B NOTICE
14K README This file
28K README.md
46K autogen.sh
42K config.guess
35K config.sub
524K configure The build configure script
11K configure.ac Thie build configure script template
14K install-sh
405B settings.in
782B m4 Contains build scripts
1.1K src Contains the source code
204B utils Contains the PPM_RC debug utility
----------------------------------
After you compile PPM_RC there will be further directories for the binaries
and include files.
Requirements for building PPM_RC
----------------------------------
- Fortran compiler with Fortran 2003 support
- C compiler
- C++ compiler
- METIS 5: You may download the latest release of METIS 5 from
http://glaros.dtc.umn.edu/gkhome/metis/metis/download.
- An MPI distribution (recommended): Either get OpenMPI, mpich2 or any other MPI-3
compliant MPI library. If you are compiling PPM_RC on a cluster, most likely your
sysadmin will have already an MPI installed on the system.
- PPML & PPM core:
This PPM_RC is based on PPML and PPM core 1.2.2 latest development version
(object-oriented Fortran 2003) and can only be linked against this version.
Please first check out the latest PPM development version (object-oriented
Fortran 2003) by anonymous Git access:
For the PPML language and compiler: git clone http://ppm.mpi-cbg.de/git/cg.git
For the PPM library core: git clone http://ppm.mpi-cbg.de/git/ppm.git
For more information and Installation Manual Please refer to:
http://mosaic.mpi-cbg.de/?q=downloads/ppm_lib
Compile PPM core 1.2.2 latest development version before attempting to
compiling this package.
Make sure that all requirements are compiled with the same compiler that you
will be using to build PPM core.
- TIFF Library
For handling huge images, or very large collections of images, breaking the
4 gigabytes boundary, you need a TIFF Library which supports BigTIFF.
- BOOST C++ Library
For more information Please refer to:
http://www.boost.org/
Building PPM_RC
-----------------
PPM_RC is built in 3 simple steps:
Step 1: Confguring PPM_RC
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Run the `configure` script to allow the build system to determine the correct
options to compile PPM_RC.
It is very important to give `configure` the correct settings to make sure PPM_RC
is compiled correctly. To find out which settings are supported type
~~~~~~~~~~
$ ./configure --help
~~~~~~~~~~
This is what will be returned:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
`configure' configures PPM_RC to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
-V, --version display version information and exit
By default, `make' will create an executable file in
$ppm_rc_root/run.
For better control, use the options below.
Optional Features:
--enable-mpi use MPI (default is no), If the MPI implementation
of your choice provides compile wrappers that are in
PATH, I can set them myself, choose: guess (I will
choose the first implementation I can find). Else,
set CC, CXX and FC to the appropriate compiler
wrappers (safest)
--enable-debug enable debug data generation (default is no)
--enable-linux compile for linux (default is no)
Optional Packages:
--with-ppm=path set the path to the ppm core library - THIS FLAG IS MANDATORY
--with-metis=path user defined path to METIS library
--with-boost=path Specify the root directory for boost library
--with-tiff=path user defined path to TIFF library
Some influential environment variables:
FC Fortran compiler command
FCFLAGS Fortran compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CC C compiler command
CFLAGS C compiler flags
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
CLIBS libraries to pass to the linker for C compiler, e.g. -l<library>
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to the package provider.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Following options are especially important:
- `--enable-mpi`: If you will be running PPM_RC on a parallel environment
(a cluster) using MPI.
If your system is properly configured then this should be enough
information for PPM_RC build system to find the MPI libraries and compiler
wrappers needed. If this goes wrong, you may ommit this option and set
compiler wrapper and libraries in `FC` and `LDFLAGS` respectively.
- `--enable-linux`: Set this if you're compiling/running on a Linux system
- `--prefix`: If you like to install PPM_RC and the target directory is not the
system's standard directory (`/usr/`) then you have to define this directory
here. You must provide the full path.
It is not necessary to install PPM_RC.
Building it and leaving it in the compilation directory is sufficient. If you
provide a directory here it must already exist - it will not be created by the
build system.
- `FC` etc.: If you wish to not use MPI or you have to specify exactly which
compiler executable should be used, then you can use this flag to set your
compiler.
- `LDFLAGS`: If metis was not installed in one of the system's standard library
directories (e.g. `/usr/lib`) you must specify the directory to the libmetis.a
file here.
Here two examples on how you could run the configure command
`.configure` on Linux cluster using OpenMPI (and intel compilers, wrapped)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ ./configure CPP=cpp --enable-mpi --enable-linux --with-ppm=/home/usr/ppmcore
--with-metis=/home/usr/metis --with-boost=/home/usr/boost_1_58_2 --with-tiff=/home/usr/tiff4
~~~~~~~~~~~~~~~~~~~~~~~~~~~
`./configure` on Mac OS X workstation with HomeBrew compilers
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ ./configure CPP=cpp-5 --enable-mpi --with-ppm=/home/usr/ppmcore
--with-metis=/home/usr/metis --with-boost=/home/usr/boost_1_58_2 --with-tiff=/home/usr/tiff4
~~~~~~~~~~~~~~~~~~~~~~~~~~~
`./configure` on a computer with OpenMPI installed in a non-standard location
~~~~~~~~~~~~~~~~~~~~~~~~~~~
./configure --enable-mpi FC=/opt/openmpi/1.10.2/bin/mpif90 CC=/opt/openmpi/1.10.2/bin/mpicc CXX=/opt/openmpi/1.10.2/bin/mpic++
--with-ppm=/home/usr/ppmcore --with-metis=/home/usr/metis --with-boost=/home/usr/boost_1_58_2 --with-tiff=/home/usr/tiff4
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 2: Compiling PPM_RC
~~~~~~~~~~~~~~~~~~~~~~~~~~
If the configure process finished successfully you should see on your screen a
message that the Makefile has been generated (and you can now find this
Makefile in this directory).
Now you can simply run make to compile PPM_RC:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ make
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you encounter problems in the compilation process (compile errors) please,
first check if you have set everything correctly in your environment. If the
error persists, please send us a bug-report detailing the previous steps you
have performed. Also, please include the `config.log` file and the output of
`export`. Finally, if yu are using MPI, please include which MPI library you are
using.
Step 3: Installing PPM_RC (optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you wish to install PPM_RC you can now use the `make install` command to do
so:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ make install
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the target directory is part of the system, you will most probably get a
message that you have insufficient rights. If you have a root account you can
use in this case the sudo command to override this security setting.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ sudo make install
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your PPM_RC is installed.
Enjoy the PPM_RC experience!
Examples
------------
If you want to try some examples, make sure the submodule Example is up to date.
You can do this by running the following commands from the root of PPM_RC directory.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ git submodule init
$ git submodule update
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contributors
------------
PPM_RC package maintainer: Yaser Afshar <[email protected]>