Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/trouble_shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ performance computing installations Python 3.12 is the recommended Python verion

## Resource Dictionary
The resource dictionary parameter `resource_dict` can contain one or more of the following options:
* `cores_per_worker` (int): number of MPI cores to be used for each function call
* `cores` (int): number of MPI cores to be used for each function call
* `threads_per_core` (int): number of OpenMP threads to be used for each function call
* `gpus_per_worker` (int): number of GPUs per worker - defaults to 0
* `gpus_per_core` (int): number of GPUs per worker - defaults to 0
* `cwd` (str/None): current working directory where the parallel python task is executed
* `openmpi_oversubscribe` (bool): adds the `--oversubscribe` command line flag (OpenMPI and SLURM only) - default False
* `slurm_cmd_args` (list): Additional command line arguments for the srun call (SLURM only)
Expand All @@ -54,4 +54,4 @@ high performance computing (HPC) clusters via SSH, this functionality is not sup
is the use of [cloudpickle](https://github.com/cloudpipe/cloudpickle) for serialization inside executorlib, this requires
the same Python version and dependencies on both computer connected via SSH. As tracking those parameters is rather
complicated the SSH connection functionality of [pysqa](https://pysqa.readthedocs.io) is not officially supported in
executorlib.
executorlib.
4 changes: 2 additions & 2 deletions executorlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class Executor:
cache_directory (str, optional): The directory to store cache files. Defaults to "cache".
max_cores (int): defines the number cores which can be used in parallel
resource_dict (dict): A dictionary of resources required by the task. With the following keys:
- cores_per_worker (int): number of MPI cores to be used for each function call
- cores (int): number of MPI cores to be used for each function call
- threads_per_core (int): number of OpenMP threads to be used for each function call
- gpus_per_worker (int): number of GPUs per worker - defaults to 0
- gpus_per_core (int): number of GPUs per worker - defaults to 0
Comment on lines +38 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Parameter naming inconsistency detected across codebase

The verification reveals inconsistent parameter naming between the docstring and actual implementation:

  • The docstring uses cores, threads_per_core, and gpus_per_core
  • The codebase still uses old parameter names like cores_per_worker and gpus_per_worker in multiple files:
    • executorlib/standalone/inputcheck.py
    • executorlib/interactive/executor.py
    • executorlib/standalone/serialize.py
    • tests/test_shared_input_check.py

This inconsistency needs to be addressed to maintain code clarity and prevent potential bugs.

🔗 Analysis chain

Verify complete parameter renaming across codebase

Let's ensure there are no remaining occurrences of the old parameter names to maintain consistency.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining instances of old parameter names
echo "Checking for old parameter names..."
rg -i "cores_per_worker|gpus_per_worker" --type py --type md

# Search for new parameter names to verify consistent usage
echo -e "\nVerifying new parameter names..."
rg -i "cores.*=|gpus_per_core" --type py --type md

Length of output: 14477

- cwd (str/None): current working directory where the parallel python task is executed
- openmpi_oversubscribe (bool): adds the `--oversubscribe` command line flag (OpenMPI and
SLURM only) - default False
Expand Down
Loading