Step 1: Identify Which Subjects Failed¶
Run Post-Run Verification first. Use check-outputs to see which subjects are missing expected output files, and the job database for exit codes and error messages. Once you know which subjects and tasks need attention, come back here to diagnose why.
Step 2: Read the SLURM Logs¶
SLURM output and error files are in {work_dir}/log/{task_name}/:
{work_dir}/log/{task_name}/{task_name}_{job_id}.out
{work_dir}/log/{task_name}/{task_name}_{job_id}.errThe detailed per-subject execution log (stdout + stderr combined) is written by the wrapper:
# Array jobs
{work_dir}/log/{task_name}/sub-{subject}/{task_name}_{job_id}_{array_task_id}_{timestamp}.log
# Non-array jobs
{work_dir}/log/{task_name}/{task_name}_{job_id}_{timestamp}.logStep 3: Inspect the Wrapper Script¶
The generated wrapper script shows exactly what ran on the compute node:
cat /data/work/my_study/log/wrapper/afni_cards_preprocessing_*.shVerify:
Module load commands look correct
Environment variables (
$TEMPLATE_DIR,$CONTAINER_DIR, etc.) are setScript path exists
Step 4: Test the Module Environment¶
SSH to a compute node (or use srun) and manually load the modules:
srun --pty bash
ml AFNI/24.3.06-foss-2023a
afni_proc.py --help # should print help if loaded correctlyStep 5: Check Script Line Endings¶
Windows line endings cause $'\r': command not found errors:
file src/neuro_pipeline/pipeline/scripts/branch/afni_cards_preprocessing.sh
# Should say "POSIX shell script" or "Bourne-Again shell script", NOT "CRLF"
# Fix if needed:
dos2unix src/neuro_pipeline/pipeline/scripts/branch/*.shDatabase Shows Incomplete Records?¶
If the database is missing jobs (e.g., after a cluster crash), merge the raw JSONL logs manually:
neuropipe merge-logs /data/work/my_studyJSONL event logs in {work_dir}/database/json/ accumulate independently of the SQLite database. Merging re-processes any unarchived files and fills in gaps.
If the JSONL files were already archived by a previous merge and the database is still incomplete (e.g., after restoring from backup), use force-rebuild to create a fresh database from all logs including archived ones:
neuropipe force-rebuild /data/work/my_study
# → writes pipeline_jobs_rebuild_{timestamp}.db next to the originalQuick Diagnosis Checklist¶
Is the config file named
{project}_config.yamland in the right directory?Does
module availshow the modules in your config?Are all paths in
envir_dirabsolute and correct on the HPC?Does the container
.siffile exist incontainer_dir?Does the
license.txtexist infreesurfer_dir?Are shell scripts using Unix line endings?
Does the Python venv contain
typer,pandas?
Error Reference¶
Setup & Configuration¶
“No subjects found”
Check that
prefixin your project config (prefix: "sub-") matches your directory namingVerify
--inputpoints to the correct directoryRun
neuropipe detect-subjects /data/BIDSto preview what the pipeline sees
“Project configuration not found”
The config file must be named exactly
{project}_config.yamlIt must be in
config/project_config/Check:
ls config/project_config/
“Task not found” / task name mismatch
Task names are case-sensitive —
cards_preprocess≠Cards_PreprocessThe name must match exactly between
config.yamland your project configtaskssectionRun
neuropipe list-tasksto see all registered task names
GUI won’t start
Check if port 8050 is already in use:
lsof -i :8050Try a different port:
neuropipe-gui --port 8051Verify the package is installed:
pip show neuro-pipeline
SLURM & Job Submission¶
module: command not found in job logs
The module system is not initialized in the batch environment
Add to the top of
global_pythonin your project config:global_python: - source /etc/profile.d/modules.sh - ml Python/3.11.3-GCCcore-12.3.0 - . /home/$USER/venv/bin/activate
SLURM Job ID: N/A in database
Job was not submitted properly
Check:
which sbatch(must be available)Check account:
sacctmgr show user $USER
Jobs are queued but never start
Check resource limits:
sacctmgr show assoc user=$USERReduce concurrent array jobs: lower
%15in thearray_config.patternfield inconfig.yaml
Python Environment¶
ModuleNotFoundError: No module named 'typer'
The Python environment on the compute node is missing required packages
Ensure your venv/conda env includes:
typer,pandas,sqlite3Test on a compute node:
srun --pty bash -c "source /path/to/venv/bin/activate && python -c 'import typer'"
Resume & Output Checks¶
--resume does not skip any subjects
Check that
{project}_checks.yamlexists inconfig/results_check/Tasks with no entry in the checks file are always submitted in full (warning is printed)
check-outputs reports unexpected failures
Open the CSV at
{work_dir}/check_results_{timestamp}.csv— thepatternandactualcolumns show exactly what was globbed and how many files were foundVerify
output_pathresolves correctly for your subjects by checking the path manually on the HPCCheck
expected_countandtolerancematch your actual data