Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi scheduler support #17

Merged
merged 41 commits into from
Jan 27, 2023
Merged

Multi scheduler support #17

merged 41 commits into from
Jan 27, 2023

Conversation

sverhoeven
Copy link
Member

@sverhoeven sverhoeven commented Nov 18, 2022

Uses configuration file to specify applications, schedulers and filesystems.
By default uses first scheduler and first filesystem to upload input, submit, state fetch, download output.

To test the multi scheduler support you have to create a config.yaml file by copying config-example.yaml. The example config file uses a in-memory scheduler on the local file system. To use the Slurm scheduler and sftp filesystem

  1. you have to uncomment the slurmcontainer block and
  2. start up a Slurm Docker container as described in the config file.
  3. you should be able to submit a job that
    1. Copies input files to container in /home/xenon/<job_id>, which you can verify with docker exec <container id> ls -l /home/xenon/<job_id>
    2. Submit job to Slurm, which you can verify by running sacct to see the completed job.
    3. After job completion will copy the output files back to where bartender serve is running, which you can verify with ls /tmp/jobs/*, it should have a stdout.txt file.

Also

sverhoeven and others added 29 commits November 18, 2022 15:58
* Document picker in README
* Use pydantic to validate config file
* Use context for file system/scheduler/picker instances
* Split config, context, picker into own files
* fix circular imports using TYPE_CHECKING if
As it requires sub dir in /tmp which is properly isolated
* uvicorn --reload was causing high load, so upgraded it.
* httptools was not used anywhere so dropped.

Also add more todos
Use if TYPE_CHECKING to prevent circular imports
@sverhoeven sverhoeven mentioned this pull request Jan 16, 2023
6 tasks
@sverhoeven sverhoeven marked this pull request as ready for review January 18, 2023 08:55
@sverhoeven sverhoeven requested a review from Peter9192 January 18, 2023 08:55
Base automatically changed from slurm-scheduler to main January 24, 2023 14:44
Copy link
Contributor

@Peter9192 Peter9192 left a comment

Choose a reason for hiding this comment

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

Finished going through the code, will continue with some tests

config-example.yaml Show resolved Hide resolved
config-example.yaml Show resolved Hide resolved
config-example.yaml Show resolved Hide resolved
config-example.yaml Show resolved Hide resolved
config-example.yaml Show resolved Hide resolved
src/bartender/picker.py Outdated Show resolved Hide resolved
src/bartender/picker.py Show resolved Hide resolved
src/bartender/picker.py Show resolved Hide resolved
src/bartender/schedulers/memory.py Outdated Show resolved Hide resolved
tests/schedulers/test_build.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Peter9192 Peter9192 left a comment

Choose a reason for hiding this comment

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

Tests mostly work fine, only check that job root dir exists doens't work for default

src/bartender/config.py Show resolved Hide resolved
@sverhoeven sverhoeven merged commit 7590b33 into main Jan 27, 2023
@sverhoeven sverhoeven deleted the multi-scheduler branch January 27, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split src and tests
2 participants