SLURM Integrationο
NL-BIOMERO integrates with High-Performance Computing (HPC) clusters using SLURM for scalable bioimage analysis workflows.
Overviewο
The SLURM integration allows you to:
- Execute computationally intensive workflows on HPC clusters 
- Scale analysis across multiple compute nodes 
- Leverage specialized hardware (GPUs, high-memory nodes) 
- Manage workflow queuing and resource allocation 
Architectureο
βββββββββββββββββββ    βββββββββββββββββββ    βββββββββββββββββββ
β   OMERO Web     β    β  BIOMERO Worker β    β  SLURM Cluster  β
β                 β    β                 β    β                 β
β βββββββββββββββ β    β βββββββββββββββ β    β βββββββββββββββ β
β β User submitsβ βββββΆβ β Workflow    β βββββΆβ β Job Queue   β β
β β workflow    β β    β β Manager     β β    β β             β β
β βββββββββββββββ β    β βββββββββββββββ β    β βββββββββββββββ β
β                 β    β        β        β    β        β        β
β βββββββββββββββ β    β        βΌ        β    β        βΌ        β
β β Results     β ββββββ βββββββββββββββ β    β βββββββββββββββ β
β β Display     β β    β β Progress    β ββββββ β Compute     β β
β βββββββββββββββ β    β β Tracking    β β    β β Nodes       β β
βββββββββββββββββββ    β βββββββββββββββ β    β βββββββββββββββ β
                       βββββββββββββββββββ    βββββββββββββββββββ
Configurationο
SLURM integration is configured through slurm-config.ini files located in:
- Web interface: - /NL-BIOMERO/web/slurm-config.ini
- Worker service: - /NL-BIOMERO/biomeroworker/slurm-config.ini
Basic Configurationο
[SSH]
# SLURM cluster connection
host=localslurm
[SLURM]
# Storage paths on SLURM cluster
slurm_data_path=/data/my-scratch/data
slurm_images_path=/data/my-scratch/singularity_images/workflows
slurm_converters_path=/data/my-scratch/singularity_images/converters
slurm_script_path=/data/my-scratch/slurm-scripts
Container Environment Configurationο
For environments requiring explicit container path binding:
[SLURM]
# Required when containers need explicit path binding
# Sets APPTAINER_BINDPATH environment variable
slurm_data_bind_path=/data/my-scratch/data
# Optional: specify partition for conversion jobs
slurm_conversion_partition=cpu-short
Note
Configure slurm_data_bind_path only when your HPC administrator requires setting the APPTAINER_BINDPATH environment variable.
Workflow Definitionsο
Available workflows are defined in the [MODELS] section:
[MODELS]
# Cellpose segmentation workflow
cellpose=cellpose
cellpose_repo=https://github.com/TorecLuik/W_NucleiSegmentation-Cellpose/tree/v1.4.0
cellpose_job=jobs/cellpose.sh
cellpose_job_mem=4GB
# StarDist segmentation workflow
stardist=stardist
stardist_repo=https://github.com/Neubias-WG5/W_NucleiSegmentation-Stardist/tree/v1.3.2
stardist_job=jobs/stardist.sh
Analytics and Monitoringο
Enable workflow tracking and analytics:
[ANALYTICS]
# Enable workflow tracking
track_workflows=True
# Enable specific monitoring features
enable_job_accounting=True
enable_job_progress=True
enable_workflow_analytics=True
Deployment Considerationsο
SSH Configurationο
Configure SSH access to your SLURM cluster:
# In ~/.ssh/config
Host localslurm
    HostName your-slurm-cluster.example.com
    User your-username
    IdentityFile ~/.ssh/id_rsa_slurm
    Port 22
Directory Structureο
Ensure required directories exist on the SLURM cluster:
# Create directory structure
mkdir -p /data/my-scratch/{data,singularity_images/{workflows,converters},slurm-scripts}
Permissions and Accessο
- Verify the BIOMERO worker can SSH to the SLURM cluster 
- Ensure read/write access to configured directories 
- Check SLURM account permissions and quotas 
Troubleshootingο
Common Issuesο
Container Access Errors
If workflows fail with file access errors:
- Configure explicit path binding: - [SLURM] slurm_data_bind_path=/data/my-scratch/data 
- Verify directory permissions on the SLURM cluster 
- Check if Singularity/Apptainer can access the data directory 
SSH Connection Failures
If the worker cannot connect to SLURM:
- Test SSH connection manually from the worker container 
- Verify SSH key authentication 
- Check network connectivity and firewall rules 
Job Submission Issues
If jobs fail to submit:
- Verify SLURM account and partition access 
- Check resource request limits (memory, GPU, etc.) 
- Review SLURM queue policies and restrictions 
Workflow Execution Failures
If submitted jobs fail during execution:
- Check SLURM job logs for errors 
- Verify container images are accessible 
- Ensure input data is properly transferred 
Debug Commandsο
# Test SSH connection
docker exec -it biomeroworker ssh localslurm
# Check SLURM status
docker exec -it biomeroworker ssh localslurm "squeue -u $USER"
# View job details
docker exec -it biomeroworker ssh localslurm "scontrol show job JOBID"
# Check directory permissions
docker exec -it biomeroworker ssh localslurm "ls -la /data/my-scratch/"
Performance Tuningο
Resource Allocationο
Optimize resource requests for different workflow types:
[MODELS]
# CPU-intensive workflow
cellprofiler_job_mem=32GB
cellprofiler_job_time=02:00:00
# GPU workflow
cellpose_job_gres=gpu:1g.10gb:1
cellpose_job_partition=gpu-partition
# Memory-intensive workflow
stardist_job_mem=64GB
stardist_job_partition=himem
Queue Managementο
- Use appropriate partitions for different workflow types 
- Configure job time limits based on expected runtime 
- Consider using job arrays for batch processing 
Monitoring and Analyticsο
Enable comprehensive monitoring:
[ANALYTICS]
track_workflows=True
enable_job_accounting=True
enable_job_progress=True
enable_workflow_analytics=True
# Optional: specify analytics database
sqlalchemy_url=postgresql://user:pass@db:5432/analytics
Security Considerationsο
- Use SSH key authentication instead of passwords 
- Restrict SSH access to specific users and commands 
- Configure firewall rules to limit network access 
- Regularly rotate SSH keys and credentials 
- Monitor access logs for suspicious activity 
Further Readingο
- BIOMERO Worker Container - Worker container details 
- OMERO.biomero Plugin Administration - Administrative procedures