diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index 6900cbb882e..f5c5a0f6c76 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -3,13 +3,14 @@ import logging import re import shutil +import warnings from collections import defaultdict from dataclasses import dataclass, field from typing import Any, Dict, List, Mapping, Tuple, no_type_check from ert import _clib -from .parsing import ConfigDict, ConfigValidationError +from .parsing import ConfigDict, ConfigValidationError, ConfigWarning from .queue_system import QueueSystem GENERIC_QUEUE_OPTIONS: List[str] = ["MAX_RUNNING"] @@ -58,6 +59,15 @@ def from_dict(cls, config_dict: ConfigDict) -> QueueConfig: f"Invalid QUEUE_OPTION for {queue_system.name}: '{option_name}'. " f"Valid choices are {sorted(VALID_QUEUE_OPTIONS[queue_system])}." ) + if queue_system != selected_queue_system: + warnings.warn( + ConfigWarning.with_context( + f"Setting '{option_name}'for {queue_system.name} but " + f"{selected_queue_system.name} is selected. ", + option_name, + ), + stacklevel=1, + ) queue_options[queue_system].append( (option_name, values[0] if values else "") )