Build Packages / Create release (push) Successful in 26s
Build Packages / Build documentation (push) Successful in 1m43s
Build Packages / build:portable:macos-arm64:nocuda (push) Successful in 5m7s
Build Packages / build:portable:linux-x86_64:nocuda (push) Successful in 11m48s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 7m22s
Build Packages / build:portable:linux-x86_64:cuda (push) Successful in 12m24s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m30s
Build Packages / build:portable:windows-x86_64:nocuda (push) Successful in 25m29s
Build Packages / build:portable:windows-x86_64:cuda (push) Successful in 29m41s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 21m44s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 24m41s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 26m9s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 26m3s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 28m28s
Build Packages / Generate python client (push) Successful in 27s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 31m16s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 20m44s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 26m27s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 22m52s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 27m44s
Build Packages / Unit tests (push) Successful in 1h46m55s
Build Packages / Validation Battery (push) Successful in 52m50s
* Rugnux: Several rotation sweeps of one crystal are merged as one dataset (`rugnux a_master.h5 b_master.h5`), on a common indexing and cell, with a non-isomorphous sweep left out and reported; `--sweeps separate` processes each sweep on its own. Bruker `.sfrm` frames and imgCIF files with a full goniometer axis chain are read. * Rugnux: More robust rotation processing - a retry with a more sensitive spot finder when no lattice is found, a self-consistent detector distance, long axes and doubled cells tested as hypotheses, a `-C` supercell multiple stepped down, and each ice ring merged, down-weighted or rejected on its own. * Rugnux: Serial stills are merged with a partiality-aware error model, reported as `ERROR_MODEL_A/B/C` with no ISa or R_merge/R_meas/R_pim; runs without `-S` have an overall intensity scale about 0.86-0.88 times that of earlier versions, with unchanged statistics. A second crystal form is left out of the merge and reported, the indexing ambiguity is resolved more reliably, and `--model` no longer influences processing. * Rugnux: The reported CC1/2 is the standard unweighted one, which can be lower than before on sweeps with weak frames; ISa comes with a 95% interval (`ISA_LOW`/`ISA_HIGH`). * Rugnux: Model refinement adds anisotropic/TLS, local NCS and twin refinement where R-free supports them; building waters and relabelling ions is now off by default (`--refine-solvent` turns it on). * NXmx: A detector of several modules is written as `module_0` ... `module_N` only, so DIALS reads each module as its own panel. * Other: JPEG previews use a bundled encoder (libjpeg-turbo no longer needed), Rugnux prints how to cite it, and the release archives contain the HTML documentation. Reviewed-on: #92 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
40 lines
2.9 KiB
C++
40 lines
2.9 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
// Restrained refinement's targets on a GPU (CUDA builds only): the RefinementEngine of RefinementXray.h with
|
|
// everything per evaluation on the device - the atoms' density (ModelDensityGPU's gather), its transform, the
|
|
// symmetry composed in reciprocal space, the likelihood target, the derivative map by the inverse transform
|
|
// of the target's derivatives and every atom's gradient read off it, and the geometry restraints. The host
|
|
// passes positions in and gets one value and one gradient per atom back.
|
|
|
|
#include <memory>
|
|
|
|
#include "RefinementXray.h"
|
|
|
|
// What an engine holds on its card: its own part; the part the engines like it on the same card share (the
|
|
// reflections' tables and the bulk-solvent mask's buffers), which the first of them there makes; and a lane of the
|
|
// transforms' working buffers, which an engine has to itself or shares with others, one evaluation at a time.
|
|
struct RefinementGPUBytes {
|
|
size_t engine = 0, card = 0, lane = 0;
|
|
};
|
|
|
|
// The engine for refining `model` against `refl` on `device`, or null where the GPU cannot take this case (an
|
|
// atom's box wider than the cell, too many symmetry operators) or its memory is over `budget` bytes.
|
|
// `b_max`: the largest B an atom may reach, which the gather's reserve is sized for. Throws JFJochException on a
|
|
// CUDA failure. `nthreads`: the host threads that work out the atoms' densities. `restraint_records`,
|
|
// `restraint_slots`: the most records (plane atoms included) and gradient slots its two restraint sets hold together,
|
|
// which the memory is worked out for (0: about thirty records and sixty slots per atom).
|
|
std::unique_ptr<RefinementEngine> MakeRefinementEngineGPU(int device, const gemmi::UnitCell &cell,
|
|
const gemmi::SpaceGroup &sg, double d_min,
|
|
const RefinementReflections &refl,
|
|
const gemmi::Model &model, double b_max, size_t budget,
|
|
RefinementGPUBytes *bytes = nullptr, size_t nthreads = 1,
|
|
size_t restraint_records = 0, size_t restraint_slots = 0);
|
|
// An engine like `like` (one the function above made) on `device`: the same case, and on a card where an engine
|
|
// like it is, that card's shared part with it - so it holds RefinementGPUBytes::engine there, and ::lane beside where
|
|
// `own_lane` (else it shares the card's least used lane). Throws JFJochException on a CUDA failure.
|
|
std::unique_ptr<RefinementEngine> MakeRefinementEngineGPU(const RefinementEngine &like, int device, size_t nthreads,
|
|
bool own_lane);
|