legend-exp / LegendDataManagement.jl

LegendMetadata access in Julia
Other
1 stars 5 forks source link

Add SLURM support #43

Closed oschulz closed 4 months ago

oschulz commented 4 months ago

@theHenks

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 151 lines in your changes are missing coverage. Please review.

Project coverage is 35.22%. Comparing base (a4c1b00) to head (fb3c66b).

Files Patch % Lines
src/slurm.jl 0.00% 89 Missing :warning:
src/workers.jl 0.00% 62 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #43 +/- ## ========================================== - Coverage 39.07% 35.22% -3.85% ========================================== Files 24 25 +1 Lines 1336 1482 +146 ========================================== Hits 522 522 - Misses 814 960 +146 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

oschulz commented 4 months ago

Usage example: Allocate SLURM resources, e.g. via

salloc --ntasks=4 --cpus-per-task=8 --mem-per-cpu=8GB --time=1:00:00

Then start Julia within the shell started by salloc:

julia

Then, in the Julia session, run

using LegendDataManagement
legend_addprocs()

Query workers:

using TypedTables
Table(LegendDataManagement.distributed_resources())

legend_addprocs() should also work in a Julia process started via sbatch.

Note: The SLURM options --cpus-per-task and --mem-per-cpu are currently required for legend_addprocs() to work.