Changeset 64fa9e for pcp


Ignore:
Timestamp:
Apr 21, 2008, 2:19:24 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
e00f47
Parents:
32de28
git-author:
Frederik Heber <heber@…> (04/18/08 14:51:49)
git-committer:
Frederik Heber <heber@…> (04/21/08 14:19:24)
Message:

Free(): now takes a debug string to know where free error occured

Location:
pcp/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/grad.c

    r32de28 r64fa9e  
    9191  Grad->GradientArray[GraSchGradient] = NULL;
    9292  for (i=1; i<MaxGradientArrayTypes; i++)
    93     Free(Grad->GradientArray[i]);
     93    Free(Grad->GradientArray[i], "RemoveGradients: Grad->GradientArray[i]");
    9494}
    9595
  • pcp/src/gramsch.c

    r32de28 r64fa9e  
    698698      fprintf(stderr,"(%i) MyLocalNo = %i, MyGlobalNo = %i/%i, f = %lg, Type: %i, GramSch: %i, me_comm: %d, my_color_comm: %d \n",P->Par.me, Psi->AllPsiStatus[i].MyLocalNo, i, Psi->AllPsiStatus[i].MyGlobalNo, Psi->AllPsiStatus[i].PsiFactor, Psi->AllPsiStatus[i].PsiType, Psi->AllPsiStatus[i].PsiGramSchStatus, Psi->AllPsiStatus[i].me_comm_ST_Psi, Psi->AllPsiStatus[i].my_color_comm_ST_Psi);
    699699     
    700   Free(recvcounts);
    701   Free(displs);
     700  Free(recvcounts, "UpdateGramSchAllPsiStatus: recvcounts");
     701  Free(displs, "UpdateGramSchAllPsiStatus: displs");
    702702}
    703703
  • pcp/src/init.c

    r32de28 r64fa9e  
    106106  }
    107107  if (setit) strcat(P->Files.mainname,"/");
    108   if (dummy) Free(dummy);
     108  if (dummy) Free(dummy, "CreateMainname: dummy");
    109109  P->Files.mainpath = (char*) /* Speicher fuer P->Files.mainname */
    110110    Malloc(strlen(P->Files.mainname)+10, "CreateMainname - P->Files.mainpath");
     
    520520  }
    521521   
    522   Free(GlobalGArray);
    523   Free(GlobalGArray_sort);
     522  Free(GlobalGArray, "HashGArray: GlobalGArray");
     523  Free(GlobalGArray_sort, "HashGArray: GlobalGArray_sort");
    524524  for (i=0;i<NDIM;i++) {
    525     Free(G[i]);
    526     Free(G_send[i]);
    527   }
    528   Free(G);
    529   Free(G_send);
     525    Free(G[i], "HashGArray: G[i]");
     526    Free(G_send[i], "HashGArray: G_send[i]");
     527  }
     528  Free(G, "HashGArray: G");
     529  Free(G_send, "HashGArray: G_send");
    530530}
    531531
     
    13211321      if (feof(file)) {
    13221322        if ((critical) && (found == 0)) {
    1323           Free(free_dummy);
     1323          Free(free_dummy, "ParseForParameter: free_dummy");
    13241324          Error(InitReading, name);
    13251325        } else {
    13261326          //if (!sequential)
    13271327          fseek(file, file_position, SEEK_SET);  // rewind to start position
    1328           Free(free_dummy);         
     1328          Free(free_dummy, "ParseForParameter: free_dummy");         
    13291329          return 0;
    13301330        }
     
    13561356                                dummy = strchr(dummy1, '\n');   // set on line end then (whole line = keyword)
    13571357                                //fprintf(stderr,"(%i)Error: Cannot find tabs or spaces on line %i in search for %s\n", me, line, name);
    1358         //Free(free_dummy);
     1358        //Free(free_dummy, "ParseForParameter: free_dummy");
    13591359                    //Error(FileOpenParams, NULL);                     
    13601360                        } else {
     
    13761376              if (feof(file)) {
    13771377                if ((critical) && (found == 0)) {
    1378                   Free(free_dummy);
     1378                  Free(free_dummy, "ParseForParameter: free_dummy");
    13791379                  Error(InitReading, name);
    13801380                } else {
    13811381                  //if (!sequential)
    13821382                  fseek(file, file_position, SEEK_SET);  // rewind to start position
    1383                   Free(free_dummy);
     1383                  Free(free_dummy, "ParseForParameter: free_dummy");
    13841384                  return 0;
    13851385                }
     
    14251425                                                                if ((j < yth-1) && (type < 4)) {        // check if xth value or not yet
    14261426                                                                        if (verbose) fprintf(stderr,"(%i)Error: EoL at %i and still missing %i value(s) for parameter %s\n", me, line, yth-j, name);
    1427                   Free(free_dummy);
     1427                  Free(free_dummy, "ParseForParameter: free_dummy");
    14281428                                                                        return 0;
    14291429                                                            //Error(FileOpenParams, NULL);                     
     
    14821482        }       
    14831483  if ((type >= row_int) && (verbose)) fprintf(stderr,"\n");
    1484         Free(free_dummy);
     1484  Free(free_dummy, "ParseForParameter: free_dummy");
    14851485        if (!sequential) fseek(file, file_position, SEEK_SET);  // rewind to start position
    14861486        //fprintf(stderr, "(%i) End of Parsing\n\n",me);
     
    18711871  EnergyOutput(P,0);
    18721872  InitOutVisArray(P);
    1873   Free(P->Lat.GArrayForSort);
     1873  Free(P->Lat.GArrayForSort, "Init: P->Lat.GArrayForSort");
    18741874  P->Speed.InitSteps++;
    18751875}
  • pcp/src/myfft.c

    r32de28 r64fa9e  
    221221    fprintf(stderr,"\n");
    222222  }
    223   Free(plan->pwFS);
     223  Free(plan->pwFS, "fft_3d_create_plan: plan->pwFS");
    224224  plan->pwFS = NULL;
    225225
     
    306306  }
    307307  if (plan->local_data != NULL) {
    308     Free(plan->local_data);
     308    Free(plan->local_data, "fft_3d_create_plan: plan->local_data");
    309309    plan->local_data = NULL;
    310310  }
    311311  if (plan->work != NULL) {
    312     Free(plan->work);
     312    Free(plan->local_data, "fft_3d_create_plan: plan->local_data");
    313313    plan->work = NULL;
    314314  }
    315   Free(MaxNFields);
     315  Free(MaxNFields, "fft_3d_create_plan: MaxNFields");
    316316  return plan;
    317317}
     
    327327      rfftwnd_destroy_plan(plan->Levplan[i].yzplanRC[j]);
    328328    }
    329     Free(plan->Levplan[i].xplanCR);
    330     Free(plan->Levplan[i].xplanRC);
    331     Free(plan->Levplan[i].yzplanCR);
    332     Free(plan->Levplan[i].yzplanRC);
    333     Free(plan->NFields[i]);
    334   }
    335   Free(plan->MaxNoOfnFields);
    336   Free(plan->NFields);
    337   Free(plan->Levplan);
    338   Free(plan->PENo);
     329    Free(plan->Levplan[i].xplanCR, "fft_3d_destroy_plan: plan->Levplan[i].xplanCR");
     330    Free(plan->Levplan[i].xplanRC, "fft_3d_destroy_plan: plan->Levplan[i].xplanRC");
     331    Free(plan->Levplan[i].yzplanCR, "fft_3d_destroy_plan: plan->Levplan[i].yzplanCR");
     332    Free(plan->Levplan[i].yzplanRC, "fft_3d_destroy_plan: plan->Levplan[i].yzplanRC");
     333    Free(plan->NFields[i], "fft_3d_destroy_plan: plan->NFields[i]");
     334  }
     335  Free(plan->MaxNoOfnFields, "fft_3d_destroy_plan: plan->MaxNoOfnFields");
     336  Free(plan->NFields, "fft_3d_destroy_plan: plan->NFields");
     337  Free(plan->Levplan, "fft_3d_destroy_plan: plan->Levplan");
     338  Free(plan->PENo, "fft_3d_destroy_plan: plan->PENo");
    339339  plan->PENo = NULL;
    340   Free(plan->LevelSizes);
     340  Free(plan->LevelSizes, "fft_3d_destroy_plan: plan->LevelSizes");
    341341  plan->LevelSizes = NULL;
    342   Free(plan->Lev_CR_RC);
     342  Free(plan->Lev_CR_RC, "fft_3d_destroy_plan: plan->Lev_CR_RC");
    343343  plan->Lev_CR_RC = NULL;
    344   Free(plan->pw);
     344  Free(plan->pw, "fft_3d_destroy_plan: plan->pw");
    345345  plan->pw = NULL;
    346346  plan->Levplan = NULL;
    347347  MPI_Comm_free(&plan->comm);
    348   Free(plan);
     348  Free(plan, "fft_3d_destroy_plan: plan");
    349349}
    350350
  • pcp/src/opt.c

    r32de28 r64fa9e  
    2929 */
    3030static void FreeDebugStr(void) {
    31   if (DebugString) Free(DebugString);
    32   if (program_name) Free(program_name);
     31  if (DebugString) Free(DebugString, "FreeDebugStr: DebugString");
     32  if (program_name) Free(program_name, "FreeDebugStr: program_name");
    3333}
    3434
     
    6868      break;
    6969    case 'd':
    70       if (DebugString) Free(DebugString);
     70      if (DebugString) Free(DebugString, "GetOptions: DebugString");
    7171      Call->debug = 1;
    7272      DebugString = (char *)Malloc(strlen(optarg)+1, "GetOptions");
     
    7474      break;
    7575    case 'D':
    76       if (DebugString) Free(DebugString);
     76      if (DebugString) Free(DebugString, "GetOptions: DebugString");
    7777      DebugString = (char *)Malloc(strlen(optarg)+1, "GetOptions");
    7878      strcpy(DebugString, optarg);
  • pcp/src/output.c

    r32de28 r64fa9e  
    8080      if (*file != 0) {
    8181        if (verbose) fprintf(stderr,"(%i) Default file is open: %s\n",P->Par.me,name);
    82         Free(name);
     82        Free(name, "OpenFile: name");
    8383        return(1);
    8484      }
    8585    }
    8686    fprintf(stderr,"\n(%i)Error: Cannot open neither normal nor default file: %s\n",P->Par.me,name);
    87     Free(name);
     87    Free(name, "OpenFile: name");
    8888    return(0);
    8989  } else {
    9090    if(verbose) fprintf(stderr,"(%i) File is open: %s\n",P->Par.me,name);
    91     Free(name);
     91                Free(name, "OpenFile: name");
    9292    return(1);
    9393  }
     
    121121      if (*file != 0) {
    122122        if(verbose) fprintf(stderr,"(%i) Default file is open: %s\n", P->Par.me, name);
    123         Free(name);
     123        Free(name, "OpenFileNo2: name");
    124124        return(1);
    125125      }
    126126    }
    127127    fprintf(stderr,"\n(%i)Error: Cannot open file: %s\n", P->Par.me, name);
    128     Free(name);
     128    Free(name, "OpenFileNo2: name");
    129129    return(0);
    130130  } else {
    131131    if(verbose) fprintf(stderr,"(%i) File is open: %s\n",P->Par.me, name);
    132     Free(name);
     132    Free(name, "OpenFileNo2: name");
    133133    return(1);
    134134  }
     
    163163      if (*file != 0) {
    164164        if(verbose) fprintf(stderr,"(%i) Default file is open: %s\n", P->Par.me, name);
    165         Free(name);
     165        Free(name, "OpenFileNo: name");
    166166        return(1);
    167167      }
    168168    }
    169169    fprintf(stderr,"\n(%i)Error: Cannot open file: %s\n", P->Par.me, name);
    170     Free(name);
     170    Free(name, "OpenFileNo: name");
    171171    return(0);
    172172  } else {
    173173    if(verbose) fprintf(stderr,"(%i) File is open: %s\n", P->Par.me, name);
    174     Free(name);
     174    Free(name, "OpenFileNo: name");
    175175    return(1);
    176176  }
     
    200200  if (*file == 0) {
    201201    fprintf(stderr,"\n(%i)Error: Cannot open file: %s\n", P->Par.me, name);
    202     Free(name);
     202    Free(name, "OpenFileNoPost: name");
    203203    return(0);
    204204  } else {
    205205    if(verbose) fprintf(stderr,"(%i) File is open: %s\n", P->Par.me, name);
    206     Free(name);
     206    Free(name, "OpenFileNoPost: name");
    207207    return(1);
    208208  }
     
    229229  if(*file == 0) {
    230230    fprintf(stderr,"\n(%i)Error: Cannot open file: %s\n", P->Par.me, name);
    231     Free(name);
     231    Free(name, "OpenFileNoNo: name");
    232232    return(0);
    233233  }
    234234  if(verbose) fprintf(stderr,"(%i) File is open: %s\n", P->Par.me, name);
    235   Free(name);
     235  Free(name, "OpenFileNoNo: name");
    236236  return(1);
    237237}
     
    859859
    860860  fclose(DensityDx);
    861   Free(posname);
    862   Free(datname);
     861  Free(posname, "CreateDensityOutputGeneral: posname");
     862  Free(datname, "CreateDensityOutputGeneral: datname");
    863863}
    864864
     
    13631363      fclose(SrcIonData);
    13641364    }
    1365     if (Max_IonsOfType != NULL) Free(Max_IonsOfType);
     1365    if (Max_IonsOfType != NULL) Free(Max_IonsOfType, "Max_IonsOfType");
    13661366  }
    13671367  return 1;
     
    17881788      Error(SomeError, "PlotRealDensity: MPI_Send failure!");
    17891789  }
    1790   Free(buffer);
    1791 }
     1790  Free(buffer, "PlotRealDensity: buffer");
     1791}
  • pcp/src/pcp.c

    r32de28 r64fa9e  
    741741            avarage, stddev);   
    742742  }
    743   if (!P->Par.me_comm_ST_Psi) Free(A);
    744   if (!P->Par.me_comm_ST_PsiT && !P->Par.me_comm_ST_Psi) Free(AT);
     743  if (!P->Par.me_comm_ST_Psi) Free(A, "TestGSfft: A");
     744  if (!P->Par.me_comm_ST_PsiT && !P->Par.me_comm_ST_Psi) Free(AT, "TestGSfft: AT");
    745745}
    746746#endif
  • pcp/src/perturbed.c

    r32de28 r64fa9e  
    28822882  UnLockDensityArray(Dens0,GapDownDensity,real); // Psip1R
    28832883//  for (i=0;i<Num;i++)
    2884 //    if (x_l[i] != NULL) Free(x_l[i]);         
    2885 //  Free(x_l);
     2884//    if (x_l[i] != NULL) Free(x_l[i], "bla", "bla");         
     2885//  Free(x_l, "bla");
    28862886  gsl_multimin_fdfminimizer_free (minset);
    28872887  gsl_vector_free (x);           
     
    29602960  recvbuf = (double *) Malloc(gsize * p_num * sizeof(double), "CalculateOverlap: recvbuf");
    29612961  MPI_Allgather(sendbuf, p_num, MPI_DOUBLE, recvbuf, p_num, MPI_DOUBLE, P->Par.comm_ST_PsiT);
    2962   Free(sendbuf);
     2962  Free(sendbuf, "bla");
    29632963  for (i=0;i<gsize;i++) {// extract results from other processes out of receiving buffer
    29642964    m = recvbuf[i*p_num]; // m is ActNum of the process whose results we've just received
     
    29672967      Psi->Overlap[m][j-1] = Psi->Overlap[j-1][m] = recvbuf[i*p_num+j]; // put each entry into correspondent Overlap row
    29682968  }
    2969   Free(recvbuf);
     2969  Free(recvbuf, "bla");
    29702970}
    29712971
  • pcp/src/pseudo.c

    r32de28 r64fa9e  
    678678  struct Ions *I = &P->Ion;
    679679  struct Lattice *Lat = &P->Lat;
    680   Free(PP->integrand1);
    681   Free(PP->integrand);
    682   Free(PP->dfnl);
    683   Free(PP->rr);
    684   Free(PP->t);
     680  Free(PP->integrand1, "RemovePseudoRead: PP->integrand1");
     681  Free(PP->integrand, "RemovePseudoRead: PP->integrand");
     682  Free(PP->dfnl, "RemovePseudoRead: PP->dfnl");
     683  Free(PP->rr, "RemovePseudoRead: PP->rr");
     684  Free(PP->t, "RemovePseudoRead: PP->t");
    685685  for (i=0; i< Lat->Psi.LocalNo+1; i++) {
    686686    for (it=0; it < I->Max_Types; it++) {
    687687      for (il =0; il < PP->lm_end[it]; il++)
    688         Free(PP->fnl[i][it][il]);
    689       Free(PP->fnl[i][it]);
    690     }
    691     Free(PP->fnl[i]);
     688        Free(PP->fnl[i][it][il], "RemovePseudoRead: PP->fnl[i][it][il]");
     689      Free(PP->fnl[i][it], "RemovePseudoRead: PP->fnl[i][it]");
     690    }
     691    Free(PP->fnl[i], "RemovePseudoRead: PP->fnl[i]");
    692692  }
    693693  for (it=0; it < I->Max_Types; it++) {
    694694    if (I->I[it].corecorr == CoreCorrected) {
    695       Free(PP->corewave[it]);
    696       Free(PP->formfCore[it]);
     695      Free(PP->corewave[it], "RemovePseudoRead: PP->corewave[it]");
     696      Free(PP->formfCore[it], "RemovePseudoRead: PP->formfCore[it]");
    697697    }
    698698  }
    699699  for (it=0; it < I->Max_Types; it++) {
    700700    for (il=0; il < PP->nang[it]; il++) {
    701       Free(PP->R[it][il]);
    702       Free(PP->v_loc[it][il]);
     701      Free(PP->R[it][il], "RemovePseudoRead: PP->R[it][il]");
     702      Free(PP->v_loc[it][il], "RemovePseudoRead: PP->v_loc[it][il]");
    703703    }
    704704    for (il=0; il < 3; il++) {
    705       Free(PP->rcl[it][il]);
    706       Free(PP->al[it][il]);
    707       Free(PP->bl[it][il]);
     705      Free(PP->rcl[it][il], "RemovePseudoRead: PP->rcl[it][il]");
     706      Free(PP->al[it][il], "RemovePseudoRead: PP->al[it][il]");
     707      Free(PP->bl[it][il], "RemovePseudoRead: PP->bl[it][il]");
    708708    }
    709709    for (il=0;il<PP->lm_end[it];il++) {
    710       //Free(PP->phi_ps_nl[it][il]);
    711       Free(PP->phi_ps_nl[it][il]);
     710      //Free(PP->phi_ps_nl[it][il], "RemovePseudoRead: PP->phi_ps_nl[it][il]");
     711      Free(PP->phi_ps_nl[it][il], "RemovePseudoRead: PP->phi_ps_nl[it][il]");
    712712    }
    713713    for (ia=0;ia<I->I[it].Max_IonsOfType;ia++) {
    714       Free(PP->ei[it][ia]);
    715       Free(PP->expiGR[it][ia]);
    716     }
    717     Free(PP->ei[it]);
    718     Free(PP->expiGR[it]);
    719     //Free(PP->phi_ps_nl[it]);
    720     Free(PP->phi_ps_nl[it]);
    721     Free(PP->R[it]);
    722     Free(PP->v_loc[it]);
    723     Free(PP->r[it]);
    724     Free(PP->integrand2[it]);
    725     Free(PP->rcl[it]);
    726     Free(PP->al[it]);
    727     Free(PP->bl[it]);
    728     Free(PP->FacGauss[it]);
    729     Free(PP->phi_ps_loc[it]);
    730     Free(PP->core[it]);
    731     Free(PP->rc[it]);
    732     Free(PP->wNonLoc[it]);
    733   }
    734   //Free(PP->phi_ps_nl);
    735   Free(PP->phi_ps_nl);
    736   Free(PP->R);
    737   Free(PP->v_loc);
    738   Free(PP->r);
    739   Free(PP->integrand2);
    740   Free(PP->rcl);
    741   Free(PP->al);
    742   Free(PP->bl);
    743   Free(PP->FacGauss);
    744   Free(PP->phi_ps_loc);
    745   Free(PP->core);
    746   Free(PP->rc);
    747   Free(PP->wNonLoc);
    748   Free(PP->ei);
    749   Free(PP->expiGR);
    750   Free(PP->corewave);
    751   Free(PP->formfCore);
    752   Free(PP->fnl);
    753   Free(PP->VCoulombc);
    754   Free(PP->lm_end);
    755   Free(PP->zval);
    756   Free(PP->nang);
    757   Free(PP->mmax);
    758   Free(PP->clog);
     714      Free(PP->ei[it][ia], "RemovePseudoRead: PP->ei[it][ia]");
     715      Free(PP->expiGR[it][ia], "RemovePseudoRead: PP->expiGR[it][ia]");
     716    }
     717    Free(PP->ei[it], "RemovePseudoRead: PP->ei[it]");
     718    Free(PP->expiGR[it], "RemovePseudoRead: PP->expiGR[it]");
     719    //Free(PP->phi_ps_nl[it], "RemovePseudoRead: PP->phi_ps_nl[it]");
     720    Free(PP->phi_ps_nl[it], "RemovePseudoRead: PP->phi_ps_nl[it]");
     721    Free(PP->R[it], "RemovePseudoRead: PP->R[it]");
     722    Free(PP->v_loc[it], "RemovePseudoRead: PP->v_loc[it]");
     723    Free(PP->r[it], "RemovePseudoRead: PP->r[it]");
     724    Free(PP->integrand2[it], "RemovePseudoRead: PP->integrand2[it]");
     725    Free(PP->rcl[it], "RemovePseudoRead: PP->rcl[it]");
     726    Free(PP->al[it], "RemovePseudoRead: PP->al[it]");
     727    Free(PP->bl[it], "RemovePseudoRead: PP->bl[it]");
     728    Free(PP->FacGauss[it], "RemovePseudoRead: PP->FacGauss[it]");
     729    Free(PP->phi_ps_loc[it], "RemovePseudoRead: PP->phi_ps_loc[it]");
     730    Free(PP->core[it], "RemovePseudoRead: PP->core[it]");
     731    Free(PP->rc[it], "RemovePseudoRead: PP->rc[it]");
     732    Free(PP->wNonLoc[it], "RemovePseudoRead: PP->wNonLoc[it]");
     733  }
     734  //Free(PP->phi_ps_nl, "RemovePseudoRead: PP->phi_ps_nl");
     735  Free(PP->phi_ps_nl, "RemovePseudoRead: PP->phi_ps_nl");
     736  Free(PP->R, "RemovePseudoRead: PP->R");
     737  Free(PP->v_loc, "RemovePseudoRead: PP->v_loc");
     738  Free(PP->r, "RemovePseudoRead: PP->r");
     739  Free(PP->integrand2, "RemovePseudoRead: PP->integrand2");
     740  Free(PP->rcl, "RemovePseudoRead: PP->rcl");
     741  Free(PP->al, "RemovePseudoRead: PP->al");
     742  Free(PP->bl, "RemovePseudoRead: PP->bl");
     743  Free(PP->FacGauss, "RemovePseudoRead: PP->FacGauss");
     744  Free(PP->phi_ps_loc, "RemovePseudoRead: PP->phi_ps_loc");
     745  Free(PP->core, "RemovePseudoRead: PP->core");
     746  Free(PP->rc, "RemovePseudoRead: PP->rc");
     747  Free(PP->wNonLoc, "RemovePseudoRead: PP->wNonLoc");
     748  Free(PP->ei, "RemovePseudoRead: PP->ei");
     749  Free(PP->expiGR, "RemovePseudoRead: PP->expiGR");
     750  Free(PP->corewave, "RemovePseudoRead: PP->corewave");
     751  Free(PP->formfCore, "RemovePseudoRead: PP->formfCore");
     752  Free(PP->fnl, "RemovePseudoRead: PP->fnl");
     753  Free(PP->VCoulombc, "RemovePseudoRead: PP->VCoulombc");
     754  Free(PP->lm_end, "RemovePseudoRead: PP->lm_end");
     755  Free(PP->zval, "RemovePseudoRead: PP->zval");
     756  Free(PP->nang, "RemovePseudoRead: PP->nang");
     757  Free(PP->mmax, "RemovePseudoRead: PP->mmax");
     758  Free(PP->clog, "RemovePseudoRead: PP->clog");
    759759}
    760760
  • pcp/src/wannier.c

    r32de28 r64fa9e  
    9696  fprintf(stderr,"\n");*/
    9797  // and finito
    98   Free(old_top);
    99   Free(old_bot);
     98  Free(old_top, "bla");
     99  Free(old_bot, "bla");
    100100}
    101101
     
    490490  // free lookups
    491491  for (i=0;i<NDIM;i++) {
    492     Free(cos_lookup[i]);
    493     Free(sin_lookup[i]);
    494   }
    495   Free(cos_lookup);
    496   Free(sin_lookup);
     492    Free(cos_lookup[i], "bla");
     493    Free(sin_lookup[i], "bla");
     494  }
     495  Free(cos_lookup, "bla");
     496  Free(sin_lookup, "bla");
    497497 
    498498  if(P->Call.out[ReadOut]) fprintf(stderr,"(%i) STEP 1\n",P->Par.me);
     
    800800      // Free column vectors
    801801      for (k=0;k<max_operators+1;k++) {
    802         Free(Atotal[k]);
    803         Free(Around[k]);
    804       }
    805       Free(Uround);
    806       Free(Utotal);
    807       Free(c_all);
    808       Free(s_all);
    809       Free(c);
    810       Free(s);
    811       Free(rcounts);
    812       Free(rdispls);
     802        Free(Atotal[k], "bla");
     803        Free(Around[k], "bla");
     804      }
     805      Free(Uround, "bla");
     806      Free(Utotal, "bla");
     807      Free(c_all, "bla");
     808      Free(s_all, "bla");
     809      Free(c, "bla");
     810      Free(s, "bla");
     811      Free(rcounts, "bla");
     812      Free(rdispls, "bla");
    813813     
    814814    } else {
     
    920920      gsl_vector_free(eval);
    921921      gsl_matrix_free(evec);
    922       Free(c);
    923       Free(s);
     922      Free(c, "bla");
     923      Free(s, "bla");
    924924    } 
    925925   
     
    934934    }
    935935  }
    936   Free(top);
    937   Free(bot);
     936  Free(top, "bla");
     937  Free(bot, "bla");
    938938
    939939  if(P->Call.out[ReadOut]) fprintf(stderr,"(%i) STEP 6: Allocating buffer mem\n",P->Par.me);
     
    10151015  }
    10161016  // and free allocated buffer memory
    1017   Free(coeffs_buffer);
     1017  Free(coeffs_buffer, "bla");
    10181018
    10191019  if(P->Call.out[ReadOut]) fprintf(stderr,"(%i) STEP 7\n",P->Par.me);
     
    12021202    //debug(P,"done");
    12031203 
    1204     Free(marker);
     1204    Free(marker, "bla");
    12051205    for (l=0;l<Num;l++)
    1206       Free(group[l]);
    1207     Free(group);
     1206      Free(group[l], "bla");
     1207    Free(group, "bla");
    12081208    break;
    12091209   case 1:
     
    15011501  // free lookups
    15021502  for (k=0;k<NDIM;k++) {
    1503     Free(cos_lookup[k]);
    1504     Free(sin_lookup[k]);
    1505   }
    1506   Free(cos_lookup);
    1507   Free(sin_lookup);
     1503    Free(cos_lookup[k], "bla");
     1504    Free(sin_lookup[k], "bla");
     1505  }
     1506  Free(cos_lookup, "bla");
     1507  Free(sin_lookup, "bla");
    15081508
    15091509  return (B_ij - spread);
Note: See TracChangeset for help on using the changeset viewer.