making some changes to troubleshoot segfault

This commit is contained in:
Otho Ulrich 2016-06-10 12:31:12 -04:00
parent 49309209f6
commit bc48cf7b84
3 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,7 @@ int main( int argc , char* argv[] ){
void do_work( char* fname ){ void do_work( char* fname ){
/************ Reading the input file ***********/ /************ Reading the input file ***********/
ifstream fp(fname); ifstream fp(fname);
string line,mcmcfile; stringstream ss; string line,mcmcfile; stringstream ss;
int i,nfiles,nfq,mode,npar,bin1,bin2,fit_type,nrun,nburn,nwk; bool strict; int i,nfiles,nfq,mode,npar,bin1,bin2,fit_type,nrun,nburn,nwk; bool strict;
@ -59,6 +60,7 @@ void do_work( char* fname ){
for(i=0;i<nfiles;i++) readLC( LC , files[i] , secL[i] , bin1 , bin2 , strict ); for(i=0;i<nfiles;i++) readLC( LC , files[i] , secL[i] , bin1 , bin2 , strict );
/******** END Read the light curves ************/ /******** END Read the light curves ************/
if( mode > 0 or mode==-1 ){ if( mode > 0 or mode==-1 ){
vec errs; errs.setlength(nfq); vec errs; errs.setlength(nfq);
vector<lcurve> lc1; for( i=0 ; i<int(LC.size()) ; i++ ){ lc1.push_back( LC[i][0]); } vector<lcurve> lc1; for( i=0 ; i<int(LC.size()) ; i++ ){ lc1.push_back( LC[i][0]); }
@ -159,7 +161,6 @@ void readLC( vector<vector<lcurve> >&LC , string fname , int secL , int b1 , int
/* Initialize file stream, define some variables */ /* Initialize file stream, define some variables */
ifstream fp(fname.c_str()); string line,sdum; stringstream ss; ifstream fp(fname.c_str()); string line,sdum; stringstream ss;
int i,j,nlc,n,nsec,ns,sl; double dt; int i,j,nlc,n,nsec,ns,sl; double dt;
/* read dt from the description line */ /* read dt from the description line */
getline(fp,line); ss.str(line); ss >> sdum >> dt >> nlc; ss.clear(); getline(fp,line); ss.str(line); ss >> sdum >> dt >> nlc; ss.clear();
@ -193,6 +194,7 @@ void readLC( vector<vector<lcurve> >&LC , string fname , int secL , int b1 , int
}else { }else {
Lc.push_back(lcurve(t,lc[b1],lce[b1],dt)); Lc.push_back(lcurve(t,lc[b1],lce[b1],dt));
} }
cerr << "Yo6!";
// Do we need a second light curve? // Do we need a second light curve?
if(b2!=-1){Lc.push_back(lcurve(t,lc[b2],lce[b2],dt));} if(b2!=-1){Lc.push_back(lcurve(t,lc[b2],lce[b2],dt));}

View File

@ -1,6 +1,7 @@
incdir='/home/caes/science/psdlag-agn/src/' #incdir='/home/caes/science/psdlag-agn/src/'
incdir='/Users/othoulrich/science/psdlag-agn/src'
psdlag: psdlag: