
If you’re using Longleaf, UNC’s high-performance computing (HPC) cluster, you may be wondering: Can I run more than one job at a time? Whether you’re a student, researcher, or data scientist, understanding how to efficiently use computing resources can significantly speed up your workflows and maximize productivity.
In this article, we’ll dive into how job scheduling works on Longleaf, whether you can run multiple jobs simultaneously, and best practices to do so effectively. Let’s break it all down in simple terms.
What Is Longleaf and Who Uses It?
Longleaf is a high-performance computing cluster provided by UNC Chapel Hill, designed for data-intensive research. It caters to researchers across various domains—from genomics to social sciences—offering a shared pool of resources that can be accessed via command-line interfaces.
Key Features of Longleaf
- Designed for data-intensive, memory-heavy workloads
- Offers thousands of compute cores and large memory nodes
- Uses the Slurm workload manager for job scheduling
Before diving into running multiple jobs, it’s essential to understand how job scheduling works on Longleaf.
Understanding How Job Scheduling Works on Longleaf
Longleaf uses Slurm (Simple Linux Utility for Resource Management) to manage job submissions and scheduling. This means:
- Users submit jobs via a script using the
sbatch
command. - Each job is placed in a queue and assigned resources when available.
- The scheduler manages fairness, resource limits, and job priorities.
Now that we know how jobs are managed, let’s tackle the big question.
Can You Run More Than One Job on Longleaf?
Yes, you can run more than one job on Longleaf, but there are a few important considerations:
1. Submission of Multiple Jobs
You can submit multiple jobs using:
- Separate
sbatch
commands for each job script - A loop or batch submission script to submit many jobs in one go
Each submitted job enters the queue and is scheduled based on available resources.
2. Running Jobs Simultaneously
Whether multiple jobs run at the same time depends on:
- Cluster load: If other users are heavily using the cluster, your jobs may wait longer.
- Your job’s resource requests: Smaller jobs with fewer resources tend to start sooner.
- Job limits set by Longleaf: There may be per-user job limits (e.g., number of jobs running concurrently).
Pro Tip: If your jobs are lightweight, consider requesting fewer cores or memory per job to improve the chances of parallel execution.
Best Practices for Running Multiple Jobs on Longleaf
Running multiple jobs efficiently requires strategic planning. Here are some tips:
Use Job Arrays for Similar Tasks
If you need to run the same script with different inputs or parameters, Slurm job arrays are your best friend.
bashCopyEdit#SBATCH --array=1-10
This will submit 10 related jobs with the same script, each with a different task ID.
Optimize Resource Requests
Avoid over-requesting resources. Doing so can:
- Increase wait times
- Decrease the chance of multiple jobs running simultaneously
Be realistic about your CPU, memory, and time needs.
Monitor Your Jobs
Use the following commands to track your jobs:
squeue -u yourusername
– shows your active jobssacct
– provides job historyscancel
– cancels jobs if needed
Respect Longleaf’s Usage Policies
Always check Longleaf’s usage guidelines, including:
- Maximum job limits
- Wall time restrictions
- Fair-share scheduling policies
Abiding by these rules ensures smoother operations for everyone.
Common Pitfalls to Avoid
Even advanced users can make mistakes when managing multiple jobs. Here are a few to watch for:
- Submitting too many large jobs at once – can clog the queue and hurt performance
- Not checking for job failures – one broken script can lead to wasted compute hours
- Hard-coding input/output paths – makes batch job management difficult
Instead, use dynamic scripting with environment variables like $SLURM_ARRAY_TASK_ID
for flexibility.
When Should You Not Run Multiple Jobs?
While running multiple jobs can be a great way to boost productivity, it’s not always ideal.
Avoid running many simultaneous jobs when:
- You’re running I/O-intensive tasks that strain shared storage
- Your jobs are high-memory consumers, risking node overload
- You’re unsure if your script works – test with a small job first!
Conclusion: Make the Most of Longleaf’s Power
So, can you run more than one job on Longleaf? Absolutely! As long as you’re mindful of resource requests, scheduling policies, and best practices, running multiple jobs can save time and streamline your research.
Takeaways:
- Longleaf supports multiple job submissions and parallel runs
- Use job arrays for similar tasks
- Monitor, optimize, and respect resource usage policies
Want to get started? Visit the Longleaf user guide to dive deeper and refine your scripts today.

Andre Cuevas provides career insights, job search strategies, and professional advice to help individuals navigate the job market and achieve their career goals.