c-guzman / cipher-workflow-platform

A data processing platform for ChIP-seq, RNA-seq, MNase-seq, DNase-seq, ATAC-seq and GRO-seq datasets. Please ignore information on cipher.readthedocs.io, it is currently out of date. Follow information in README.
19 stars 5 forks source link

set threads=12 but still submit single cpu job to the cluster #8

Open shenscore opened 6 years ago

shenscore commented 6 years ago

Do I need to add 'cpus=12' to the nextflow configure file? But this may cause all jobs with a requirement of 12 logic cpus.

c-guzman commented 6 years ago

Are you setting up your config.txt file correctly? You mentioned you're using PBS right? So your config file should be set up to submit PBS jobs, and then you just run CIPHER on your login node like a regular script (do not submit a job script).

On Sun, Oct 15, 2017 at 11:34 PM, shen notifications@github.com wrote:

Do I need to add 'cpus=12' to the nextflow configure file? But this may cause all jobs with a requirement of 12 logic cpus.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/c-guzman/cipher-workflow-platform/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AO7fwr37-BE9pdSry6TeC_XzkyWXLWBPks5ssvkPgaJpZM4P6JFs .

-- Carlos Guzman - Graduate Student Bioinformatics & Systems Biology University of California, San Diego

*Phone*: (956) 437-6263 E-mail: cag104@ucsd.edu

shenscore commented 6 years ago

yes. my nextflow.config contains these: singularity.autoMounts = true singularity.enabled = true process { executor='pbs' queue='cal' }

And I run CIPHER on the login node.

c-guzman commented 6 years ago

Hmm. I'm not entirely familiar with running CIPHER on a PBS cluster. I've mainly used SLURM and it worked fine.

I don't think setting the cpus directive will solve the problem, by default CIPHER should be submitting one job per process. Sometimes it takes a while for jobs to submit and that may be why you only see one job submission, but if you'v been waiting a while then this probably isn't the problem.

My two suggestions:

  1. Try setting the "-qs 10" command right after nextflow run ... so it should be nextflow run -qs 10 cipher.nf --mode ... (only one - needed, qs stands for que size and should control the number of jobs submitted, perhaps your cluster doesn't allow someone to submit too many jobs at once).

  2. Try setting the cpus directive in the config file.

My last suggestion is to ask on the Nextflow google groups page and have an expert help you, since this really isn't a problem with CIPHER but with the core functionally of the Nextflow language itself.

Let me know.

On Sun, Oct 15, 2017 at 11:40 PM, shen notifications@github.com wrote:

yes. my nextflow.config contains these: singularity.autoMounts = true singularity.enabled = true process { executor='pbs' queue='cal' }

And I run CIPHER on the login node.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/c-guzman/cipher-workflow-platform/issues/8#issuecomment-336793896, or mute the thread https://github.com/notifications/unsubscribe-auth/AO7fwuTaNHwAhcmFdU5CMSAgJeS4zfF-ks5ssvpUgaJpZM4P6JFs .

-- Carlos Guzman - Graduate Student Bioinformatics & Systems Biology University of California, San Diego

*Phone*: (956) 437-6263 E-mail: cag104@ucsd.edu

shenscore commented 6 years ago

I can see serveral jobs submiting, but some job should ask the cluster for multi cpus.

but all the jobs submit with single cpu:

Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time


1176040.nfkd.cn shenwei small nf-mapping_bowt 30932 1 1 -- -- R 04:45 1176041.nfkd.cn shenwei small nf-mapping_bowt 30950 1 1 -- -- R 04:44 1176042.nfkd.cn shenwei small nf-mapping_bowt 30979 1 1 -- -- R 04:44

c-guzman commented 6 years ago

Ahh, I misunderstood. Sure, to use multiple cpus per process just make sure to add the --threads parameter to your nextflow script .... such as nextflow run cipher.nf --mode ..... bla bla .... --threads 30 or whatever. Hope that helps!

On Sun, Oct 15, 2017 at 11:57 PM, shen notifications@github.com wrote:

I can see serveral jobs submiting, but some job should ask the cluster for multi cpus.

but all the jobs submit with single cpu:

Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time

1176040.nfkd.cn shenwei small nf-mapping_bowt 30932 1 1 -- -- R 04:45 1176041.nfkd.cn shenwei small nf-mapping_bowt 30950 1 1 -- -- R 04:44 1176042.nfkd.cn shenwei small nf-mapping_bowt 30979 1 1 -- -- R 04:44

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/c-guzman/cipher-workflow-platform/issues/8#issuecomment-336796667, or mute the thread https://github.com/notifications/unsubscribe-auth/AO7fwhWFV0HZgu1ayel8Z7G5uZbsDDANks5ssv5VgaJpZM4P6JFs .

-- Carlos Guzman - Graduate Student Bioinformatics & Systems Biology University of California, San Diego

*Phone*: (956) 437-6263 E-mail: cag104@ucsd.edu

shenscore commented 6 years ago

yes, I did add --threads 12 parameter. but it didn't work

c-guzman commented 6 years ago

If that's the case then please try adding the cpus directive to your nextflow.config ... if that fixes the issue let me know

On Oct 16, 2017 12:02 AM, "shen" notifications@github.com wrote:

yes, I did add --threads 12 parameter. but it didn't work

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/c-guzman/cipher-workflow-platform/issues/8#issuecomment-336797651, or mute the thread https://github.com/notifications/unsubscribe-auth/AO7fwsZpHH8gwb1l2gjtGpk-hxY1ZmD3ks5ssv-WgaJpZM4P6JFs .

shenscore commented 6 years ago

no, it submit a job script with 12 threads parameter but without the cluster threads requirement. I think this can be solved by editting your cipher.nf file like this:

process process_name{

   cpus ${params.threads}
   input:
    ......
   output:
    .....
   script:
   """
   ...................
   """

}

c-guzman commented 6 years ago

Yes, I was hoping that specifying the cpu in the config file would go around this, i'll go ahead and edit the cipher script sometime today and get this to you ASAP.

On Mon, Oct 16, 2017 at 6:53 AM, shen notifications@github.com wrote:

no, it submit a job script with 12 threads parameter but without the cluster threads requirement. I think this can be solved by editting your cipher.nf file like this:

process process_name{

cpus ${params.threads} input: ...... output: ..... script: """ ................... """

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/c-guzman/cipher-workflow-platform/issues/8#issuecomment-336893480, or mute the thread https://github.com/notifications/unsubscribe-auth/AO7fwvBAdTFPXUyCslsj3KGcw16F62htks5ss1-_gaJpZM4P6JFs .

-- Carlos Guzman - Graduate Student Bioinformatics & Systems Biology University of California, San Diego

*Phone*: (956) 437-6263 E-mail: cag104@ucsd.edu