Tuesday, January 26, 2010

My Fault

I wanted to play with the binning of my correlation functions, and so tried to run again with different bin sizes. I got the following message when I tried to run the 2D cross correlation:

In [111]: runcrossCorr(argumentFile, corr2dfile, spec2dfile, photo2dfile, nrbins, minRaS, maxRaS, minDecS, maxDecS, minRaP, maxRaP, minDecP, maxDecP, mincorr, maxcorr, corrBins)
sh: line 1: 15436 Segmentation fault ./2dcorrFinal wpsInputs0 >./wps0.dat
sh: line 1: 15445 Segmentation fault ./2dcorrFinal wpsInputs1 >./wps1.dat
sh: line 1: 15447 Segmentation fault ./2dcorrFinal wpsInputs2 >./wps2.dat
sh: line 1: 15449 Segmentation fault ./2dcorrFinal wpsInputs3 >./wps3.dat
sh: line 1: 15455 Segmentation fault ./2dcorrFinal wpsInputs4 >./wps4.dat
sh: line 1: 15460 Segmentation fault ./2dcorrFinal wpsInputs5 >./wps5.dat
sh: line 1: 15462 Segmentation fault ./2dcorrFinal wpsInputs6 >./wps6.dat
sh: line 1: 15471 Segmentation fault ./2dcorrFinal wpsInputs7 >./wps7.dat
sh: line 1: 15473 Segmentation fault ./2dcorrFinal wpsInputs8 >./wps8.dat
sh: line 1: 15482 Segmentation fault ./2dcorrFinal wpsInputs9 >./wps9.dat
sh: line 1: 15484 Segmentation fault ./2dcorrFinal wpsInputs10 >./wps10.dat
sh: line 1: 15489 Segmentation fault ./2dcorrFinal wpsInputs11 >./wps11.dat
sh: line 1: 15495 Segmentation fault ./2dcorrFinal wpsInputs12 >./wps12.dat
sh: line 1: 15508 Segmentation fault ./2dcorrFinal wpsInputs13 >./wps13.dat
sh: line 1: 15548 Segmentation fault ./2dcorrFinal wpsInputs14 >./wps14.dat
sh: line 1: 15596 Segmentation fault ./2dcorrFinal wpsInputs15 >./wps15.dat

Have I mentioned how much I hate Segmentation Faults?

After an hour of debugging I finally figured out that I had left out a line of code that converted from radians to degrees. I really need to put better error checks into the code so that it prints a message when something like this happens, rather than dying.

Kinda mad at the world now.

No comments:

Post a Comment