FSL 6.0.7.19, 4th November 2025
- New fsl-mmorf-cpu:
- ciftilib 1.6.0 -> 1.7.0
- fsleyes 1.14.2 -> 1.16.2
- fsleyes-plugin-mrs 0.1.2 -> 0.1.4
- fslpy 3.22.0 -> 3.24.0
- fsl-add_module 0.5.1 -> 0.6.0
- fsl-base 2504.3 -> 2508.1
- fsl-bet2 2111.8 -> 2111.9
- fsl-eddy_qc v1.3.0 -> v1.4.1
- fsl-film 2111.1 -> 2111.2
- fsl-gps 2211.1 -> 2509.0
- fsl-installer 3.16.8 -> 3.17.0
- fsl-miscmaths 2412.4 -> 2412.6
- fsl_mrs 2.4.3 -> 2.4.10
- fsl-newmesh 2111.2 -> 2111.3
- fsl-ptx2 2111.5 -> 2111.8
- fsl-pyfeeds 0.15.0 -> 1.1.0
- fsl-pyfix 0.9.0 -> 0.10.0
- fsl-sub 2.8.4 -> 2.10.0
- fsl-sub-plugin-sge 1.5.4 -> 1.5.5
- fsl-sub-plugin-slurm 1.6.7 -> 1.6.8
- fsl-utils 2412.1 -> 2412.6
- fsl-mmorf v0.4.2 -> v1.0.0
ciftilib 1.6.0 -> 1.7.0
- MNT: Bump ABI 1.7
The
libxmlppchanges are not ABI-compatible, due to the removal of glibmm/etc. On macOS, executables must directly link against the ciftilib dependencies, even though they are not used directly. So this means that e.g.flameowas complaining about not being able to findlibglibmm.so.
Detailed history
fix typo in commentprotect against nan/inf in nifti scl_* fieldscopy/paste typo in error messageimprove IO error checkingMNT: Various modernising changes, applied to FSL v1.6.0 CiftiLib build from FSL 6.0.6.3 through 6.0.7.18: - Compile with C++17 - Build against libxml-4.0 - boost::filesystem function name changes - Use std::mutex rather than Glib::mutexMNT: Update Cmake config to libxml++-5.0. Remove glibmmMNT: Replace use of glib functions with std/boost functions (std library not good at locale conversion)BF: Was creating locale obj incorrecltyMNT: Revert to ABI 1.6, so we don't need to change pins/rebuild other packages. Adjust example/CMakeLists.txt so examples can be installed as executablesMNT: Bump ABI 1.7 - the libxmlpp changes are _not_ ABI-compatible, due to the removal of glibmm/etc (on macOS, executables directly link against the ciftilib dependencies)
fsleyes 1.14.2 -> 1.16.2
- BF: Fix Tools menu item bug
Whenever a view panel is added or removed, the
FSLeyesFramere-creates the Tools menu items, and any associatedActioninstances. The frame was destroying plugin-provided view panel actions, such as the Seed correlation action, with the effect that, when new a view was added (or one removed), these menu items would break.
The FSLeyesFrame does not destroy Action items that are associated with the view, as they may be bound to instance methods (e.g. OrthoPanel.screenshot).
As the plugin-povided view panel actions are created and exclusively owned by ViewPanel instances, I am going to consider them as equivalent to actions provided by instance methods. So they are now marked as being "instanced-owned", and the FSLeyesFrame will not destroy them when the Tools menu is re-created.
- MNT: Need to tell setuptools-scm that we use release branches
- CI: Fix execution of check version script
- CI: Add output to check version script
- DOC: Clarify wxpython/GLX situation
Detailed history
BF: Prevent FSLeyesFrame from destroying ViewPanel-owned plugin actionsTEST: Regression testMNT: Need to tell setuptools-scm that we use release branchesCI: Fix execution of check version scriptCI: Add output to check version scriptDOC: tweaks to install docsDOC: Various fixes, make sure sphinx reads version correctlyCI: Fix zenodo submissionCI: Use fsleyes docker image to reduce downloadDOC: Changelog fixDOC: Clarify wxpython/GLX situationCI: Hopefully fix zenodo submission
fsleyes-plugin-mrs 0.1.2 -> 0.1.4
- Refactored code and added tests
- Code refactoring to split classes into thematic files
- Added unit tests for each class
- Updated gitlab-ci to run tests on: a) Python 3.12 for every commit, b) Python 3.9 - 3.13 for merge requests
- Updated Python requirement on setup.py to >=3.9
- Bugfix on toggling the Ortho panel when loading MRSI results
- CI build and deployment
- Added version.py that controls version number and compares against gitlab tag
- Added test stage for build_pypi_dist script. The script also runs a test if fsleyes screen matches benchmark for docker.
- Added pypi build stage in CI, if tag matches version.py number
- Added pypi deploy stage in CI that triggers manually
- Removed manual_build_instructions.md file
- New features: Link Phase, Link Apod, Link Proj Updates in Views:
- Added "link Phase" widget that links zeroth and first order phase correction across spectra/overlays
- Added "link Apodization" widget that links apodization across spectra/overlays
- Adapted "plot real/imag/magn/phas" widgets to automatically plot projections across spectra/overlays ("link Proj")
- Updated default background and grid colours
Updates in Controls: - Redesign of MRS Control Panel to accommodate View's Updates - Added "Overlay List" toggle on MRS Toolbar
Updates in Profiles: - Update MRSViewProfile to work with relative positional and phase correction changes - First order phase correction is now relative to dataseries's spectral frequency - Bug fix on mouse position to match screen's DPI scaling - Removed 'all' option from MRSViewProfile
Updates in Series:
- Parent class changed to VoxelPowerSpectrumSeries
- Added 'apodize' function applied when pulling voxel data
- Changed first order phase correction to milliseconds
Updates in Tests: - Added MRSI test data - Wrote tests for "link Phase", "link Apod" and "link Proj" features - Wrote tests for default prop values and background/grid colours - Wrote tests for MRS Control Panel widgets - Wrote tests for 'apodize' function - Removed tests for 'defaultLayout' - Doc: 0.1.3_changes Update documentation with the changes introduced in 0.1.3 - Improved MRSI results versatility * Added FileTree functionality for defining MRSI results structure * Added colourscheme.json functionality for defining the colours to be displayed in MRSView for spectra and Ortho Panel for overlays * Wrote FileTree and Colourscheme rules for developers * Improved handling of Ortho Panels if multiple MRSI results are loaded * Renamed functions and titles to be generic for any MRS software used * Wrote unit and integration tests for tools.py * Updated documentation
Detailed history
Refactored code and added testsCI build and deploymentNew features: Link Phase, Link Apod, Link Projupdated version and changelog for 0.1.3 release + changed doc building for releases onlybug fix on build_pypi_distfurther improvements on build pypi dist with fsleyes cleanupUpdate doc for v0.1.3Improved MRSI results versatility
fslpy 3.22.0 -> 3.24.0
- MNT: Minor adjustment to
holdfunction There is no need for theholdfunction to submit itself with ajobtime- it will sit in the queue until the held job completes, then will run more or less instantly. - BF: Fixes to
gpswrapper Thegpscommand accepts an output file prefix, not a full file name. It can also accept more than one value for the--ndiroption.
It turns out that the gps command-line help was also incorrect - this has been fixed.
setuptools-scm is now used for automatic version number management.
- BF: Bugfix in fslstats wrapper
The fslstats wrapper was alreaday handling missing values, but only for single-dimensional output. It now handles missing values for multi-dimensional outputs.
- CI: Change docker image for pypi build job
- CI: Adjust pypi build job
Detailed history
MNT: No need to specify jobtime for the hold job, as it will sit in the queue until the held job completes, then will run essentially instantlyBF: gps command accepts an out file prefix, not full file name. And can also accept more than one value for --ndirMNT: Switch to setuptools-scm for automatic version number managementDOC: Update contributing guideTEST: Failing fslstats unit testBF: Handle missing values in fslstats output in multi-dimensional outputDOC: Update release management procedureDOC: Mention setuptools-scmCI: Run version check as part of pypi build jobCI: Change docker image for pypi build jobCI: Adjust pypi build job
fsl-add_module 0.5.1 -> 0.6.0
- RF: Prompt user if they would like to remove archive directory
The
fsl_add_modulecommand now asks the user if they would like to remove the archive directory - this may be useful for people with limited disk space. This can be done automatically with the new--removecommand-line flag.
This MR also fixes an issue where the presence of a file or directory with the same name as an official manifest (e.g. ~/fslcourse) would cause fsl_add_module to try to load it as the manifest.
Detailed history
BF: Don't try to load e.g. ./fslcourse as a manifestMNT: Use setuptools-scm for version number managementRF,MNT: Change default behaviour to not delete archive dir - this is what happens with --force. Add new --remove flag which does cause dir to be deleted. Use importlib to retrieve version numberTEST: Update unit tests for new expected user input (prompt to remove archive dir)TEST: Tests for removing archive dirCI: Drop py38/py39, add py312, py313BF: Copy-paste error, wrong package name
fsl-base 2504.3 -> 2508.1
- ENH: Add support for linux/aarch64; simplify
fslversionThefslversionscript had some flaky logic to try and parse the commands in the conda environment revision history, so it could print e.g. "Install FSL 6.0.7.18". This has been removed, and now the raw commands are printed (the only sanitisation step being replacing the full/path/to/fsl/with literal$FSLDIR). - TEST: Adjustment to unit tests
pyfeedsnow runs tests from a copy, not from within the source directory. However, it sets aPYFEEDS_FEEDSRUN_PATHenvironment variable which allows us to get the originalfeedsRunlocation (and thus refer to other source files relative to that location). - TEST: More fixes to unit tests
Detailed history
MNT: Add aarch64 identifierMNT: Simplify fslversion - don't bother trying to sanitise/simplify env revision history, just replace /path/to/fsldir/ with "$FSLDIR"ENH: Print list of installed extras when --extra providedTEST: pyfeeds now runs tests from a copy, not within source directory. Use pyfeeds env var to get path to original feedsRun locationTEST: THISDIR was being set to feedsRun path, not its containing directory
fsl-bet2 2111.8 -> 2111.9
Detailed history
ENH: Alternate mask, mesh generation mode
fsl-eddy_qc v1.3.0 -> v1.4.1
- RF: Adjust
eddy_quadso it reads the eddy--b_rangeoption value if present, and falls back to 100 - MNT: Remove unused import
The
PdfMergerclass is: - Not used by
eddy_qc - No longer in the
pypdflibrary (so was causing the code to break)
Detailed history
RF: Adjust eddy_quad so it reads eddy --b_range option if present, and falls back to 100MNT: Use setuptools-scm for version controlMNT: Remove unused import (which has also been removed from pypdf)MNT: Remove spurious entry from pyproject.toml
fsl-film 2111.1 -> 2111.2
- Fix surface processing bug This MR fixes a bug in surface processing
Detailed history
ENH: Handle zero-data as long as no smoothing occursDBG: UnmaskingDBG: Beta candidateBF: TypoBF: Another typo
fsl-gps 2211.1 -> 2509.0
Detailed history
BF: Fix help text
fsl-installer 3.16.8 -> 3.17.0
Detailed history
ENH: Detect linux/aarch64CI: Update runner tagsTEST: MAke tests platform agnostic
fsl-miscmaths 2412.4 -> 2412.6
- MNT: Add
.gitattributesfile so thatgit lfsworks properly. This should have been included when the test data was first added. - ENH,RF: Add new
CorrectConstantextrapolation type, which initialises coefficient field with correct boundary condition This MR adds support to theSplinterpolatorclass for a new extrapolation type calledCorrectConstant, which is equivalent to the existingConstantextrapolation type, but with a different boundary condition method for initialising the spline coefficient field. The existingConstantmethod sometimes results in artifacts in extrapolated areas - the newCorrectConstantmethod allows these artifacts to be avoided.
Input image:

Constant extrapolation (focus on the coronal view):

CorrectConstant extrapolation:
- TEST: Allow splinterpolator tests to run against either in-source or installed version.
Detailed history
MNT: Add gitattributes file so that LFS works properly. This should have been included when the test data was first addedENH,RF: Add new "CorrectConstant" extrapolation type, which initialises coefficient field with correct boundary conditionTEST: Re-arrange tests, make easier to extend. Add "sphere" tests, haven't added data yetTEST: Update benchmarks, add new sphere datasetTEST: Allow tests to run either in-source or against installed version. The __has_include macro should work with both g++ and clang
fsl_mrs 2.4.3 -> 2.4.10
- Doc: Fitting models
- Updated documentation and doc strings around fitting models.
- Added
--inversion_modeloption tofsl_dynmrsto allow modelling of inverted peaks. - Added documentation page about spatial information with how to create a SVS mask in T1 space.
- [ENH] Dask and verbosity
fsl_mrs_simnow uses Dask for parallel processing.- Can suppress verbose output when simulating.
- ENH: Xnuc simulation
- The basis set simulator can now be passed a
"Nucleus"field to enable simulation of 2H, 13C and 31P nuclei. - MM seeds passed to
fsl_mrs_simwill have central frequencies and dwell times lightly modified to match other simulated bases - Automatic conjugation for
basis_tools add_set - ENH: Add nucleus awareness to basis tools.
- Added nucleus awareness to
Basisclass. This will apply the correct ppm reference shift each nucleus inbasis_tools vis. Previously 1H (and 4.65 ppm shift) was assumed. - When converting basis sets from LCModel format (.basis) using
basis_tools convertthe user can now specify--nucleus. - Bf: Fix variable dyn grads
Fixed a bug in the dynamic fitting module (
fsl_dynmrs) where the calculation of analytical gradients was incorrect forvariableparameters.
Tests added to check against numerical gradients. - ENH: LCM preproc - Improved data scaling approach for dynamically fitted MRSI data. Closer match to single voxel approach. - (Python API Only) Implemented LCModel's Phasta and cross-correlation processing for frequency and phase alignment. - Adjusted 2H water shift constant to 4.8 ppm - BF: detect_conjugation Fixed bug in detect_conjugation, missing divide by length after original refactor
Detailed history
Doc: Fitting models[ENH] Dask and verbosityENH: Xnuc simulationENH: Add nucleus awareness to basis tools.Bf: Fix variable dyn gradsENH: LCM preprocBF: detect_conjugation
fsl-newmesh 2111.2 -> 2111.3
Detailed history
MNT: Remove dependence on boost
fsl-ptx2 2111.5 -> 2111.8
- Change integer data types used for indexing large arrays Change use of int to store data array sizes / indexes to size_t. This avoids problems on GPUs with large amounts of memory where the sizes of arrays can exceed the storage range for an int.
- ENH: New
fsl_streamlinestool This MR adds a newfsl_streamlinescommand, which can be used to generate a streamline tractogram fromprobtrackx2/xtractoutputs. Thefsl_streamlinestool requiresprobtrackx2to be run with the--opathdiroption, which generates afdt_paths_localdir.nii.gzfile containing per-voxel average tract orientations.
The tool was originally written by Saad Jbabdi, and cleaned up/refactored by Martin Craig and Paul McCarthy.
- RF: Ensure that streamlines have length at least 2
The --min-steps option is now restricted so that it cannot be less than 2.
- BF,RF: Fix bug when using --jitter and --seeds-per-voxel; adjust --save-overlay option.
This MR fixes a bug which would occur when using --jitter and --seeds-per-voxel N with N greater than 1, and would result in an IndexError.
The --save-overlay option (-so for short) has also been adjusted - previously it was configured with nargs='*', so would consume any number of values, e.g.:
However, the main input argument is configured similarly, with nargs='+', which restricts how --save-overlay can be specified.
To work around this conflict, --save-overlay has been adjusted so that it only accepts one value, but can be specified more than once, e.g.:
fsl_streamlines --seed-mask option, and bug fix
New --seed-mask option to fsl_streamlines, allowing seeds to be defined with a mask.
Fixed a bug which would cause an error when seeding from a voxel with null/zero orientation.
Change streamlining behaviour so that if only one of forward- or backward-tracking produces a streamline, the streamline is kept. The previous behaviour would discard a streamline if either forward- or backward-tracking did not produce anything.
- BF: Limit maximum RAM allocation size and change datatypes to avoid memory overflow
This change limits the maximum GPU RAM allocation size used by probtrackx2_gpu, and changes some datatypes to avoid overflows. The maximum memory used is clamped at 32GiB.
This fix was contributed by Chris Rorden
Detailed history
TEST: Basic streamline testsMNT: Makefile rule for installing fsl_streamlinesMNT: Remove .gitignoreRF: Ensure that streamlines have length at least 2.RF: Change --save-overlay to accept one image, but also so it can be used multiple times. Otherwise nargs='*' conflicts with input (nargs='+')BF: Offsets array pre-allocation was not taking into account jitter/seeds_per_voxelDOC: Note in --save-overlay helpTEST: Smoke tests for -j -spv and -soChange integer data types used for indexing large arrays Avoids problems on GPUs with large amounts of memoryMake indexing consistent between gpu and cpu versionsMNT: Add __main__ module for convenienceRF: Keep streamlines where either forward or backward tracking produced somethingBF,RF: Incorrectly returning tuple of Nones - original code was returning streamline+sampled densities, but was refactored to just return streamline. Return None instead of empty streamlinesENH: New --seed-mask option, allowing seeds to be specified with a mask imageMNT: Report number of streamlines, and if no streamlines generatedTEST: Test --seed-mask optionTEST: Test seeding from a voxel without orientationRF: Don't apply density threshold to seed mask, as it doesn't make sense in my opinion. Easy for user to create whatever binary mask they need.MNT: Clarify help textBF: Limit maximum RAM allocation size and change datatypes to avoid overflows. Authored by Chris Rorden
fsl-pyfeeds 0.15.0 -> 1.1.0
- ENH: Allow tests to be run on cluster via
fsl_subThis MR makes several changes to the behaviour ofpyfeeds, and adds the capability to submit tests to a HPC cluster viafsl_sub. This can be achieved with the new--fslsuboption. There is also a new--fslsubOptionsoption which allows additional per-test submission options to be specified (e.g.jobram=4,coprocessor=cuda, etc). These can be added to apyfeedsconfiguration file under a[fslsubOptions]section, e.g.:
Note that when using pyfeeds run --fslsub on the FMRIB cluster, you must specify a --sandboxDir location which is on the shared file system, i.e. which is accessible to both the submission node and cluster nodes.
This MR also fixes a race condition which can occur when running nested tests in parallel. For example, with the following test structure:
The output directory structure will also be nested, i.e.:
If these tests are run in parallel, test2 may be executed before test1, meaning that the test1/test2/ directory may already exist.
A number of other changes have been made:
- Changes the method used to run tests in parallel from a
ThreadPoolto amultiprocessing.Pool- this is so that evaluation of test outputs can be run in parallel. AThreadPoolis still used when using the new--fslsuboption. - The final
pyfeedsresults table now distinguishes between tests which fail due to a non-zero exit code (reported asErrored), and tests which fail due to their outputs not matching their benchmark data (reported asFailed). - If
pyfeedsis called with the--overwriteflag, the test sandbox directory already exists, it is deleted. - Migrates the packaging configuration from using
setup.pytopyproject.toml. - Changes the version number management strategy to use
setuptools-scm. - ENH: Expose original path to
feedsRunscript viaPYFEEDS_FEEDSRUN_PATHenvironment variable Whenpyfeedsruns afeedsRunscript, it executes a copy of the script and the contents of its containing directory. This is to ensure that thefeedsRunscript does not inadvertently write any temporary/intermediate files to the original test directory. Some test scripts may however need access to other "in-source" resources, e.g. when executed from a checkout of the project source code. These scripts can use thePYFEEDS_FEEDSRUN_PATHenvironment variable to locate such resources.
Detailed history
RF: CLI option to specify host IP address, as guessing the correct IP is difficultMNT: Pin fslpyRF: Copy test directory to sandbox and run it from there - this eliminates the possibility of test scripts writing files to test directory, which happens e.g. with fsl_sub .o/.e filesRF: Delete sandbox directory if it exists and --overwrite is activeRF: Allow logcfg to be None, for unit testsMNT: Adjust logging - messages may arrive out of orderTEST: Basic integration testsRF,BF: Test script exit code was being eaten by submission script when using --fslsub. Adjust test evaluation to distinguish between benchmark data evaluation failure, and test script errorringTEST: Adjust unit tests for new evaluateTest outputRF: Cannot distinguish between self-eval tests which "error" vs those which "fail"DOC: Updates to doc filesENH: Expose original path to feedsRun script via PYFEEDS_FEEDSRUN_PATH environment variableDOC: Describe PYFEEDS_FEEDSRUN_PATHDOC: Finish off docs
fsl-pyfix 0.9.0 -> 0.10.0
- ENH: Allow only NIfTI or CIfTI inputs to be cleaned
The pyfix cleaning stage (
fix -a ...) supports a new option which allows only the NIfTI or CIfTI data (filtered_func_data.nii.gzorAtlas.dtseries.nii) to be cleaned (the default is to clean both).
This new option (-o or --only) can be used like so:
fix -a labels.txt melodic.ica> # clean both NIfTI and CIfTI data if present
fix -a labels.txt melodic.ica> -o nifti # only clean NIfTI data (filtered_func_data.nii.gz)
fix -a labels.txt melodic.ica> -o cifti # only clean CIfTI data (Atlas.dtseries.nii)
Detailed history
ENH: New option to clean only nifti or cifti filesMNT: Use setuptools-scm for version number managementTETS: Test for new --only option
fsl-sub 2.8.4 -> 2.10.0
- NSLOTS Docs Update documentation for FSLSUB_NSLOTS variable. Update installation instructions.
- fsl_sub 2.10.0 with improvements to parallelism within the shell plugin
- Shell plugin now uses all threads allocated to parent job when job submitted within a cluster submitted job
- Thread control environment variables are set within shell runner tasks
- Allow -s option to control threads in shell runner array tasks
- Ensure automatic parallelism in shell runner when called by Python API
- Add additional debug output
- Fix debugging via environment variable
- Fix deeply nested fsl_sub calls
Detailed history
Add missing tag to style stageAdd example modulecmd for LmodImprove documentation and testing of --extra argumentUpdate copyright noticeAdd ability to switch off auto-queue selection and limits Fix loading of coprocessor module Switch to pytest for new test functionality Add new utils: truthy - could the value be interpreted as true? command_exists - moved out of __init__.py make_logdir - moved out of __init__.py Switch to importlib.resources.files to find config files Add getoption helper to resolve command line and environment variables Move coprocessor configuration out of __init__ into coprocessors Remove duplicate code setting number of threads Add warning that CUDA queue/partition targetted but no coprocessor requested Add new project tests Rename main test file to ensure pytest finds it Add tests fo command_existsPython 3.8 lacks 'files' method in importlib.resources Add support for Py3.13Refactor Plugin tests to fix failures with pytest and Python 3.10+Further refactoring of module test for python 3.11+ - no longer mock it, create a fake module insteadRemove global statement to avoid flake8 failureEnable testing of doctestsAdd queue option to force even numbers of threads on SMT SLURM systemsReduce SMT handling code complexityAdd NSLOTS environment variable to shell pluginAdd in missing env-var to expected outputAdd missing NSLOTS environment variable to shell pluginBump version numberUpdate documentation for FSLSUB_NSLOTS variable. Update installation instructionsfsl_sub 2.10.0 with improvements to parallelism within the shell plugin
fsl-sub-plugin-sge 1.5.4 -> 1.5.5
Detailed history
Add python 3.12 supportDOC: Emphasise that package names use hyphens and not underscoresAdd option and environment variable to allow fsl_sub to submit jobs when already running within a cluster job This is of most use when using with Open OnDemand batch connect desktops which are typically queued jobs.Tidy up README.md
fsl-sub-plugin-slurm 1.6.7 -> 1.6.8
Detailed history
As we use cpus-per-task|gpus-per-task SLURM_NTASKS/NPROCS is meaningless as it will always be 1. Change this to point at SLURM_CPUS_PER_TASK which should reflect realityUpdate changes
fsl-utils 2412.1 -> 2412.6
-
ENH: New
set_default_num_threadsfunction, andThreadScopeclass This MR adds two new features to thethreadingmodule: -
A new
NoOfThreads::set_default_num_threadsfunction, intended to be called from applicationmain()routines, for applications which allow the user to set the number of threads from the command-line. This function will set the default number of threads used byNoOfThreadsinstance, and hence theparfor/applyfunctions. If this function is never called, the default number of threads is dictated by theFSL_NUM_THREADSenvironment variable, or defaults to 1 (single-threaded) if that variable is not set. These changes have only involved changes tostaticfields of theNoOfThreadsclass, and so should preserve ABI compatibility with the last release (however new projects will need to be re-compiled against this new vesrion to advantage of the new feature). -
A new
ThreadScopeclass which allows the default number of threads used byNoOfThreads/parfor/applyto be temporarily changed in a local scope. This can be used by applications to temporarily disable/adjust parallelism - for example, if a routine is being run in parallel, it can use aThreadScopeto ensure that no nested paralellism takes place. TheThreadScopeclass is intended to be used like so:// Input values std::vector<int> values = {1, 2, 3, 4, 5}; // Function which performs a // calculation on one value auto do_calc = [&](int i) { // Ensure that calls within this scope // only use one thread. ThreadScope ts(1); // Call functions which may otherwise // have parallelised their work ... }; // Call do_calc on each value in parallel Utilities::parfor(do_calc, values.begin(), values.end());
This MR also contains a bug fix to the parfor and apply functions which was causing compilation failure on attempts to pass more than one input iterator of a different type.
- BF: Protect concurrent writes to _active_scopes
I'm sure I read somewhere that the unordered_map supported this, but I was wrong, at least on macOS.
- BF: Need to #include <mutex.h> on linux
Also tighten the mutex scope - we only need to protect writes to the std::unordered_map.
- MNT: Fix build string - use git describe to get fsl-utils version instead of $FSLDIR/etc/fslversion
- ENH: Allow number of threads to be set
Allow fsl_init_blas_threading to specify the number of blas threads allowed, e.g. for scoped enablement of matrix parallelisation. Library version not updated to avoid an FBR ( currently no other client projects )
- ENH: Add support for MKL library
Add support for controlling MKL threads
Detailed history
ENH: New fsl_set_num_threads function which can be used to programmatically set the default value used by NoOfThreads instances.ENH: New ThreadScope class, which allows the number of threads encoded by NoOfThreads instances to be changed within a particlar scopeTEST: Tests for NoOfThreads, ThreadScope, and parfor/apply functionsBF: Missing template type in call to _call, resulting in compilation failure if the first two inputs were of different typesTEST: Regression test for parfor/apply type bugRF: Store stack of nthreads values for each thread instead of a single valueTEST: Test nested ThreadScopeRF: Make naming less confusing - fsl_num_threads maps to FSL_NUM_THREADS env var. Applications can call set_default_num_threads to override FSL_NUM_THREADSBF: Protect concurrent access to _active_scopes. I'm sure I read somewhere that the unordered_map supported this, but I was wrong, at least on macOS.BF: Need to include <mutex.h> on linux. Tighten mutex scope - only need to protect writes to the unordered_mapMNT: Fix build string - use git describe to get fsl-utils versionENH: Allow number of threads to be setENH: Also set threads for MKLENH: Use C function not FORTRAN
fsl-mmorf v0.4.2 -> v1.0.0
- ENH: MMORF on the CPU
MMORF can now be compiled and executed on systems without a GPU. The CPU version can run in parallel on multiple CPU cores by specifying the
--num_threadsoption, or by setting theFSL_NUM_THREADSenvironment variable. The CPU version can run on both Linux (Intel) and macOS (Intel and Apple Silicon).
This work was split over several stages, each outlined in the following merge requests (newest first):
- MNT: Use new CLI11 2.5 option to support multiple vector-of-vector options in config files.
- RF: Fix GPU performance regression
- ENH: CPU implementation of CostFxnKernels
- ENH: CPU Implementation of CostFxnTensorL2WarpFieldSymmetricMaskedExcluded class
- ENH: CPU implementation of CostFxnLogJacobianSingularValues class
- ENH: CPU implementation of CostFxnBendingEnergy class
- ENH: CPU implementation of SparseDiagonalMatrixTiled class
- ENH: CPU implementation of WarpFieldBSpline class
- ENH: CPU implementation of VolumeBSpline class
Detailed history
MNT: Use new cli11 2.5 option to support multiple vector-of-vector options in config files.RF: Refactor mmorf.cpp - put all CLI options and parsing/validation logic into a container class, defined in new MMORFOptions module. This is to allow unit testing of cli/config file parsing.BF: Typos, make sure vectors are sized before int->bool conversionMNT: Option to skip validation, for testingRF: Change loadOptions to accept a vector<string>MNT: Don't cache environment variables, so we can test env var parsingTEST: Rename TempDir to InTempDirRF: Move getEnvironmentVariables to Config module for reuse.TEST: Class for temporarily setting/overriding environment variablesTEST: Unit tests for MMORFOptionsTEST: Another MMORFOptions test caseDOC: Update readme - desribe CPU version, remove singularity sectionMNT: Remove obsolete tensor_average executableDOC: Mention coverage reportingRF: Make sure num_threads defaults to 0, so FSL_NUM_THREADS will be used if set. Adjust Config class so that the TestConfig can reset it (but can't be done in application code)TEST: Test num_threads behaviour