nf-core / taxprofiler

Highly parallelised multi-taxonomic profiling of shotgun short- and long-read metagenomic data
https://nf-co.re/taxprofiler
MIT License
127 stars 35 forks source link

possible to run with `cgroups v1`? #302

Closed BCArg closed 1 year ago

BCArg commented 1 year ago

Description of the bug

Getting the following error:

Command error:
  Error: invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd

when issuing the following command to launch the taxprofiler pipeline:

nextflow run nf-core/taxprofiler -r eaef6ac9bc --input SampleSheet_v5.0.csv --databases RefDBs_v1.csv --outdir decontamination -profile podman --save_hostremoval_unmapped --perform_shortread_qc --perform_shortread_complexityfilter --perform_shortread_hostremoval --shortread_hostremoval_index "/path/to/index" --hostremoval_reference "/path/to/primary_assembly.fa.gz" --max_cpus 12 --max_memory 42.GB -bg # see /usr/share/containers/libpod.conf

it appears that my system is indeed v1:

[ngs@vngs20x ~]$ podman info|grep Cg
  CgroupVersion: v1

podman version:

[ngs@vngs20x ~]$ podman version
Version:            1.6.4
RemoteAPI Version:  1
Go Version:         go1.13.4
OS/Arch:            linux/amd64

Command used and terminal output

Call the pipeline

nextflow run nf-core/taxprofiler -r eaef6ac9bc --input SampleSheet_v5.0.csv --databases RefDBs_v1.csv --outdir decontamination -profile podman --save_hostremoval_unmapped --perform_shortread_qc --perform_shortread_complexityfilter --perform_shortread_hostremoval --shortread_hostremoval_index "/path/to/index" --hostremoval_reference "/path/to/primary_assembly.fa.gz" --max_cpus 12 --max_memory 42.GB -bg # see /usr/share/containers/libpod.conf

returns:

[50/d230e3] Submitted process > NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)
Error executing process > 'NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)'

Caused by:
  Process `NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)` terminated with an error exit status (125)

Command executed:

  check_samplesheet.py \
      SampleSheet_v5.0.csv \
      samplesheet.valid.csv

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK":
      python: $(python --version | sed 's/Python //g')
  END_VERSIONS

Command exit status:
  125

Command output:
  (empty)

Command error:
  Error: invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd

Work dir:
  /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2/work/50/d230e3f6aecdad845e595b5a472c73

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

Execution cancelled -- Finishing pending tasks before exit
-[nf-core/taxprofiler] Pipeline completed with errors-

### Relevant files

Jun-01 16:25:10.052 [main] DEBUG nextflow.cli.Launcher - $> nextflow run nf-core/taxprofiler -r eaef6ac9bc --input SampleSheet_v5.0.csv --databases RefDBs_v1.csv --outdir decontamination -profile podman --save_hostremoval_unmapped --perform_shortread_qc --perform_shortread_complexityfilter --perform_shortread_hostremoval --shortread_hostremoval_index /nexus/sdenil/microbiome/Project3_CSF_shotgun_CharlotteMichel/referenceIndexes/bowtie2 --hostremoval_reference /nexus/sdenil/microbiome/Project3_CSF_shotgun_CharlotteMichel/referenceIndexes/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz --cgroup-manager=systemd --max_cpus 12 --max_memory 42.GB -bg Jun-01 16:25:10.155 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 22.10.1 Jun-01 16:25:10.169 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; embedded=false; plugins-dir=/home/ngs/.nextflow/plugins; core-plugins: nf-amazon@1.11.0,nf-azure@0.14.2,nf-codecommit@0.1.2,nf-console@1.0.4,nf-ga4gh@1.0.4,nf-google@1.4.4,nf-tower@1.5.5,nf-wave@0.5.2 Jun-01 16:25:10.183 [main] INFO org.pf4j.DefaultPluginStatusProvider - Enabled plugins: [] Jun-01 16:25:10.185 [main] INFO org.pf4j.DefaultPluginStatusProvider - Disabled plugins: [] Jun-01 16:25:10.187 [main] INFO org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode Jun-01 16:25:10.196 [main] INFO org.pf4j.AbstractPluginManager - No plugins Jun-01 16:25:10.207 [main] DEBUG nextflow.scm.ProviderConfig - Using SCM config path: /home/ngs/.nextflow/scm Jun-01 16:25:10.986 [main] DEBUG nextflow.scm.AssetManager - Git config: /home/ngs/.nextflow/assets/nf-core/taxprofiler/.git/config; branch: master; remote: origin; url: https://github.com/nf-core/taxprofiler.git Jun-01 16:25:11.001 [main] DEBUG nextflow.scm.RepositoryFactory - Found Git repository result: [RepositoryFactory] Jun-01 16:25:11.008 [main] DEBUG nextflow.scm.AssetManager - Git config: /home/ngs/.nextflow/assets/nf-core/taxprofiler/.git/config; branch: master; remote: origin; url: https://github.com/nf-core/taxprofiler.git Jun-01 16:25:11.929 [main] DEBUG nextflow.config.ConfigBuilder - Found config base: /home/ngs/.nextflow/assets/nf-core/taxprofiler/nextflow.config Jun-01 16:25:11.930 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/ngs/.nextflow/assets/nf-core/taxprofiler/nextflow.config Jun-01 16:25:11.939 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: podman Jun-01 16:25:12.904 [main] DEBUG nextflow.config.ConfigBuilder - Available config profiles: [cfc_dev, ifb_core, denbi_qbic, alice, mjolnir_globe, uppmax, uge, rosalind_uge, test_nothing, lugh, unibe_ibu, vai, czbiohub_aws, jax, ccga_med, scw, tigem, tubingen_apg, google, ipop_up, googlels, eddie, medair, bi, bigpurple, sbc_sharc, adcra, cedars, vsc_kul_uhasselt, pawsey_nimbus, ucl_myriad, test_motus, utd_ganymede, charliecloud, icr_davros, ceres, munin, arm, test_nopreprocessing, rosalind, hasta, cfc, uzh, ebc, ku_sund_dangpu, ccga_dx, crick, marvin, biohpc_gen, shifter, mana, mamba, wehi, awsbatch, imperial, maestro, genotoul, abims, janelia, nihbiowulf, nu_genomics, googlebatch, oist, sahmri, mpcdf, leicester, vsc_ugent, sage, cambridge, test_noprofiling, podman, cheaha, xanadu, test, computerome, seg_globe, sanger, dkfz, pasteur, test_full, azurebatch, hki, crukmi, docker, engaging, gis, psmn, eva, fgcz, conda, crg, singularity, prince, utd_sysbio, debug, genouest, cbe, phoenix, gitpod, seawulf, test_krakenuniq, uct_hpc, aws_tower, binac] Jun-01 16:25:12.939 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=2 from script declararion Jun-01 16:25:12.939 [main] INFO nextflow.cli.CmdRun - Launching https://github.com/nf-core/taxprofiler [loving_morse] DSL2 - revision: eaef6ac9bc [1.0.0] Jun-01 16:25:12.940 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[] Jun-01 16:25:12.940 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[] Jun-01 16:25:12.942 [main] DEBUG nextflow.secret.LocalSecretsProvider - Secrets store: /home/ngs/.nextflow/secrets/store.json Jun-01 16:25:12.944 [main] DEBUG nextflow.secret.SecretsLoader - Discovered secrets providers: [nextflow.secret.LocalSecretsProvider@57416e49] - activable => nextflow.secret.LocalSecretsProvider@57416e49 Jun-01 16:25:12.989 [main] DEBUG nextflow.Session - Session UUID: b45c77c8-bf00-4a44-9a9e-0b8ef0a63fa8 Jun-01 16:25:12.989 [main] DEBUG nextflow.Session - Run name: loving_morse Jun-01 16:25:12.989 [main] DEBUG nextflow.Session - Executor pool size: 10 Jun-01 16:25:13.004 [main] DEBUG nextflow.util.ThreadPoolBuilder - Creating thread pool 'FileTransfer' minSize=10; maxSize=30; workQueue=LinkedBlockingQueue[10000]; allowCoreThreadTimeout=false Jun-01 16:25:13.028 [main] DEBUG nextflow.cli.CmdRun - Version: 22.10.1 build 5828 Created: 27-10-2022 16:58 UTC (18:58 CEST) System: Linux 4.18.0-193.28.1.el8_2.x86_64 Runtime: Groovy 3.0.13 on OpenJDK 64-Bit Server VM 17.0.3-internal+0-adhoc..src Encoding: UTF-8 (UTF-8) Process: 767337@vngs20x [10.21.0.64] CPUs: 10 - Mem: 125.9 GB (2.2 GB) - Swap: 16 GB (15.9 GB) Jun-01 16:25:13.057 [main] DEBUG nextflow.Session - Work-dir: /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2/work [nfs] Jun-01 16:25:13.070 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[] Jun-01 16:25:13.077 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory Jun-01 16:25:13.197 [main] DEBUG nextflow.cache.CacheFactory - Using Nextflow cache factory: nextflow.cache.DefaultCacheFactory Jun-01 16:25:13.203 [main] DEBUG nextflow.util.CustomThreadPool - Creating default thread pool > poolSize: 11; maxThreads: 1000 Jun-01 16:25:13.297 [main] DEBUG nextflow.Session - Session start Jun-01 16:25:13.301 [main] DEBUG nextflow.trace.TraceFileObserver - Workflow started -- trace file: /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2/decontamination/pipeline_info/execution_trace_2023-06-01_16-25-12.txt Jun-01 16:25:13.308 [main] DEBUG nextflow.Session - Using default localLib path: /home/ngs/.nextflow/assets/nf-core/taxprofiler/lib Jun-01 16:25:13.310 [main] DEBUG nextflow.Session - Adding to the classpath library: /home/ngs/.nextflow/assets/nf-core/taxprofiler/lib Jun-01 16:25:13.310 [main] DEBUG nextflow.Session - Adding to the classpath library: /home/ngs/.nextflow/assets/nf-core/taxprofiler/lib/nfcore_external_java_deps.jar Jun-01 16:25:13.985 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution Jun-01 16:25:14.024 [main] INFO nextflow.Nextflow -

------------------------------------------------------ ,--./,-.  _ _ /,-..--~'  |\ | | / ` / \ |) | } {  | | | _, __/ | \ |__ `-.,--, .,.,'  nf-core/taxprofiler v1.0.0-geaef6ac ------------------------------------------------------ Core Nextflow options revision : 1.0.0 runName : loving_morse containerEngine : podman launchDir : /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2 workDir : /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2/work projectDir : /home/ngs/.nextflow/assets/nf-core/taxprofiler userName : ngs profile : podman configFiles : /home/ngs/.nextflow/assets/nf-core/taxprofiler/nextflow.config

Input/output options input : SampleSheet_v5.0.csv databases : RefDBs_v1.csv outdir : decontamination

Preprocessing short-read QC options perform_shortread_qc : true shortread_qc_adapter1 : null shortread_qc_adapter2 : null shortread_qc_adapterlist : null perform_shortread_complexityfilter: true

Preprocessing host removal options perform_shortread_hostremoval : true hostremoval_reference : /nexus/sdenil/microbiome/Project3_CSF_shotgun_CharlotteMichel/referenceIndexes/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz shortread_hostremoval_index : /nexus/sdenil/microbiome/Project3_CSF_shotgun_CharlotteMichel/referenceIndexes/bowtie2 longread_hostremoval_index : null save_hostremoval_unmapped : true

Postprocessing and visualisation options krona_taxonomy_directory : null

Max job request options max_cpus : 12 max_memory : 42.GB

!! Only displaying parameters that differ from the pipeline defaults !! ------------------------------------------------------ If you use nf-core/taxprofiler for your analysis please cite:

Caused by: Process NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv) terminated with an error exit status (125)

Command executed:

check_samplesheet.py \ SampleSheet_v5.0.csv \ samplesheet.valid.csv

cat <<-END_VERSIONS > versions.yml "NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK": python: $(python --version | sed 's/Python //g') END_VERSIONS

Command exit status: 125

Command output: (empty)

Command error: Error: invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd

Work dir: /nexus/Analysis/microbiology/shotgunWGS/230517_A00154_1280_BHJ3C3DRX2/work/e9/359926d308d6cc19326c591fd423d4

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named .command.sh Jun-01 16:25:19.937 [Actor Thread 7] DEBUG nextflow.file.SortFileCollector - FileCollector temp dir not removed: null Jun-01 16:25:19.942 [Task monitor] INFO nextflow.Session - Execution cancelled -- Finishing pending tasks before exit Jun-01 16:25:19.945 [main] DEBUG nextflow.Session - Session await > all processes finished Jun-01 16:25:19.946 [main] DEBUG nextflow.Session - Session await > all barriers passed Jun-01 16:25:19.947 [main] INFO nextflow.Nextflow - -[nf-core/taxprofiler] Pipeline completed with errors- Jun-01 16:25:19.950 [main] DEBUG nextflow.trace.WorkflowStatsObserver - Workflow completed > WorkflowStats[succeededCount=0; failedCount=1; ignoredCount=0; cachedCount=0; pendingCount=0; submittedCount=0; runningCount=0; retriesCount=0; abortedCount=0; succeedDuration=0ms; failedDuration=278ms; cachedDuration=0ms;loadCpus=0; loadMemory=0; peakRunning=1; peakCpus=1; peakMemory=1 GB; ] Jun-01 16:25:19.950 [main] DEBUG nextflow.trace.TraceFileObserver - Workflow completed -- saving trace file Jun-01 16:25:19.951 [Actor Thread 17] DEBUG nextflow.util.CacheHelper - Hash asset file sha-256: /home/ngs/.nextflow/assets/nf-core/taxprofiler/assets/multiqc_config.yml Jun-01 16:25:19.952 [main] DEBUG nextflow.trace.ReportObserver - Workflow completed -- rendering execution report Jun-01 16:25:19.952 [Actor Thread 17] DEBUG nextflow.util.CacheHelper - Hash asset file sha-256: /home/ngs/.nextflow/assets/nf-core/taxprofiler/docs/images/nf-core-taxprofiler_logo_custom_light.png Jun-01 16:25:19.970 [main] DEBUG nextflow.trace.ReportObserver - Execution report summary data: [{"cpuUsage":null,"process":"SAMPLESHEET_CHECK","mem":null,"memUsage":null,"timeUsage":null,"vmem":null,"reads":null,"cpu":null,"time":{"mean":278,"min":278,"q1":278,"q2":278,"q3":278,"max":278,"minLabel":"NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)","maxLabel":"NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)","q1Label":"NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)","q2Label":"NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)","q3Label":"NFCORE_TAXPROFILER:TAXPROFILER:INPUT_CHECK:SAMPLESHEET_CHECK (SampleSheet_v5.0.csv)"},"writes":null}] Jun-01 16:25:20.363 [main] DEBUG nextflow.trace.TimelineObserver - Workflow completed -- rendering execution timeline Jun-01 16:25:20.459 [main] DEBUG nextflow.cache.CacheDB - Closing CacheDB done Jun-01 16:25:20.490 [main] DEBUG nextflow.util.ThreadPoolManager - Thread pool 'FileTransfer' shutdown completed (hard=false) Jun-01 16:25:20.491 [main] DEBUG nextflow.script.ScriptRunner - > Execution complete -- Goodbye



### System information

nextflow version 22.10.1.5828
container engine: podman
OS: CentOS 8
version of nf-core/taxprofiler: nextflow version 22.10.1.5828
jfy133 commented 1 year ago

Hi @BCArg

I believe this is a nextflow issue rather than taxprofiler.

If cgroups v2 is a podman/container specific thing (which as far as I can tell it is), then you will to consult the Nextflow documentation (e.g. maybe here: https://www.nextflow.io/docs/latest/container.html#container-podman). I unfortunately don't have any experience with podman myself, but I've seen errors with cGroups being reported on other container engines.

If you can't find the issue you could also search/ask on the Nextflow, and maybe nf-core slack workspaces.

If you still don't solve the issue after consulting the above, please feel free to re-open this issue.