lhhunghimself / fastBMA

Fast, scalable, parallel and distributed inference of very large networks by Bayesian Model Averaging
MIT License
4 stars 3 forks source link

std::bad_array_new_length Aborted (core dumped) #6

Open ChristianCortes opened 6 years ago

ChristianCortes commented 6 years ago

Hi, Thanks for fixing the bug to reading the priors list. I complied fastBMA works perfectly when is run with the sample data. But still i get the same error when is run with my data.

fastBMA -t -o 4 -n 16 -m /homes/users/ccortes/fastBMA/input/gData_filtered_arcsine_expN.txt --edgeMin 0.5 --priorsList /homes/users/ccortes/fastBMA/input/wedgelist_kegg_gData_filtered_graphite.txt --residuals --showPrune --verbose --time > /homes/users/ccortes/fastBMA/output/fastBMA_gData_filtered_arcsine_expN.txt Input Parameters: priorsList: /homes/users/ccortes/fastBMA/input/wedgelist_kegg_gData_filtered_graphite.txt matrixFile: /homes/users/ccortes/fastBMA/input/gData_filtered_arcsine_expN.txt nThreads: 16 minimum edgeWeight: 0.5 g set to number of sqrt(nsamples) g optimized: 4 bits g maxOptimizeCycles: 20 matrix interpreted as time series Uninformed Prior: 0.00046 oddsRatio: 10000 Do not show edges to same node All variables used verbose on Do no remove but indicate redundant direct edges terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length Aborted (core dumped)

I am running fastBMA in one machine with 16 cores and 500GB without MPI.

I do not think the problem is memory. Can be is may data? matrixFile is 9x2974 (row x col) 3 times points with 3 replica each per 2974 genes priorsList is 6076x3 (row x col) - smaller that yours

Thanks again

lhhunghimself commented 6 years ago

The bad_array_new_length error suggests that a negative array size is being passed.

This can occur when the number of genes is determined to be negative from the header line (fastBMA assumes that the number of genes is the number of fields in the header in the time series file less 3)

So I would check the header on your time series file. Is it present? Are you using spaces instead of tabs to delimit your columns?

ChristianCortes commented 6 years ago

Hi, Thanks for your response. It was a bug in my code that generate incorrect tabs positions. But know I'm getting.

fastBMA -t -o 4 -n 4 -m /homes/users/ccortes/fastBMA/input/gData_f_tf_rawlog2_table.tsv --edgeMin 0.5 --priorsList /homes/users/ccortes/fastBMA/input/wedgelist_reactome_gData_f_tf_graphite.tsv --residuals --showPrune --verbose --time > /homes/users/ccortes/fastBMA/output/fgData_f_tf_rawlog2.txt Input Parameters: priorsList: /homes/users/ccortes/fastBMA/input/wedgelist_reactome_gData_f_tf_graphite.tsv matrixFile: /homes/users/ccortes/fastBMA/input/gData_f_tf_rawlog2_table.tsv nThreads: 4 minimum edgeWeight: 0.5 g set to number of sqrt(nsamples) g optimized: 4 bits g maxOptimizeCycles: 20 matrix interpreted as time series Uninformed Prior: 0.00046 oddsRatio: 10000 Do not show edges to same node All variables used verbose on Do no remove but indicate redundant direct edges Segmentation fault (core dumped)

Any ideas?

lhhunghimself commented 6 years ago

It's probably something with your data. fastBMA gets its sizes and gene names from the header row. If you have more columns later in your actual data then this may cause a segfault. So probably still a bug in your tab code if I had to guess.

ChristianCortes commented 6 years ago

Actually, the number and rows and columns is correct (checked using awk). The problems was that my data was sorted by time and not replicate like yours. After order by replicate, I did not get that error any more.

lhhunghimself commented 6 years ago

Thanks for letting me know. I'll see if I can add something to the documentation so that others can avoid these problems.