JAFFA icon indicating copy to clipboard operation
JAFFA copied to clipboard

Multiple threading is not working

Open albuskilili opened this issue 2 years ago • 12 comments

Hi,

I am using JAFFAL for the first time and trying to run it with multiple threading. I have used the following command but looks like multiple threading is not working. Could you please advise me on that? I have checked previous issues and found that adding "-n " will activate this but it is not working in my case.

Commands: /bin/jaffa/tools/bin/bpipe run -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy barcode01/*fastq.gz barcode02/*fastq.gz barcode03/*fastq.gz

Thank you very much for your help. Albus

albuskilili avatar Oct 19 '22 08:10 albuskilili

Hi @nadiadavidson Any help here please? Alb

ada2880 avatar Oct 24 '22 03:10 ada2880

Hi,

Would you be able to provide a little more detail. How did you assess that it wasn't using multiple threads? Is it running each of your samples sequentially and using just one thread across all stages of the pipelines? Are you able to reproduce this behaviour using the demo data? if so please send me the command and I will investigate further.

Cheers, Nadia.

nadiadavidson avatar Oct 24 '22 05:10 nadiadavidson

Hi @nadiadavidson,

Thank you for your reply.

I checked the multiple threading with 'htop' . I am running multiple samples as it shows on one command. When I check htop it shows that it uses only one core for three samples. When I run it with one sample it doesn't use more than one core too.

The code for one sample: /bin/jaffa/tools/bin/bpipe run -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy /datoslab/huki/8samples/barcode01/*fastq.gz

I have run this with the Demo data (after I unzipped with tar -xvf LongReadFusionSimulation.tar ) using the following command: /bin/jaffa/tools/bin/bpipe run -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy LongReadFusionSimulation/*.fastq.gz

However, I got the following error:

`WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/usr/bin/jaffa/tools/bpipe-0.9.9.2/bin/../lib/bpipe.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

| Starting Pipeline at 2022-10-24 08:40 |

========================================= Stage run_check ========================================== Running JAFFA version 2.4_dev Checking for required data files... /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt CAN'T FIND /bin/jaffa/mm39.fa... PLEASE DOWNLOAD and/or FIX PATH... STOPPING NOW ERROR: Command failed with exit status = 1 :

echo "Running JAFFA version 2.4_dev" ; echo "Checking for required data files..." ; for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Masked_mm39.1.bt2 /bin/jaffa/mm39_genCode22.1.bt2 ; do ls $i 2>/dev/null || { echo "CAN'T FIND $i..." ; echo "PLEASE DOWNLOAD and/or FIX PATH... STOPPING NOW" ; exit 1 ; } ; done ; echo "All looking good" ; echo "running JAFFA version 2.4_dev.. checks passed" > checks

========================================= Pipeline Failed ==========================================

Command failed with exit status = 1 :

echo "Running JAFFA version 2.4_dev" ; echo "Checking for required data files..." ; for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Masked_mm39.1.bt2 /bin/jaffa/mm39_genCode22.1.bt2 ; do ls $i 2>/dev/null || { echo "CAN'T FIND $i..." ; echo "PLEASE DOWNLOAD and/or FIX PATH... STOPPING NOW" ; exit 1 ; } ; done ; echo "All looking good" ; echo "running JAFFA version 2.4_dev.. checks passed" > checks

Use 'bpipe errors' to see output from failed commands.`

And here is the command log.txt ` ####################################################################################################

Starting pipeline at Mon Oct 24 08:39:57 UTC 2022

Input files: [LongReadFusionSimulation/ONT_fus_sim_75err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_80err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_85err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_90err.fastq.gz, LongRead>

Output Log: .bpipe/logs/498070.log

Stage run_check

echo "Running JAFFA version 2.4_dev" ; echo "Checking for required data files..." ; for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Ma>

################ Finished at Mon Oct 24 08:39:58 UTC 2022 Duration = 0.592 seconds

####################################################################################################

Starting pipeline at Mon Oct 24 08:40:47 UTC 2022

Input files: [LongReadFusionSimulation/ONT_fus_sim_75err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_80err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_85err.fastq.gz, LongReadFusionSimulation/ONT_fus_sim_90err.fastq.gz, LongRead>

Output Log: .bpipe/logs/498737.log

Stage run_check

echo "Running JAFFA version 2.4_dev" ; echo "Checking for required data files..." ; for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Ma>

################ Finished at Mon Oct 24 08:40:47 UTC 2022 Duration = 0.578 seconds

`

albuskilili avatar Oct 24 '22 08:10 albuskilili

Hi,

Can you please try running: /bin/jaffa/tools/bin/bpipe test -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy /datoslab/huki/8samples/barcode01/*fastq.gz

And then the same thing (bpipe test) on just one file.

These will print the command JAFFAL will run and hopefully will tell us if the threads parameter is being passed correctly to the subcommands. You may need to get a new run of JAFFAL going in a new directory, interrupt it using Ctrl-C, then run this test command.

What type of machine are you running on? Did you install all the dependent software using the installation script provided?

Hopefully we can get to the bottom of this. Thank you for reporting it.

Cheers, Nadia.

nadiadavidson avatar Oct 24 '22 09:10 nadiadavidson

Hi Nadia,

I have installed using the script provided and I am using Linux Server.

When I run the entire folder with the following code, nothing happens. It just shows that line is running but no output and still uses 1 core when I check the htop.

/bin/jaffa/tools/bin/bpipe test -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy /8samples/barcode01/*fastq.gz

However, when I run only one fastq file with the following command I get the log. Command: /bin/jaffa/tools/bin/bpipe test -n 60 -p genome=mm39 -p annotation-genCode22 /bin/jaffa/JAFFAL.groovy /8samples/barcode01/PAM60621_pass_barcode01_f2660b5a_591.fastq.gz

This is the output from it:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/usr/bin/jaffa/tools/bpipe-0.9.9.2/bin/../lib/bpipe.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

| Starting Pipeline at 2022-10-27 20:50 |

========================================= Stage run_check ==========================================

Abort due to Test Mode!

Would execute echo "Running JAFFA version 2.4_dev" ;             echo "Checking for required data files..." ;             for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Masked_mm39.1.bt2 /bin/jaffa/mm39_genCode22.1.bt2 ;                   do ls $i 2>/dev/null || { echo "CAN'T FIND $i..." ;              echo "PLEASE DOWNLOAD and/or FIX PATH... STOPPING NOW" ; exit 1  ; } ; done ;             echo "All looking good" ;             echo "running JAFFA version 2.4_dev.. checks passed" > checks

===================================== Pipeline Test Succeeded ======================================

Use 'bpipe errors' to see output from failed commands.

####################################################################################################

Starting pipeline at Thu Oct 27 20:50:34 UTC 2022

Input files: /datoslab/huki/8samples/barcode01/PAM60621_pass_barcode01_f2660b5a_591.fastq.gz

Output Log: .bpipe/logs/2907550.log

Stage run_check

echo "Running JAFFA version 2.4_dev" ; echo "Checking for required data files..." ; for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.>

################ Finished at Thu Oct 27 20:50:34 UTC 2022 Duration = 0.256 seconds

Please also find attached CommandLog from this run, Cheers, Albus

commandlog.txt

albuskilili avatar Oct 27 '22 20:10 albuskilili

Dear @nadiadavidson , We look forward to hearing from you :) Thanks :)

ada2880 avatar Nov 01 '22 08:11 ada2880

Hi,

Sorry for the slow reply. Things are busy as I'm the sole maintainer and running a research group! @ssadedin may have some ideas about the groovy warning and whether that would be related.

Would you be able to run the pipeline for a little while (say 5 minutes?) "bpipe run..." and then stop and rerun "bpipe test" to see if the threads are being passed correctly?

Cheers, Nadia.

nadiadavidson avatar Nov 01 '22 09:11 nadiadavidson

Hi @nadiadavidson,

Thank you for your reply. I will try that and get back to you asap.

Thanks, Albus

albuskilili avatar Nov 01 '22 09:11 albuskilili

Hi @nadiadavidson and @ssadedin,

Please find attached command log.txt This is the output from pipe test:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/usr/bin/jaffa/tools/bpipe-0.9.9.2/bin/../lib/bpipe.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

| Starting Pipeline at 2022-11-01 11:49 |

========================================= Stage run_check ==========================================

Abort due to Test Mode!

Would execute echo "Running JAFFA version 2.4_dev" ;             echo "Checking for required data files..." ;             for i in /bin/jaffa/mm39_genCode22.fa /bin/jaffa/mm39_genCode22.tab /bin/jaffa/known_fusions.txt /bin/jaffa/mm39.fa /bin/jaffa/Masked_mm39.1.bt2 /bin/jaffa/mm39_genCode22.1.bt2 ;                   do ls $i 2>/dev/null || { echo "CAN'T FIND $i..." ;              echo "PLEASE DOWNLOAD and/or FIX PATH... STOPPING NOW" ; exit 1  ; } ; done ;             echo "All looking good" ;             echo "running JAFFA version 2.4_dev.. checks passed" > checks

===================================== Pipeline Test Succeeded ======================================

Use 'bpipe errors' to see output from failed commands.

Best, Albus commandlog.txt

albuskilili avatar Nov 01 '22 11:11 albuskilili

Hi @nadiadavidson and @ssadedin,

Can we get any help, please? we are desperate. Without multithreading Jaffal has been running for a month.

Thank you, Alb

ada2880 avatar Nov 07 '22 11:11 ada2880

Hi Alb,

This sounds very odd. One sample with one thread should not take longer than a few days. If you subset the data to say 1 million reads and run with one thread what happens?

Cheers, Nadia.

nadiadavidson avatar Nov 08 '22 05:11 nadiadavidson

Also, just wondering if there is something unusual about the custom reference you are using. Would you be able to post the result of "ls -l /bin/jaffa/", describe the read data you are processing and the specs of the linux server you are using?

Cheers, Nadia.

nadiadavidson avatar Nov 08 '22 10:11 nadiadavidson