diff --git a/submitit/auto/auto.py b/submitit/auto/auto.py
index ad502d5..e86daf7 100644
--- a/submitit/auto/auto.py
+++ b/submitit/auto/auto.py
@@ -163,7 +163,7 @@ class AutoExecutor(Executor):
                 continue
 
             valid = executors[ex]._valid_parameters()
-            if arg not in valid:
+            if arg not in valid | generics:
                 invalid.append(
                     f"Unknown argument '{arg}' for executor '{ex}' in parameter '{ex}_{arg}'."
                     + " Valid arguments: "
@@ -174,12 +174,20 @@ class AutoExecutor(Executor):
             invalid.append(f"Known executors: {', '.join(executors.keys())}")
             raise NameError("\n".join(invalid))
 
+        # add cluster specific generic overrides
+        kwargs.update(
+            **{
+                arg: kwargs.pop(f"{ex}_{arg}")
+                for ex, arg in specific
+                if ex == self.cluster and arg in generics
+            }
+        )
         parameters = self._executor._convert_parameters({k: kwargs[k] for k in kwargs if k in generics})
         # update parameters in the core executor
         for (ex, arg) in specific:
-            if ex != self.cluster:
-                continue
-            parameters[arg] = kwargs[f"{ex}_{arg}"]
+            # update cluster specific non-generic arguments
+            if arg not in generics and ex == self.cluster:
+                parameters[arg] = kwargs[f"{ex}_{arg}"]
 
         self._executor._internal_update_parameters(**parameters)
 
diff --git a/submitit/core/core.py b/submitit/core/core.py
index 39a77a7..dff76d8 100644
--- a/submitit/core/core.py
+++ b/submitit/core/core.py
@@ -587,7 +587,10 @@ class Executor(abc.ABC):
             delayed_batch = self._delayed_batch
             self._delayed_batch = None
         if not delayed_batch:
-            raise RuntimeError('No submission happened during "with executor.batch()" context.')
+            warnings.warn(
+                'No submission happened during "with executor.batch()" context.', category=RuntimeWarning
+            )
+            return
         jobs, submissions = zip(*delayed_batch)
         new_jobs = self._internal_process_submissions(submissions)
         for j, new_j in zip(jobs, new_jobs):
diff --git a/submitit/core/job_environment.py b/submitit/core/job_environment.py
index 5084bf3..cf5fa2a 100644
--- a/submitit/core/job_environment.py
+++ b/submitit/core/job_environment.py
@@ -46,13 +46,13 @@ class JobEnvironment:
             n = n[: -len("JobEnvironment")]
         return n.lower()
 
-    # pylint: disable=no-self-use
     def activated(self) -> bool:
         """Tests if we are running inside this environment.
 
-        @plugin-dev: Must be overridden by JobEnvironment implementations.
+        @plugin-dev: assumes that the SUBMITIT_EXECUTOR variable has been
+        set to the executor name
         """
-        ...
+        return os.environ.get("SUBMITIT_EXECUTOR", "") == self.name()
 
     @property
     def hostname(self) -> str:
diff --git a/submitit/local/local.py b/submitit/local/local.py
index 3380123..1e1ed2e 100644
--- a/submitit/local/local.py
+++ b/submitit/local/local.py
@@ -106,9 +106,6 @@ class LocalJobEnvironment(job_environment.JobEnvironment):
         "local_rank": "SUBMITIT_LOCAL_LOCALID",
     }
 
-    def activated(self) -> bool:
-        return "SUBMITIT_LOCAL_JOB_ID" in os.environ
-
     def _requeue(self, countdown: int) -> None:
         jid = self.job_id
         logger.get_logger().info(f"Requeued job {jid} ({countdown} remaining timeouts)")
@@ -218,6 +215,7 @@ def start_controller(
         SUBMITIT_LOCAL_SIGNAL_DELAY_S=str(int(signal_delay_s)),
         SUBMITIT_LOCAL_NODEID="0",
         SUBMITIT_LOCAL_JOB_NUM_NODES="1",
+        SUBMITIT_EXECUTOR="local",
         CUDA_AVAILABLE_DEVICES=cuda_devices,
     )
     process = subprocess.Popen(
diff --git a/submitit/slurm/slurm.py b/submitit/slurm/slurm.py
index b35e29e..fe3c181 100644
--- a/submitit/slurm/slurm.py
+++ b/submitit/slurm/slurm.py
@@ -175,6 +175,7 @@ def _parse_node_list(node_list: str):
 
 
 class SlurmJobEnvironment(job_environment.JobEnvironment):
+
     _env = {
         "job_id": "SLURM_JOB_ID",
         "num_tasks": "SLURM_NTASKS",
@@ -187,9 +188,6 @@ class SlurmJobEnvironment(job_environment.JobEnvironment):
         "array_task_id": "SLURM_ARRAY_TASK_ID",
     }
 
-    def activated(self) -> bool:
-        return "SLURM_JOB_ID" in os.environ
-
     def _requeue(self, countdown: int) -> None:
         jid = self.job_id
         subprocess.check_call(["scontrol", "requeue", jid])
@@ -490,5 +488,10 @@ def _make_sbatch_string(
         lines += ["", "# setup"] + setup
     # commandline (this will run the function and args specified in the file provided as argument)
     # We pass --output and --error here, because the SBATCH command doesn't work as expected with a filename pattern
-    lines += ["", "# command", f"srun --output '{stdout}' --error '{stderr}' --unbuffered {command}"]
+    lines += [
+        "",
+        "# command",
+        "export SUBMITIT_EXECUTOR=slurm",
+        f"srun --output '{stdout}' --error '{stderr}' --unbuffered {command}",
+    ]
     return "\n".join(lines)

diff --git a/submitit/auto/test_auto.py b/submitit/auto/test_auto.py
index 79733da..defb232 100644
--- a/submitit/auto/test_auto.py
+++ b/submitit/auto/test_auto.py
@@ -40,6 +40,7 @@ def test_local_executor() -> None:
     with test_slurm.mocked_slurm():
         executor = auto.AutoExecutor(folder=".", cluster="local")
     assert executor.cluster == "local"
+    executor.update_parameters(local_cpus_per_task=2)
 
 
 def test_executor_argument() -> None:
@@ -79,10 +80,12 @@ def test_overriden_arguments() -> None:
     with test_slurm.mocked_slurm():
         slurm_ex = auto.AutoExecutor(folder=".", cluster="slurm")
 
-    slurm_ex.update_parameters(timeout_min=60, slurm_time=120)
+    slurm_ex.update_parameters(
+        timeout_min=60, slurm_timeout_min=120, tasks_per_node=2, slurm_ntasks_per_node=3
+    )
     slurm_params = slurm_ex._executor.parameters
     # slurm use time
-    assert slurm_params == {"time": 120}
+    assert slurm_params == {"time": 120, "ntasks_per_node": 3}
 
     # others use timeout_min
     local_ex = auto.AutoExecutor(folder=".", cluster="local")
diff --git a/submitit/core/test_core.py b/submitit/core/test_core.py
index 0aa467a..acf232f 100644
--- a/submitit/core/test_core.py
+++ b/submitit/core/test_core.py
@@ -190,7 +190,7 @@ def test_fake_executor_batch(tmp_path: Path) -> None:
             job = executor.submit(_three_time, 8)
             job.job_id  # pylint: disable=pointless-statement
     # empty context
-    with pytest.raises(RuntimeError):
+    with pytest.warns(RuntimeWarning):
         with executor.batch():
             pass
     # multi context
diff --git a/submitit/core/test_plugins.py b/submitit/core/test_plugins.py
index 98d7c79..2ac0009 100644
--- a/submitit/core/test_plugins.py
+++ b/submitit/core/test_plugins.py
@@ -19,7 +19,6 @@ from .job_environment import JobEnvironment
 @pytest.mark.parametrize("env", plugins.get_job_environments().values())
 def test_env(env: JobEnvironment) -> None:
     assert isinstance(env, JobEnvironment)
-    assert type(env).activated is not JobEnvironment.activated, "activated need to be overridden"
     # We are not inside a submitit job
     assert not env.activated()
     assert type(env)._requeue is not JobEnvironment._requeue, "_requeue need to be overridden"
diff --git a/submitit/slurm/_sbatch_test_record.txt b/submitit/slurm/_sbatch_test_record.txt
index 2de2d1e..a4e045f 100644
--- a/submitit/slurm/_sbatch_test_record.txt
+++ b/submitit/slurm/_sbatch_test_record.txt
@@ -16,4 +16,5 @@
 #SBATCH --wckey=submitit
 
 # command
+export SUBMITIT_EXECUTOR=slurm
 srun --output '/tmp/%j_%t_log.out' --error '/tmp/%j_%t_log.err' --unbuffered blublu
diff --git a/submitit/slurm/test_slurm.py b/submitit/slurm/test_slurm.py
index 4925792..2b80b8e 100644
--- a/submitit/slurm/test_slurm.py
+++ b/submitit/slurm/test_slurm.py
@@ -35,9 +35,8 @@ def mocked_slurm(state: str = "RUNNING", job_id: str = "12", array: int = 0) ->
         stack.enter_context(
             test_core.MockedSubprocess(state=state, job_id=job_id, shutil_which="srun", array=array).context()
         )
-        stack.enter_context(
-            utils.environment_variables(**{"_USELESS_TEST_ENV_VAR_": "1", "SLURM_JOB_ID": f"{job_id}"})
-        )
+        envs = dict(_USELESS_TEST_ENV_VAR_="1", SUBMITIT_EXECUTOR="slurm", SLURM_JOB_ID=str(job_id))
+        stack.enter_context(utils.environment_variables(**envs))
         tmp = stack.enter_context(tempfile.TemporaryDirectory())
         yield tmp
 

Using a LocalExecutor within a slurm interactive session gets the wrong environment
To be confirmed, but I expect it'll auto dectect the slurm environment instead. A submitit environment variable could sort this out though.
submitit/auto/test_auto.py::test_local_executor submitit/auto/test_auto.py::test_overriden_arguments submitit/core/test_core.py::test_fake_executor_batch submitit/slurm/test_slurm.py::test_make_batch_string
submitit/auto/test_auto.py::test_slurm_executor submitit/auto/test_auto.py::test_executor_argument submitit/auto/test_auto.py::test_executor_unknown_argument submitit/auto/test_auto.py::test_executor_deprecated_arguments submitit/auto/test_auto.py::test_deprecated_argument submitit/core/test_core.py::test_fake_job submitit/core/test_core.py::test_fake_job_cancel_at_deletion submitit/core/test_core.py::test_fake_executor submitit/core/test_plugins.py::test_env[env0] submitit/core/test_plugins.py::test_env[env1] submitit/core/test_plugins.py::test_env[env2] submitit/core/test_plugins.py::test_executors[SlurmExecutor] submitit/core/test_plugins.py::test_executors[LocalExecutor] submitit/core/test_plugins.py::test_executors[DebugExecutor] submitit/core/test_plugins.py::test_finds_default_environments submitit/core/test_plugins.py::test_finds_default_executors submitit/core/test_plugins.py::test_job_environment_works submitit/core/test_plugins.py::test_job_environment_raises_outside_of_job submitit/core/test_plugins.py::test_find_good_plugin submitit/core/test_plugins.py::test_skip_bad_plugin submitit/slurm/test_slurm.py::test_mocked_missing_state submitit/slurm/test_slurm.py::test_job_environment submitit/slurm/test_slurm.py::test_slurm_job_mocked submitit/slurm/test_slurm.py::test_slurm_job_array_mocked[True] submitit/slurm/test_slurm.py::test_slurm_job_array_mocked[False] submitit/slurm/test_slurm.py::test_slurm_error_mocked submitit/slurm/test_slurm.py::test_signal submitit/slurm/test_slurm.py::test_make_batch_string_gpu submitit/slurm/test_slurm.py::test_update_parameters_error submitit/slurm/test_slurm.py::test_read_info submitit/slurm/test_slurm.py::test_read_info_array[12_0-R] submitit/slurm/test_slurm.py::test_read_info_array[12_1-U] submitit/slurm/test_slurm.py::test_read_info_array[12_2-X] submitit/slurm/test_slurm.py::test_read_info_array[12_3-U] submitit/slurm/test_slurm.py::test_read_info_array[12_4-X] submitit/slurm/test_slurm.py::test_read_job_id[12-expected0] submitit/slurm/test_slurm.py::test_read_job_id[12_0-expected1] submitit/slurm/test_slurm.py::test_read_job_id[20_[2-7%56]-expected2] submitit/slurm/test_slurm.py::test_read_job_id[20_[2-7,12-17,22%56]-expected3] submitit/slurm/test_slurm.py::test_read_job_id[20_[0%1]-expected4] submitit/slurm/test_slurm.py::test_get_id_from_submission_command[Submitted submitit/slurm/test_slurm.py::test_get_id_from_submission_command_raise submitit/slurm/test_slurm.py::test_watcher submitit/slurm/test_slurm.py::test_get_default_parameters submitit/slurm/test_slurm.py::test_name submitit/slurm/test_slurm.py::test_slurm_node_list submitit/slurm/test_slurm.py::test_slurm_node_list_online_documentation submitit/slurm/test_slurm.py::test_slurm_invalid_parse submitit/slurm/test_slurm.py::test_slurm_missing_node_list