Open baj12 opened 6 years ago
Hi, I apologize for your inconvenience. Your second attempt './SNeCT demo/config_demo.txt demo/pancan12_demo.tensor results' was right. However, then, you should change some texts in 'demo/config_demo.txt' before running. You should change 'gene_network_demo.matrix' into 'demo/gene_network_demo.matrix' to run correctly. This is because the file 'config_demo.txt' should include the relative path of gene network matrix file towards the current path. I would find a better way to input the file paths and fix it. Thank you.
Hi, thanks for the quick responds. I am getting further, but I am still getting a core dump:
./SNeCT demo/config_demo.txt demo/pancan12_demo.tensor results
Reading input
Elapsed Time: 0.206631
Reading Done.
Norm : 293.478923
Initialize
Elapsed Time: 0.000630
CMTF START
Segmentation fault: 11
Any further suggestions?
That is very strange. I am not sure but one possible reason is that your environment does not support parallelization. I suggest to change the 4th line of config_demo.txt from 2 to 1. This means the number of parallel cores you want to run.
Yes, that helps as well ;). Now it seems to be running. Do you have any suggestion on how check what is going on? I explicitly checked that openMP is working by using a small sample program... Thx again.
Sorry I have no idea right now, do you mean your openMP parallelization is correctly working in other programs?
yes.. I used the following code:
#include <iostream>
#include <cmath>
#include <vector>
#include <omp.h>
int main( int argc, char* argv[] )
{
omp_set_num_threads( 8 );
double pi = acos( -1.0 );
std::cout << "Allocating memory ..." << std::endl;
std::vector<double> my_vector( 128000000, 0.0 );
std::cout << "Done!" << std::endl << std::endl;
std::cout << "Entering main loop ... " << std::endl;
#pragma omp parallel for
for( int i=0; i < my_vector.size(); i++ )
{
my_vector[i] = exp( -sin( i*i + pi*log(i+1) ) );
}
std::cout << "Done!" << std::endl;
return 0;
}
and I can run it without any problem... I also checked that it actually uses 8 threads...
Your openMP may not allow asynchronous update. I recommend you to try only using single core by editing the 4th line of 'config_demo.txt' from 2 to 1.
Hi, I wanted to test your program but get an error message:
As you can see the program has compile successfully, debugging also doesn't really work (I have compiled with -g)
I am running on Mac - high sierra...
Thanks for any feedback and help.