diff --git a/setup.cfg b/setup.cfg index 499a2dec7..98373ec67 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ install_requires = ophyd-async >= 0.3a5 bluesky >= 1.13.0a3 blueapi >= 0.4.3-a1 - dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git + dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@ba2e0da424cf7a82e724f278b668987575cf8a52 [options.entry_points] console_scripts = diff --git a/src/hyperion/experiment_plans/flyscan_xray_centre_plan.py b/src/hyperion/experiment_plans/flyscan_xray_centre_plan.py index 6e882cd2e..204eb89f5 100755 --- a/src/hyperion/experiment_plans/flyscan_xray_centre_plan.py +++ b/src/hyperion/experiment_plans/flyscan_xray_centre_plan.py @@ -330,6 +330,10 @@ def run_gridscan_and_move( fgs_composite.sample_motors.stub_offsets, StubPosition.CURRENT_AS_CENTER ) + # Turn off dev/shm streaming to avoid filling disk, see https://github.com/DiamondLightSource/hyperion/issues/1395 + LOGGER.info("Turning off Eiger dev/shm streaming") + yield from bps.abs_set(fgs_composite.eiger.odin.fan.dev_shm_enable, 0) + # Wait on everything before returning to GDA (particularly apertures), can be removed # when we do not return to GDA here yield from bps.wait() diff --git a/src/hyperion/experiment_plans/panda_flyscan_xray_centre_plan.py b/src/hyperion/experiment_plans/panda_flyscan_xray_centre_plan.py index c79d11e41..0764f91ed 100755 --- a/src/hyperion/experiment_plans/panda_flyscan_xray_centre_plan.py +++ b/src/hyperion/experiment_plans/panda_flyscan_xray_centre_plan.py @@ -245,6 +245,10 @@ def run_gridscan_and_move( fgs_composite.sample_motors.stub_offsets, StubPosition.CURRENT_AS_CENTER ) + # Turn off dev/shm streaming to avoid filling disk, see https://github.com/DiamondLightSource/hyperion/issues/1395 + LOGGER.info("Turning off Eiger dev/shm streaming") + yield from bps.abs_set(fgs_composite.eiger.odin.fan.dev_shm_enable, 0) + # Wait on everything before returning to GDA (particularly apertures), can be removed # when we do not return to GDA here yield from bps.wait() diff --git a/src/hyperion/parameters/constants.py b/src/hyperion/parameters/constants.py index 0022e3c58..c01efcc26 100644 --- a/src/hyperion/parameters/constants.py +++ b/src/hyperion/parameters/constants.py @@ -94,6 +94,7 @@ class I03Constants: OAV_CENTRING_FILE = _test_oav_file if TEST_MODE else _live_oav_file SHUTTER_TIME_S = 0.06 USE_PANDA_FOR_GRIDSCAN = False + USE_GPU_FOR_GRIDSCAN_ANALYSIS = False @dataclass(frozen=True) diff --git a/src/hyperion/parameters/gridscan.py b/src/hyperion/parameters/gridscan.py index dcfbc3fce..49006f11f 100644 --- a/src/hyperion/parameters/gridscan.py +++ b/src/hyperion/parameters/gridscan.py @@ -41,6 +41,7 @@ class GridCommon( ) set_stub_offsets: bool = Field(default=False) use_panda: bool = Field(default=CONST.I03.USE_PANDA_FOR_GRIDSCAN) + use_gpu: bool = Field(default=CONST.I03.USE_GPU_FOR_GRIDSCAN_ANALYSIS) ispyb_experiment_type: IspybExperimentType = Field( default=IspybExperimentType.GRIDSCAN_3D ) @@ -90,6 +91,7 @@ def detector_params(self): beam_xy_converter=DetectorDistanceToBeamXYConverter( self.det_dist_to_beam_converter_path ), + enable_dev_shm=self.use_gpu, **optional_args, ) diff --git a/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py b/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py index 75ea59c8f..8bab276dd 100644 --- a/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py +++ b/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py @@ -417,7 +417,7 @@ def wrapped_gridscan_and_move(): @patch( "hyperion.experiment_plans.flyscan_xray_centre_plan.move_x_y_z", autospec=True ) - def test_when_gridscan_finished_then_smargon_stub_offsets_are_set( + def test_when_gridscan_finished_then_smargon_stub_offsets_are_set_and_dev_shm_disabled( self, move_xyz: MagicMock, run_gridscan: MagicMock, @@ -429,6 +429,8 @@ def test_when_gridscan_finished_then_smargon_stub_offsets_are_set( test_fgs_params.set_stub_offsets = True RE, (nexus_cb, ispyb_cb) = RE_with_subs + fake_fgs_composite.eiger.odin.fan.dev_shm_enable.sim_put(1) # type: ignore + def wrapped_gridscan_and_move(): run_generic_ispyb_handler_setup(ispyb_cb, test_fgs_params) yield from run_gridscan_and_move( @@ -441,6 +443,7 @@ def wrapped_gridscan_and_move(): fake_fgs_composite.smargon.stub_offsets.center_at_current_position.proc.get() == 1 ) + assert fake_fgs_composite.eiger.odin.fan.dev_shm_enable.get() == 0 @patch( "dodal.devices.aperturescatterguard.ApertureScatterguard.set", diff --git a/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py b/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py index b1fbd5be0..74c115f6f 100644 --- a/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py +++ b/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py @@ -382,7 +382,7 @@ def wrapped_run_gridscan_and_move(): "hyperion.experiment_plans.panda_flyscan_xray_centre_plan.setup_panda_for_flyscan", autospec=True, ) - def test_when_gridscan_finished_then_smargon_stub_offsets_are_set( + def test_when_gridscan_finished_then_smargon_stub_offsets_are_set_and_dev_shm_disabled( self, setup_panda_for_flyscan: MagicMock, move_xyz: MagicMock, @@ -395,6 +395,8 @@ def test_when_gridscan_finished_then_smargon_stub_offsets_are_set( ): test_panda_fgs_params.set_stub_offsets = True + fake_fgs_composite.eiger.odin.fan.dev_shm_enable.sim_put(1) # type: ignore + def wrapped_run_gridscan_and_move(): run_generic_ispyb_handler_setup( mock_subscriptions[1], test_panda_fgs_params @@ -414,6 +416,8 @@ def wrapped_run_gridscan_and_move(): == 1 ) + assert fake_fgs_composite.eiger.odin.fan.dev_shm_enable.get() == 0 + @patch( "dodal.devices.aperturescatterguard.ApertureScatterguard.set", return_value=Status(done=True, success=True),