-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for debug builds and heap analysis (#687)
* Instructions to build cctbx with debug symbols * Steps for heap analysis in gdb-heap with example data and Dockerfile
- Loading branch information
Showing
3 changed files
with
601 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Fedora 30 image with gdb-heap and cctbx for debugging heap memory | ||
|
||
FROM fedora:30 | ||
|
||
# Install basic utilities, devel packages, debuginfo packages, and gdb-heap | ||
RUN dnf install -y make which dnf-plugins-core && \ | ||
dnf install -y python3-devel glibc-devel glib2-devel openssl-devel && \ | ||
dnf debuginfo-install -y python3 glibc ncurses-libs readline openssl-libs zlib glib2 && \ | ||
dnf install -y gdb-heap | ||
|
||
# Pull in some gdb-heap changes on personal fork | ||
RUN dnf install -y git && \ | ||
cd /usr/share/gdb-heap/ && \ | ||
rm heap/*.py && \ | ||
git init && \ | ||
git remote add origin https://github.com/dwpaley/gdb-heap && \ | ||
git fetch origin && \ | ||
git checkout origin/master | ||
|
||
|
||
# CCTBX system dependencies and directory structure | ||
RUN dnf install -y mesa-libGL-devel | ||
RUN mkdir /img | ||
RUN mkdir /mc3 | ||
|
||
# Conda | ||
RUN cd /mc3 && \ | ||
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh && \ | ||
/bin/sh Miniconda3-*.sh -b -u -p /mc3 | ||
|
||
# Bootstrap.py and conda yml file | ||
RUN cd /img && \ | ||
curl -LO https://raw.githubusercontent.com/cctbx/cctbx_project/master/xfel/conda_envs/psana_environment.yml && \ | ||
curl -LO https://raw.githubusercontent.com/cctbx/cctbx_project/master/libtbx/auto_build/bootstrap.py | ||
|
||
# Set up conda_base environment using mamba | ||
RUN cd /img && \ | ||
source /mc3/etc/profile.d/conda.sh && \ | ||
conda activate base && \ | ||
conda install mamba -c conda-forge -y && \ | ||
mamba env create -f psana_environment.yml -p $PWD/conda_base | ||
|
||
# Get sources and build | ||
RUN cd /img && \ | ||
source /mc3/etc/profile.d/conda.sh && \ | ||
conda activate $PWD/conda_base && \ | ||
python bootstrap.py \ | ||
--builder=xfel \ | ||
--use_conda=$PWD/conda_base \ | ||
--nproc=12 \ | ||
--python=37 \ | ||
--build-dir=build_debug \ | ||
--config-flags="--build=debug" \ | ||
hot update build | ||
|
||
# Modify conda installation to use system python with debug symbols | ||
RUN ln -sf /usr/bin/python3 /img/conda_base/bin/python3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,269 @@ | ||
{ | ||
"__id__": "ExperimentList", | ||
"experiment": [ | ||
{ | ||
"__id__": "Experiment", | ||
"identifier": "7495f08d-d047-4163-93c1-6f5836f7c88b", | ||
"beam": 0, | ||
"detector": 0, | ||
"crystal": 0, | ||
"profile": 0, | ||
"imageset": 0 | ||
} | ||
], | ||
"imageset": [ | ||
{ | ||
"__id__": "ImageSet", | ||
"images": [ | ||
"/global/cscratch1/sd/cctbx/mfxlv0719/testing/results/r0383/001_rg002/data.loc" | ||
], | ||
"single_file_indices": [ | ||
22244 | ||
], | ||
"mask": null, | ||
"gain": null, | ||
"pedestal": null, | ||
"dx": null, | ||
"dy": null, | ||
"params": {} | ||
} | ||
], | ||
"beam": [ | ||
{ | ||
"direction": [ | ||
-0.0, | ||
-0.0, | ||
1.0 | ||
], | ||
"wavelength": 1.3059854075545219, | ||
"divergence": 0.0, | ||
"sigma_divergence": 0.0, | ||
"polarization_normal": [ | ||
1.0, | ||
0.0, | ||
0.0 | ||
], | ||
"polarization_fraction": 0.999, | ||
"flux": 0.0, | ||
"transmission": 1.0 | ||
} | ||
], | ||
"detector": [ | ||
{ | ||
"panels": [ | ||
{ | ||
"name": "Panel", | ||
"type": "SENSOR_UNKNOWN", | ||
"fast_axis": [ | ||
1.0, | ||
0.0, | ||
0.0 | ||
], | ||
"slow_axis": [ | ||
0.0, | ||
-1.0, | ||
0.0 | ||
], | ||
"origin": [ | ||
-170.1070553941832, | ||
170.1923289145582, | ||
-198.4110369068717 | ||
], | ||
"raw_image_offset": [ | ||
0, | ||
0 | ||
], | ||
"image_size": [ | ||
2560, | ||
2560 | ||
], | ||
"pixel_size": [ | ||
0.1328125, | ||
0.1328125 | ||
], | ||
"trusted_range": [ | ||
-1.0, | ||
65535.0 | ||
], | ||
"thickness": 0.0, | ||
"material": "", | ||
"mu": 0.0, | ||
"identifier": "", | ||
"mask": [], | ||
"gain": 1.0, | ||
"pedestal": 0.0, | ||
"px_mm_strategy": { | ||
"type": "SimplePxMmStrategy" | ||
} | ||
} | ||
], | ||
"hierarchy": { | ||
"name": "", | ||
"type": "", | ||
"fast_axis": [ | ||
1.0, | ||
0.0, | ||
0.0 | ||
], | ||
"slow_axis": [ | ||
0.0, | ||
1.0, | ||
0.0 | ||
], | ||
"origin": [ | ||
0.0, | ||
0.0, | ||
0.0 | ||
], | ||
"raw_image_offset": [ | ||
0, | ||
0 | ||
], | ||
"image_size": [ | ||
0, | ||
0 | ||
], | ||
"pixel_size": [ | ||
0.0, | ||
0.0 | ||
], | ||
"trusted_range": [ | ||
0.0, | ||
0.0 | ||
], | ||
"thickness": 0.0, | ||
"material": "", | ||
"mu": 0.0, | ||
"identifier": "", | ||
"mask": [], | ||
"gain": 1.0, | ||
"pedestal": 0.0, | ||
"px_mm_strategy": { | ||
"type": "SimplePxMmStrategy" | ||
}, | ||
"children": [ | ||
{ | ||
"panel": 0 | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"goniometer": [], | ||
"scan": [], | ||
"crystal": [ | ||
{ | ||
"__id__": "crystal", | ||
"real_space_a": [ | ||
-222.2972955511683, | ||
-41.2965106348623, | ||
174.1467507090153 | ||
], | ||
"real_space_b": [ | ||
-103.33443453752878, | ||
49.51322628926664, | ||
-120.16441176066986 | ||
], | ||
"real_space_c": [ | ||
92.17507987837122, | ||
-212.90671971432752, | ||
-166.99252345503376 | ||
], | ||
"space_group_hall_symbol": " P 2yb", | ||
"B_covariance": [ | ||
6.242217995142814e-13, | ||
3.5381572814709006e-29, | ||
-6.905513678763044e-31, | ||
6.08384231650722e-29, | ||
-2.889124671647616e-13, | ||
-6.905513678763044e-31, | ||
-8.396605405985807e-14, | ||
3.5896407093990203e-29, | ||
-5.6387798372321274e-15, | ||
3.5381572814709e-29, | ||
4.090935118309919e-44, | ||
1.5923432458339493e-45, | ||
-8.071819536958297e-45, | ||
-3.3405020297755954e-28, | ||
1.5923432458339493e-45, | ||
-1.474759512932631e-29, | ||
3.972219418729395e-44, | ||
1.3002469340079122e-29, | ||
-6.905513678762954e-31, | ||
1.592343245833949e-45, | ||
8.456107021582891e-45, | ||
2.4193807629954972e-45, | ||
-1.3002469340079125e-29, | ||
8.456107021582891e-45, | ||
1.3886142411592538e-29, | ||
-4.7120302830607594e-45, | ||
6.904935388285311e-29, | ||
6.083842316507218e-29, | ||
-8.071819536958296e-45, | ||
2.4193807629954972e-45, | ||
1.2412037524883292e-44, | ||
6.591140843693228e-29, | ||
2.4193807629954972e-45, | ||
3.278907198566949e-29, | ||
-9.875566816837297e-45, | ||
1.9755743163497954e-29, | ||
-2.8891246716476156e-13, | ||
-3.3405020297755954e-28, | ||
-1.3002469340079125e-29, | ||
6.591140843693229e-29, | ||
2.7277269104050108e-12, | ||
-1.3002469340079125e-29, | ||
1.204232529705231e-13, | ||
-3.2435633045340165e-28, | ||
-1.0617321948770824e-13, | ||
-6.905513678762954e-31, | ||
1.592343245833949e-45, | ||
8.456107021582891e-45, | ||
2.4193807629954972e-45, | ||
-1.3002469340079125e-29, | ||
8.456107021582891e-45, | ||
1.3886142411592538e-29, | ||
-4.7120302830607594e-45, | ||
6.904935388285311e-29, | ||
-8.396605405985803e-14, | ||
-1.474759512932631e-29, | ||
1.3886142411592544e-29, | ||
3.278907198566949e-29, | ||
1.204232529705231e-13, | ||
1.3886142411592544e-29, | ||
5.765858969086308e-13, | ||
-2.5100282058981434e-29, | ||
1.133889577081377e-13, | ||
3.58964070939902e-29, | ||
3.9722194187293953e-44, | ||
-4.712030283060759e-45, | ||
-9.875566816837301e-45, | ||
-3.243563304534017e-28, | ||
-4.712030283060759e-45, | ||
-2.5100282058981431e-29, | ||
4.3235205423795272e-44, | ||
-3.84766471960851e-29, | ||
-5.638779837232125e-15, | ||
1.300246934007912e-29, | ||
6.904935388285311e-29, | ||
1.9755743163497954e-29, | ||
-1.0617321948770823e-13, | ||
6.904935388285311e-29, | ||
1.1338895770813767e-13, | ||
-3.84766471960851e-29, | ||
5.638307627221821e-13 | ||
], | ||
"ML_half_mosaicity_deg": 0.02671803039672302, | ||
"ML_domain_size_ang": 1157.1578753362692 | ||
} | ||
], | ||
"profile": [ | ||
{ | ||
"__id__": "gaussian_rs", | ||
"n_sigma": 3.0, | ||
"sigma_b": 0.051725474584042676, | ||
"sigma_m": 0.0 | ||
} | ||
], | ||
"scaling_model": [] | ||
} |
Oops, something went wrong.