Skip to content

Commit

Permalink
Give warning when memory usage is set in LSF_RESOURCE
Browse files Browse the repository at this point in the history
This commit gives the user a deprecationwarning when trying to set
`mem=...` in the `LSF_RESOURCE` resource string. This is preferred to be
set in the new `REALIZATION_MEMORY` option.

Using `REALIZATION_MEMORY` over `LSF_RESOURCE`
* Does not invalidate what we have set as LSF_RESOURCE through the site-config.
* Better handling of memory units (i.e. better UX).
* Makes Ert able to understand the parameter, to be able to compare with actual usage
  • Loading branch information
jonathan-eq committed Oct 11, 2024
1 parent ed4ba12 commit dad96ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ert/config/parsing/config_schema_deprecations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from functools import partial
from typing import List, cast

from .deprecation_info import DeprecationInfo

Expand Down Expand Up @@ -222,4 +223,11 @@
"the future. Use REALIZATION_MEMORY instead.",
check=lambda line: "MEMORY_PER_CPU" in line,
),
DeprecationInfo(
keyword="QUEUE_OPTION",
message="Memory requirements in LSF should now be set using REALIZATION_MEMORY and not"
" through the LSF_RESOURCE option.",
check=lambda line: "LSF_RESOURCE" in line
and "mem=" in cast(List[str], line)[-1],
),
]

0 comments on commit dad96ea

Please sign in to comment.