Skip to content

Commit 34a38e1

Browse files
c-mitagraeme-winter
authored andcommitted
Update README.md
1 parent 8eaacae commit 34a38e1

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

README.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,47 @@ series of datasets named `data_000001`, `data_000002`, etc.
2929

3030

3131
## Building
32-
First ensure that the HDF5 libraries are compiled with:
3332

33+
### Building HDF5 library
34+
The HDF5 library used when building durin must have been compiled with specific switches enabled
35+
to allow the durin plugin to be built and used.
36+
37+
Download the HDF5 source code (https://www.hdfgroup.org/downloads/hdf5/source-code) and extract
38+
to any directory (referred to as `/hdf5_dir`), and run the following commands.
3439
```
40+
cd /hdf5_dir
41+
mkdir build
42+
cd build
3543
export CFLAGS=-fPIC
36-
./configure --enable-threadsafe=yes --enable-unsupported
44+
../configure --enable-threadsafe --enable-deprecated-symbols --enable-hl --enable-unsupported
45+
make
46+
make check
47+
make install
3748
```
49+
The hdf5 tools and libraries should now be located in `/hdf5_dir/build/hdf5`
3850

39-
former is neeed to ensure that XDS in parallel mode will work, latter
40-
to ensure that the chunk read (which for opaque reasons is defined to
41-
be _high level_) works. Then make sure that wherever this was
42-
installed, the h5cc is in PATH before:
51+
For reference, the plugin requires the thread-safe switch and the optimised chunk read function.
52+
The chunk read function may be defined in the high level library instead of the regular library,
53+
depending on the exact HDF5 version downloaded (hence the --enable-deprecated-symbols _and_ --enable-hl).
54+
The unsupported flag enables building with both threadsafe and high-level enabled.
4355

56+
57+
### Building durin plugin
58+
The plugin makefile will use the "h5cc" compiler wrapper, provided by the HDF5 library, which
59+
must be on your PATH.
60+
Download or clone the plugin source code (https://github.com/DiamondLightSource/durin)
61+
into any directory (referred to as `/durin_dir`) and run the following commands.
4462
```
45-
cd durin
63+
cd /durin_dir
64+
PATH=/hdf5_dir/build/hdf5/bin:$PATH
4665
make
4766
```
67+
The plugin is located at `/durin_dir/build/durin-plugin.so` and should be added to the
68+
XDS.INP file as `LIB=/durin_dir/build/durin-plugin.so`
69+
4870

49-
Plugin file is `build/durin-plugin.so` - this should be added to the
50-
XDS.INP file i.e. as:
5171

72+
## Example XDS.INP
5273
```
5374
DETECTOR=PILATUS MINIMUM_VALID_PIXEL_VALUE=0 OVERLOAD=4096
5475
LIB=/opt/durin/build/durin-plugin.so
@@ -57,7 +78,6 @@ SENSOR_THICKNESS= 0.450
5778
!SILICON= 3.953379
5879
DIRECTION_OF_DETECTOR_X-AXIS= 1.00000 0.00000 0.00000
5980
DIRECTION_OF_DETECTOR_Y-AXIS= 0.00000 1.00000 0.00000
60-
NX=2070 NY=2164 QX=0.0750 QY=0.0750
6181
DETECTOR_DISTANCE= 194.633000
6282
ORGX= 1041.30 ORGY= 1160.90
6383
ROTATION_AXIS= 0.00000 -1.00000 -0.00000
@@ -74,4 +94,4 @@ JOB=XYCORR INIT COLSPOT IDXREF DEFPIX INTEGRATE CORRECT
7494
```
7595

7696
N.B. the master file is needed, not the .nxs one which follows the
77-
standard.
97+
standard.

0 commit comments

Comments
 (0)