Changeset 3595


Ignore:
Timestamp:
04/21/10 15:54:53 (15 years ago)
Author:
Mathieu Morlighem
Message:

ISSMASSERT is now compiled only when ISSM_DEBUG is defined. Removed old ISSM_DEBUG outputs

Location:
issm/trunk/src/c
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/BuildNodeSetsx/PartitionSets.cpp

    r3570 r3595  
    1313        /*output: */
    1414        Vec partitionb=NULL;
     15        Vec partitionb_vec=NULL;
    1516        double* partitionb_local=NULL;
    1617        Vec partitionc=NULL;
     18        Vec partitionc_vec=NULL;
    1719        double* partitionc_local=NULL;
    1820
     
    8486
    8587        /*Now, using the local partitions for b and c, create parallel vectors: */
    86         VecCreateMPIWithArray(MPI_COMM_WORLD,bsize,PETSC_DECIDE,partitionb_local,&partitionb);
    87         VecCreateMPIWithArray(MPI_COMM_WORLD,csize,PETSC_DECIDE,partitionc_local,&partitionc);
     88        VecCreateMPIWithArray(MPI_COMM_WORLD,bsize,PETSC_DECIDE,partitionb_local,&partitionb_vec);
     89        VecCreateMPIWithArray(MPI_COMM_WORLD,csize,PETSC_DECIDE,partitionc_local,&partitionc_vec);
     90
     91        VecAssemblyBegin(partitionb_vec);
     92        VecAssemblyEnd(partitionb_vec);
     93
     94        VecAssemblyBegin(partitionc_vec);
     95        VecAssemblyEnd(partitionc_vec);
     96
     97        /*Now we must duplicate these vectors because:
     98         *
     99         * Petsc specifies on http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/VecCreateMPIWithArray.html
     100         * "PETSc does NOT free the array when the vector is destroyed via VecDestroy().
     101         * The user should not free the array until the vector is destroyed"
     102         *
     103         * The only way we can keep the vector partitionb_vec while destroying the array partitionb_local
     104         * is to duplicate the vector and then destroy the initial vector as well as the array*/
     105        VecDuplicate(partitionb_vec,&partitionb); VecCopy(partitionb_vec,partitionb); VecFree(&partitionb_vec); xfree((void**)&partitionb_local);
     106        VecDuplicate(partitionc_vec,&partitionc); VecCopy(partitionc_vec,partitionc); VecFree(&partitionc_vec); xfree((void**)&partitionc_local);
    88107
    89108        /*Free ressources:*/
     
    93112        xfree((void**)&flags_c_local);
    94113       
    95         VecAssemblyBegin(partitionb);
    96         VecAssemblyEnd(partitionb);
    97 
    98         VecAssemblyBegin(partitionc);
    99         VecAssemblyEnd(partitionc);
    100 
    101114        /*Assign output pointers*/
    102115        *ppartitionb=partitionb;
  • issm/trunk/src/c/ConfigureObjectsx/ConfigureObjectsx.cpp

    r3588 r3595  
    1818        extern int my_rank;
    1919       
    20         _printf_("      Configuring elements...\n");
     20        //_printf_("      Configuring elements...\n");
    2121        elements->Configure(elements,loads,nodes,vertices,materials,parameters);
    22         _printf_("      Configuring loads...\n");
     22        //_printf_("      Configuring loads...\n");
    2323        loads->Configure(elements,loads,nodes,vertices,materials,parameters);
    24         _printf_("      Configuring nodes...\n");
     24        //_printf_("      Configuring nodes...\n");
    2525        nodes->Configure(elements,loads,nodes,vertices,materials,parameters);
    26         _printf_("      Configuring parameters...\n");
     26        //_printf_("      Configuring parameters...\n");
    2727        parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
    2828
  • issm/trunk/src/c/ContourToMeshx/ContourToMeshxt.cpp

    r3332 r3595  
    6262        /*Loop through all contours: */
    6363        for (i=0;i<numcontours;i++){
    64                 #ifdef _ISSM_DEBUG_
    65                         printf("\nHandling contour %i/%i\n",i,numcontours);
    66                 #endif
    6764                contouri=*(contours+i);
    6865                numgrids=contouri->nods;
  • issm/trunk/src/c/ContourToNodesx/ContourToNodesx.cpp

    r3332 r3595  
    2323        /*Loop through all contours: */
    2424        for (i=0;i<numcontours;i++){
    25                 #ifdef _ISSM_DEBUG_
    26                         printf("\nHandling contour %i/%i\n",i,numcontours);
    27                 #endif
    2825                contouri=*(contours+i);
    2926                numgrids=contouri->nods;
  • issm/trunk/src/c/DataSet/DataSet.cpp

    r3570 r3595  
    179179        }
    180180
    181 #ifdef _ISSM_DEBUG_
    182         _printf_("Number of objects in dataset being demarshalled: %i\n",numobjects);
    183 #endif
    184 
    185181        for(i=0;i<numobjects;i++){
    186182
     
    11521148        Ranks(ranks);
    11531149
    1154         #ifdef _ISSM_DEBUG_
    1155         for(i=0;i<numberofobjects;i++){
    1156                 _printf_("%i\n",ranks[i]);
    1157         }
    1158         #endif
    1159 
    11601150        /*We need to take the minimum rank for each vertex, and every cpu needs to get that result. That way,
    11611151         * when we start building the dof list for all vertexs, a cpu can check whether its vertex already has been
     
    11631153         * order of cpu rank. This is also why we initialized this array to num_procs.*/
    11641154        MPI_Allreduce ( (void*)ranks,(void*)minranks,numberofobjects,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
    1165 
    1166         #ifdef _ISSM_DEBUG_
    1167                 for(i=0;i<numberofobjects;i++){
    1168                         _printf_("%i\n",minranks[i]);
    1169                 }
    1170         #endif
    11711155
    11721156        /*Now go through all objects, and use minranks to flag which objects are cloned: */
  • issm/trunk/src/c/HoleFillerx/HoleFillerx.cpp

    r3332 r3595  
    4343        int             imageoutsize;
    4444
    45         #ifdef _ISSM_DEBUG_
    46                 if ( smooth == 1 ){
    47                         printf("Data patches will be SMOOTHED. \n");
    48                 }
    49                 if ( smooth == 0 ){
    50                         printf("Data patches will NOT be smoothed. \n");
    51                 }
    52         #endif
    53        
    5445         /*^^^^^^^^^^^^^  Remove pixels close to the holes ^^^^^^^^^^^^^*/
    5546        image2 = (double*) xmalloc( lines*samps*sizeof(double));
     
    9283        #endif
    9384
    94         #ifdef _ISSM_DEBUG_
    95                 printf( "\n" );
    96                 printf( "Iterations %5ld   and %5ld.", count-1, count );
    97                 fflush( stdout );
    98         #endif
    9985        goto afterfirst2;
    10086
     
    115101                printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
    116102                printf("Number of zeroes remaining: %10ld",lines*samps-counter);
    117                 fflush( stdout );
    118         #endif
    119 
    120         #ifdef _ISSM_DEBUG_
    121                 printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
    122                 printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
    123                 printf( "Iterations %5ld   and %5ld.", count-1, count );
    124103                fflush( stdout );
    125104        #endif
     
    366345                }
    367346
    368                 #ifdef _ISSM_DEBUG_
    369                         if ( !(i%100) ){
    370                         fprintf(stdout, "\b\b\b\b\b\b%5ld ", i );   /* Count lines on output screen */
    371                         fflush(stdout);
    372                         }
    373                 #endif
    374         }
    375 
    376         #ifdef _ISSM_DEBUG_
    377                 fprintf(stdout, "\b\b\b\b\b\b%5ld ", lines );
    378                 fflush(stdout);
    379         #endif
    380        
     347        }
     348
    381349               
    382350there2:         
     
    388356
    389357        time(&t2);     
    390         #ifdef _ISSM_DEBUG_
    391                 printf ( "\n\nEnd                  "); printf( ctime(&t2) );
    392                 printf( "\n                           Total time:        ");
    393                 printf( "%4.2f minutes. \n", difftime(t2,t1)/60 );             
    394         #endif
    395358       
    396359        #ifdef _DEBUG2_
     
    402365        end:
    403366
    404         #ifdef _ISSM_DEBUG_
    405                 printf( "Done.\a\n" );
    406         #endif
    407 
    408367        /*Assign output pointers: */
    409368        *pimageout=imageout;
  • issm/trunk/src/c/MeshPartitionx/MeshPartitionx.cpp

    r3332 r3595  
    8181                }
    8282        }
    83 
    84         #ifdef _ISSM_DEBUG_
    85         if(my_rank==0){
    86                 for (i=0;i<numberofelements;i++){
    87                         printf("El %i My rank %i\n",i+1,epart[i]);
    88                 }
    89         }
    90         #endif
    9183       
    9284        /*Assign output pointer:*/
  • issm/trunk/src/c/ModelProcessorx/Partitioning.cpp

    r3588 r3595  
    150150        xfree((void**)&npart);
    151151        xfree((void**)&epart);
     152        xfree((void**)&serial_bordervertices);
    152153        VecFree(&bordervertices);
    153154
  • issm/trunk/src/c/ModelProcessorx/Qmu/CreateParametersQmu.cpp

    r3461 r3595  
    155155                param->SetStringArray(responsedescriptors,iomodel->numberofresponses);
    156156                parameters->AddObject(param);
    157 
    158                 #ifdef _ISSM_DEBUG_
    159                         for(i=0;i<iomodel->numberofvariables;i++){
    160                                 _printf_("variable descriptor %s\n",variabledescriptors[i]);
    161                         }
    162                        
    163                         for(i=0;i<iomodel->numberofresponses;i++){
    164                                 _printf_("response descriptor %s\n",responsedescriptors[i]);
    165                         }
    166                 #endif
    167 
    168157
    169158                /*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */
  • issm/trunk/src/c/PenaltyConstraintsx/RiftConstraints.cpp

    r3567 r3595  
    307307        #endif
    308308
    309         #ifdef _ISSM_DEBUG_
    310                 printf("Maximum rift penetration2: %g\n",max_penetration);
    311         #endif
    312 
    313309        /*feed max_penetration to inputs: */
    314310        inputs->Add("max_penetration",max_penetration);
  • issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp

    r3483 r3595  
    2727        /*Now, figure out maximum value of K_gg, so that we can penalize it correctly: */
    2828        MatNorm(Kgg,NORM_INFINITY,&kmax);
    29         #ifdef _ISSM_DEBUG_
    30          _printf_("   K_gg infinity norm: %g\n",kmax);
    31         #endif
    3229
    3330        /*Add penalties to stiffnesses, from loads: */
     
    4643        }
    4744
    48         #ifdef _ISSM_DEBUG_
    49         MatNorm(Kgg,NORM_INFINITY,&kmax2);
    50          _printf_("   K_gg infinity norm after penalties: %g\n",kmax2);
    51         #endif
    52 
    5345        /*Assign output pointers:*/
    5446        if(pkmax)*pkmax=kmax;
  • issm/trunk/src/c/Qmux/SpawnCoreParallel.cpp

    r3570 r3595  
    6868        model->FindParam(&qmu_npart,"qmu_npart");
    6969        model->FindParam(&qmu_part,NULL,NULL,"qmu_part");
    70         #ifdef _ISSM_DEBUG_
    71         for(i=0;i<numresponses;i++){
    72                 PetscSynchronizedPrintf(MPI_COMM_WORLD,"response descriptor %i: %s\n",i,responses_descriptors[i]);
    73                 PetscSynchronizedFlush(MPI_COMM_WORLD);
    74         }
    75         #endif
    7670
    7771        /*broadcast variables: only cpu 0 has correct values*/
     
    7973        if(my_rank!=0)variables=(double*)xmalloc(numvariables*sizeof(double));
    8074        MPI_Bcast(variables,numvariables,MPI_DOUBLE,0,MPI_COMM_WORLD);
    81 
    82         #ifdef _ISSM_DEBUG_
    83         for(i=0;i<numvariables;i++){
    84                 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable %i: %g\n",i,variables[i]);
    85                 PetscSynchronizedFlush(MPI_COMM_WORLD);
    86         }
    87         #endif
    8875
    8976        /*broadcast variables_descriptors: */
     
    10289        }
    10390
    104         #ifdef _ISSM_DEBUG_
    105         for(i=0;i<numvariables;i++){
    106                 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable descriptor %i: %s value: %g\n",i,variables_descriptors[i],variables[i]);
    107                 PetscSynchronizedFlush(MPI_COMM_WORLD);
    108         }
    109         #endif
    110 
    11191        /*broadcast numresponses: */
    11292        MPI_Bcast(&numresponses,1,MPI_INT,0,MPI_COMM_WORLD);
    113 
    114         #ifdef _ISSM_DEBUG_
    115         for(i=0;i<numresponses;i++){
    116                 PetscSynchronizedPrintf(MPI_COMM_WORLD,"variable descriptor %i: %s value: %g\n",i,responses_descriptors[i],responses[i]);
    117                 PetscSynchronizedFlush(MPI_COMM_WORLD);
    118         }
    119         #endif
    120 
    12193
    12294        _printf_("qmu iteration: %i\n",counter);
  • issm/trunk/src/c/Solverx/Solverx.cpp

    r3570 r3595  
    8989                }
    9090        }
    91                
    92 
    93         #ifdef _ISSM_DEBUG_
    94                 KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);
    95                 KSPGetInitialGuessNonzero(ksp,&flag);
    96                 _printf_("User provided initial guess solution: %i\n",flag);
    97         #endif
    9891
    9992        KSPSolve(ksp,pf,uf);
     
    10396        if (iteration_number<0){
    10497                ISSMERROR("%s%i"," Solver diverged at iteration number: ",-iteration_number);
    105         }
    106         else{
    107                 #ifdef _ISSM_DEBUG_
    108                 _printf_("%s%i%s\n","Solver converged after ",iteration_number," iterations");
    109                 #endif
    11098        }
    11199
  • issm/trunk/src/c/include/macros.h

    r3570 r3595  
    1818#endif
    1919
    20 /*Assertion macro*/
     20/*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
     21#ifdef _ISSM_DEBUG_
    2122#define ISSMASSERT(statement)\
    2223  if (!(statement)) ISSMERROR("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement)
     24#else
     25#define ISSMASSERT(ignore)\
     26  ((void) 0)
     27#endif
    2328
    2429/*The following macros hide the error exception handling in a matlab module. Just put
  • issm/trunk/src/c/objects/Matice.cpp

    r3567 r3595  
    250250                }
    251251        }
    252         #ifdef _ISSM_DEBUG_
    253         printf("Viscosity %lf\n",viscosity);
    254         #endif
    255252
    256253        /*Return: */
     
    314311                }
    315312        }
    316         #ifdef _ISSM_DEBUG_
    317         printf("Viscosity %lf\n",viscosity3d);
    318         #endif
    319313
    320314        /*Assign output pointers:*/
     
    382376        }
    383377
    384         #ifdef _ISSM_DEBUG_
    385         printf("Viscosity %lf\n",viscosity3d);
    386         #endif
    387 
    388378        /*Assign output pointers:*/
    389379        *pviscosity3d=viscosity3d;
     
    436426        }
    437427               
    438         #ifdef _ISSM_DEBUG_
    439         printf("viscosity_complement %lf\n",viscosity_complement);
    440         #endif
    441 
    442428        /*Return: */
    443429        *pviscosity_complement=viscosity_complement;
  • issm/trunk/src/c/objects/Numericalflux.cpp

    r3588 r3595  
    256256                GetParameterValue(&vy, &vy_list[0],gauss_coord);
    257257                UdotN=vx*normal[0]+vy*normal[1];
    258                 if (fabs(UdotN)<1.0e-9) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN);
    259                 //if (fabs(UdotN)>0 && fabs(UdotN)< 1.0e-7) UdotN= 1.0e-7;
    260                 //if (fabs(UdotN)<0 && fabs(UdotN)>-1.0e-7) UdotN=-1.0e-7;
     258                if (fabs(UdotN)<1.0e-9 && analysis_type==Balancedthickness2AnalysisEnum) printf("Edge number %i has a flux very small (u.n = %g ), which could lead to unaccurate results\n",id,UdotN);
    261259
    262260                /*Get L and B: */
  • issm/trunk/src/c/objects/Numpar.cpp

    r3567 r3595  
    4545/*FUNCTION Numpar::destructor {{{1*/
    4646Numpar::~Numpar(){
     47
     48        /*Free the only pointer*/
     49        xfree((void**)&control_type);
     50
    4751        return;
    4852}
  • issm/trunk/src/c/objects/ParameterInputs.cpp

    r3570 r3595  
    361361                        }
    362362
    363                         #ifdef _ISSM_DEBUG_
    364                                 PetscSynchronizedPrintf(MPI_COMM_WORLD,"Parameter vetor:");
    365                                 PetscSynchronizedFlush(MPI_COMM_WORLD);
    366                                 for(k=0;k<numberofnodes;k++){
    367                                         PetscSynchronizedPrintf(MPI_COMM_WORLD," node %i value %g\n",k+1,parameter[k]);
    368                                         PetscSynchronizedFlush(MPI_COMM_WORLD);
    369                                 }
    370                         #endif
    371                          
    372 
    373363                        /*Add parameter to inputs: */
    374364                        this->Add(root,parameter,1,numberofnodes);
  • issm/trunk/src/c/objects/Penta.cpp

    r3582 r3595  
    12471247
    12481248        GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss);
    1249 #ifdef _ISSM_DEBUG_
    1250         for (i=0;i<num_area_gauss;i++){
    1251                 printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));
    1252         }
    1253         for (i=0;i<num_vert_gauss;i++){
    1254                 printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));
    1255         }
    1256 #endif
    12571249
    12581250        /* Start  looping on the number of gaussian points: */
     
    17731765
    17741766                GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss);
    1775 #ifdef _ISSM_DEBUG_
    1776                 for (i=0;i<num_area_gauss;i++){
    1777                         printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));
    1778                 }
    1779                 for (i=0;i<num_vert_gauss;i++){
    1780                         printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));
    1781                 }
    1782 #endif
    17831767
    17841768                /* Start  looping on the number of gaussian points: */
     
    21772161
    21782162        GaussPenta( &num_area_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &area_gauss_weights, &fourth_gauss_vert_coord,&vert_gauss_weights,order_area_gauss,num_vert_gauss);
    2179 #ifdef _ISSM_DEBUG_
    2180         for (i=0;i<num_area_gauss;i++){
    2181                 printf("Area Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(area_gauss_weights+i));
    2182         }
    2183         for (i=0;i<num_vert_gauss;i++){
    2184                 printf("Vert Gauss coord %i: %lf Weight: %lf\n",i,*(fourth_gauss_vert_coord+i),*(vert_gauss_weights+i));
    2185         }
    2186 #endif
    21872163
    21882164        /* Start  looping on the number of gaussian points: */
     
    22092185                        /* Get Jacobian determinant: */
    22102186                        GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss_coord);
    2211 #ifdef _ISSM_DEBUG_
    2212                         printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet);
    2213 #endif
    22142187
    22152188                        /*Get nodal functions: */
     
    26972670        GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord);
    26982671
    2699 #ifdef _ISSM_DEBUG_
    2700         for (i=0;i<numgrids;i++){
    2701                 printf("Node %i  dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);
    2702         }
    2703 #endif
    2704 
    27052672        /*Build B: */
    27062673        for (i=0;i<numgrids;i++){
     
    28342801        /*Get dh1dh6 in actual coordinate system: */
    28352802        GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord);
    2836 
    2837 #ifdef _ISSM_DEBUG_
    2838         for (i=0;i<numgrids;i++){
    2839                 printf("Node %i  dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);
    2840         }
    2841 #endif
    28422803
    28432804        /*Build B: */
     
    28812842        /*Get dh1dh6 in actual coordinate system: */
    28822843        GetNodalFunctionsDerivatives(&dh1dh6[0][0],xyz_list, gauss_coord);
    2883 
    2884 #ifdef _ISSM_DEBUG_
    2885         for (i=0;i<numgrids;i++){
    2886                 printf("Node %i  dh/dx=%lf dh/dy=%lf dh/dz=%lf\n",i,dh1dh6[0][i],dh1dh6[1][i],dh1dh6[2][i]);
    2887         }
    2888 #endif
    28892844
    28902845        /*Build BPrime: */
     
    29832938
    29842939        GetNodalFunctions(l1l6, gauss_coord);
    2985 
    2986 #ifdef _ISSM_DEBUG_
    2987         for (i=0;i<6;i++){
    2988                 printf("Node %i  dh/dx=%lf dh/dy=%lf dh/dz=%lf \n",i,dh1dh7[0][i],dh1dh7[1][i]);
    2989         }
    2990 
    2991 #endif
    29922940
    29932941        /*B_primeuild B_prime: */
     
    30633011        GetNodalFunctions(l1l6, gauss_coord);
    30643012
    3065 #ifdef _ISSM_DEBUG_
    3066         for (i=0;i<7;i++){
    3067                 printf("Node %i  dh/dx=%lf dh/dy=%lf dh/dz=%lf \n",i,dh1dh7[0][i],dh1dh7[1][i],dh1dh7[2][i]);
    3068         }
    3069 
    3070 #endif
    3071 
    30723013        /*Build B: */
    30733014        for (i=0;i<numgrids+1;i++){
     
    32163157        *(J+NDOF3*2+2)=SQRT3/12.0*(z1+z2-2*z3-z4-z5+2*z6)*eta+0.25*(z1-z2-z4+z5)*xi+0.25*(-z1+z5-z2+z4);
    32173158
    3218 #ifdef _ISSM_DEBUG_
    3219         for(i=0;i<3;i++){
    3220                 for (j=0;j<3;j++){
    3221                         printf("%lf ",*(J+NDOF3*i+j));
    3222                 }
    3223                 printf("\n");
    3224         }
    3225 #endif
    32263159}
    32273160/*}}}*/
     
    38413774        GetB(&B[0][0], xyz_list, gauss_coord);
    38423775
    3843 #ifdef _ISSM_DEBUG_
    3844         printf("B for grid1 : [ %lf   %lf  \n",B[0][0],B[0][1]);
    3845         printf("              [ %lf   %lf  \n",B[1][0],B[1][1]);
    3846         printf("              [ %lf   %lf  ]\n",B[2][0],B[2][1]);
    3847         printf("              [ %lf   %lf  ]\n",B[3][0],B[3][1]);
    3848         printf("              [ %lf   %lf  ]\n",B[4][0],B[4][1]);
    3849 
    3850         printf("B for grid2 : [ %lf   %lf  \n",B[0][2],B[0][3]);
    3851         printf("              [ %lf   %lf  \n",B[1][2],B[1][3]);
    3852         printf("              [ %lf   %lf  ]\n",B[2][2],B[2][3]);
    3853         printf("              [ %lf   %lf  ]\n",B[3][2],B[3][3]);
    3854         printf("              [ %lf   %lf  ]\n",B[4][2],B[4][3]);
    3855 
    3856         printf("B for grid3 : [ %lf   %lf  \n", B[0][4],B[0][5]);
    3857         printf("              [ %lf   %lf  \n", B[1][4],B[1][5]);
    3858         printf("              [ %lf   %lf  ]\n",B[2][4],B[2][5]);
    3859         printf("              [ %lf   %lf  ]\n",B[3][4],B[3][5]);
    3860         printf("              [ %lf   %lf  ]\n",B[4][4],B[4][5]);
    3861 
    3862         printf("B for grid4 : [ %lf   %lf  \n", B[0][6],B[0][7]);
    3863         printf("              [ %lf   %lf  \n", B[1][6],B[1][7]);
    3864         printf("              [ %lf   %lf  ]\n",B[2][6],B[2][7]);
    3865         printf("              [ %lf   %lf  ]\n",B[3][6],B[3][7]);
    3866         printf("              [ %lf   %lf  ]\n",B[4][6],B[4][7]);
    3867 
    3868         printf("B for grid5 : [ %lf   %lf  \n", B[0][8],B[0][9]);
    3869         printf("              [ %lf   %lf  \n", B[1][8],B[1][9]);
    3870         printf("              [ %lf   %lf  ]\n",B[2][8],B[2][9]);
    3871         printf("              [ %lf   %lf  ]\n",B[3][8],B[3][9]);
    3872         printf("              [ %lf   %lf  ]\n",B[4][8],B[4][9]);
    3873 
    3874         printf("B for grid6 : [ %lf   %lf  \n", B[0][10],B[0][11]);
    3875         printf("              [ %lf   %lf  \n", B[1][10],B[1][11]);
    3876         printf("              [ %lf   %lf  ]\n",B[2][10],B[2][11]);
    3877         printf("              [ %lf   %lf  ]\n",B[3][10],B[3][11]);
    3878         printf("              [ %lf   %lf  ]\n",B[4][10],B[4][11]);
    3879 
    3880 #endif
    3881 
    38823776        /*Multiply B by velocity, to get strain rate: */
    38833777        MatrixMultiply( &B[0][0],5,NDOF2*numgrids,0,
  • issm/trunk/src/c/objects/Riftfront.cpp

    r3570 r3595  
    604604                 *contact slip friction. */
    605605                 
    606                 #ifdef _ISSM_DEBUG_
    607                 printf("Dealing with grid pair (%i,%i)\n",nodes[0]->GetId(),nodes[1]->GetId());
    608                 #endif
    609 
    610606                /*Recover input parameters: */
    611607                inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    612608                if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
    613609                thickness=h[0];
    614 
    615                 #ifdef _ISSM_DEBUG_
    616                         printf("Thickness at grid (%i,%i): %lg\n",nodes[0]->GetId(),nodes[1]->GetID(),thickness);
    617                 #endif
    618610
    619611                /*From Peter Wriggers book (Computational Contact Mechanics, p191): */
     
    708700                 * and we want to avoid zigzagging of the loads, we want lump the loads onto grids, not onto surfaces between grids.:*/
    709701       
    710                 #ifdef _ISSM_DEBUG_
    711                 _printf_("Grids  (%i,%i) are free of constraints\n",nodes[0]->GetId(),nodes[1]->GetID());
    712                 #endif
    713 
    714702                /*Ok, to compute the pressure, we are going to need material properties, thickness and bed for the two grids. We assume those properties to
    715703                 * be the same across the rift.: */
  • issm/trunk/src/c/objects/Tria.cpp

    r3594 r3595  
    511511          /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    512512          GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
    513 
    514 #ifdef _ISSM_DEBUG_
    515         for (i=0;i<num_gauss;i++){
    516                 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i));
    517         }
    518 #endif
    519513
    520514        /* Start  looping on the number of gaussian points: */
     
    38043798                /* Get Jacobian determinant: */
    38053799                GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3);
    3806 #ifdef _ISSM_DEBUG_
    3807                 printf("Element id %i Jacobian determinant: %g\n",GetId(),Jdet);
    3808 #endif
    38093800
    38103801                /* Get nodal functions value at gaussian point:*/
     
    39323923        GetNodalFunctionsDerivatives(&dh1dh3[0][0],xyz_list, gauss_l1l2l3);
    39333924
    3934         #ifdef _ISSM_DEBUG_
    3935         for (i=0;i<3;i++){
    3936                 printf("Node %i  dh/dx=%lf dh/dy=%lf \n",i,dh1dh3[0][i],dh1dh3[1][i]);
    3937         }
    3938         #endif
    3939 
    39403925        /*Build B: */
    39413926        for (i=0;i<numgrids;i++){
     
    39723957        /*Get dh1dh2dh3 in actual coordinate system: */
    39733958        GetNodalFunctions(&l1l2l3[0],gauss_l1l2l3);
    3974 
    3975 #ifdef _ISSM_DEBUG_
    3976         for (i=0;i<3;i++){
    3977                 printf("Node %i  h=%lf \n",i,l1l2l3[i]);
    3978         }
    3979 #endif
    39803959
    39813960        /*Build B_prog: */
     
    45564535        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    45574536        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 4);
    4558 #ifdef _ISSM_DEBUG_
    4559         for (i=0;i<num_gauss;i++){
    4560                 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i));
    4561         }
    4562 #endif
    45634537
    45644538        /* Start  looping on the number of gaussian points: */
     
    45904564                /* Get nodal functions value at gaussian point:*/
    45914565                GetNodalFunctions(l1l2l3, gauss_l1l2l3);
    4592 #ifdef _ISSM_DEBUG_
    4593                 printf("viscositycomp %g thickness %g dvx [%g %g] dvy [%g %g]  dadjx [%g %g] dadjy[%g %g]\n",viscosity_complement,thickness,dvx[0],dvx[1],dvy[0],dvy[1],dadjx[0],dadjx[1],dadjy[0],dadjy[1]);
    4594 #endif
    45954566
    45964567                /*Get nodal functions derivatives*/
     
    47974768                GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3);
    47984769                GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3);
    4799                 #ifdef _ISSM_DEBUG_
    4800                         printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag);
    4801                 #endif
    48024770
    48034771                /*recover lambda and mu: */
    48044772                GetParameterValue(&lambda, &adjx_list[0],gauss_l1l2l3);
    48054773                GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3);
    4806                 #ifdef _ISSM_DEBUG_
    4807                         printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);
    4808                 #endif
    48094774                       
    48104775                /*recover vx and vy: */
    48114776                GetParameterValue(&vx, &vx_list[0],gauss_l1l2l3);
    48124777                GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3);
    4813                 #ifdef _ISSM_DEBUG_
    4814                         printf("Velocity vector %20.20lf %20.20lf\n",vx,vy);
    4815                 #endif
    48164778
    48174779                /* Get Jacobian determinant: */
    48184780                GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3);
    4819                 #ifdef _ISSM_DEBUG_
    4820                 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet);
    4821                 #endif
    4822                
     4781       
    48234782                /* Get nodal functions value at gaussian point:*/
    48244783                GetNodalFunctions(l1l2l3, gauss_l1l2l3);
     
    50314990                GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3);
    50324991                GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3);
    5033 #ifdef _ISSM_DEBUG_
    5034                 printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag);
    5035 #endif
    50364992
    50374993                /*recover lambda mu and xi: */
     
    50394995                GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3);
    50404996                GetParameterValue(&xi, &adjz_list[0],gauss_l1l2l3);
    5041 #ifdef _ISSM_DEBUG_
    5042                 printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);
    5043 #endif
    50444997
    50454998                /*recover vx vy and vz: */
     
    50475000                GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3);
    50485001                GetParameterValue(&vz, &vz_list[0],gauss_l1l2l3);
    5049 #ifdef _ISSM_DEBUG_
    5050                 printf("Velocity vector %20.20lf %20.20lf\n",vx,vy);
    5051 
    5052                 /*Get normal vecyor to the bed */
    5053                 SurfaceNormal(&surface_normal[0],xyz_list);
    5054 
    5055                 bed_normal[0]=-surface_normal[0]; //Program is for surface, so the normal to the bed is the opposite of the result
    5056                 bed_normal[1]=-surface_normal[1];
    5057                 bed_normal[2]=-surface_normal[2];
    5058 #endif
    50595002
    50605003                /* Get Jacobian determinant: */
    50615004                GetJacobianDeterminant3d(&Jdet, &xyz_list[0][0],gauss_l1l2l3);
    5062 #ifdef _ISSM_DEBUG_
    5063                 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet);
    5064 #endif
    50655005
    50665006                /* Get nodal functions value at gaussian point:*/
  • issm/trunk/src/c/parallel/balancedthickness.cpp

    r3588 r3595  
    140140        delete processedresults;
    141141        delete results;
     142        delete model;
    142143        delete inputs;
    143144
  • issm/trunk/src/c/parallel/diagnostic.cpp

    r3567 r3595  
    173173        xfree((void**)&u_g_obs);
    174174        xfree((void**)&weights);
     175        xfree((void**)&control_type);
    175176        delete model;
    176177        delete inputs;
  • issm/trunk/src/c/parallel/prognostic.cpp

    r3567 r3595  
    2525        Model* model=NULL;
    2626
    27         Vec     u_g=NULL;
    2827        double* u_g_serial=NULL;
    2928        double* h_g_initial=NULL;
     
    141140
    142141        /*Free ressources:*/
     142        xfree((void**)&u_g_serial);
     143        xfree((void**)&h_g_initial);
     144        xfree((void**)&melting_g);
     145        xfree((void**)&accumulation_g);
    143146        delete processedresults;
    144147        delete results;
  • issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp

    r3570 r3595  
    5959                nprof++;
    6060        }
    61         #ifdef _ISSM_DEBUG_
    62                 printf("Number of profiles in domain outline file: %i\n",nprof);
    63         #endif
    6461       
    6562        /*Allocate and initialize all the profiles: */
     
    113110        fclose(fid);
    114111
    115        
    116         #ifdef _ISSM_DEBUG_
    117         for (i=0;i<nprof;i++){
    118                 printf("Profile #%i\n",i);
    119                 x=pprofx[i];
    120                 y=pprofy[i];
    121                 for (j=0;j<profngrids[i];j++){
    122                         printf("   %lf %lf\n",x[j],y[j]);
    123                 }
    124         }
    125         #endif
    126 
    127 
    128112        cleanupandreturn:
    129113        /*Free ressources: */
  • issm/trunk/src/c/shared/Sorting/binary_search.cpp

    r3332 r3595  
    3737        else{
    3838                while((beg <= end) && (*mid != target)){
    39                         #ifdef _ISSM_DEBUG_
    40                                 printf("1: %i %i %i\n",*beg,*mid,*(end-1));
    41                         #endif
    4239                        // is the target in lower or upper half?
    4340                        if (target < *mid) {
     
    4946                                mid = beg + (end-beg)/2;  //new middle
    5047                        }
    51                         #ifdef _ISSM_DEBUG_
    52                                 printf("2: %i %i %i\n",*beg,*mid,*(end-1));
    53                         #endif
    5448                }
    5549                         
  • issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp

    r3335 r3595  
    161161                if (el2!=-1){
    162162                        /*el and el2 are on a segment rift, facing one another, plug them into riftsegments_uncompressed: */
    163                         #ifdef _ISSM_DEBUG_
    164                                 printf("Elements %i and %i are on a rift\n",el+1,el2+1);
    165                         #endif
    166163                    *(riftsegments_uncompressed+5*i+0)=1;
    167164                    *(riftsegments_uncompressed+5*i+1)=el;
     
    186183        }
    187184
    188         #ifdef _ISSM_DEBUG_
    189         for (i=0;i<nriftsegs;i++){
    190                 printf("Elements %i and %i are on a rift, joined by grids %i and %i\n",*(riftsegments+4*i+0)+1,*(riftsegments+4*i+1)+1,*(riftsegments+4*i+2),*(riftsegments+4*i+3));
    191         }
    192         #endif
    193185        xfree((void**)&riftsegments_uncompressed);
    194186       
     
    217209        /*Build a list of all the elements connected to this grid: */
    218210        GridElementsList(&GridElements,&NumGridElements,grid,index,nel);
    219         #ifdef _ISSM_DEBUG_
    220                 printf("Connected elements for grid %i\n",grid);
    221                 for (k=0;k<NumGridElements;k++){
    222                         printf("El %i\n",GridElements[k]+1);
    223                 }
    224         #endif
    225                        
     211
    226212        /*Figure out the list of elements  that are on the same side of the rift. To do so, we start from one
    227213         * side of the rift and keep rotating in the same direction:*/
     
    232218                                                                                                                           done rotating*/
    233219        GridElementListOnOneSideOfRift[1]=*(riftsegments+4*segmentnumber+1);
    234         #ifdef _ISSM_DEBUG_
    235         printf("Starting with elements %i and %i for grid %i\n",GridElementListOnOneSideOfRift[0]+1,GridElementListOnOneSideOfRift[1]+1,grid);
    236         #endif
    237220        counter=1;
    238221        for (;;){
     
    240223                 * equal to GridElementListOnOneSideOfRift[counter-1]*/
    241224                for (k=0;k<NumGridElements;k++){
    242                         #ifdef _ISSM_DEBUG_
    243                         printf("k: %i GridElements[k]: %i GridElementListOnOneSideOfRift[counter-1]: %i GridElementListOnOneSideOfRift[counter] %i Neighboor %i\n",k,GridElements[k]+1,
    244                                 GridElementListOnOneSideOfRift[counter-1]+1,GridElementListOnOneSideOfRift[counter]+1,IsNeighbor(GridElements[k],GridElementListOnOneSideOfRift[counter],index));
    245                         #endif
    246225                        if(IsNeighbor(GridElements[k],GridElementListOnOneSideOfRift[counter],index)){
    247226                                /*Verify this element is not already in our list of element on the same side of the rift: */
     
    268247                        GridElementListOnOneSideOfRift[l]=GridElementListOnOneSideOfRift[l+1];
    269248                }
    270                 #ifdef _ISSM_DEBUG_
    271                 printf("Grid %i is owned by  the following elements  on the same side of the rift: \n",grid);
    272                 for (l=0;l<NumGridElementListOnOneSideOfRift;l++){
    273                         printf("%i ",GridElementListOnOneSideOfRift[l]+1);
    274                 }
    275                 printf("\n");
    276                 #endif
    277249                break;
    278250        }// for (;;)
     
    315287                for (j=0;j<nsegs;j++){
    316288                        if (*(segments+3*j+2)==(el1+1)){
    317                                 #ifdef _ISSM_DEBUG_
    318                                         printf("Segment %i is the same as rift segment %i\n",j,i);
    319                                 #endif
    320289                                /*segment j is the same as rift segment i.Let's update segments[j][:] using  element el1 and the corresponding rift segment.
    321290                                 *Because riftsegments does not represent a list of rift segments anymore (it got heavily modified in SplitElementsForRifts,
     
    350319                        }
    351320                        if (*(segments+3*j+2)==(el2+1)){
    352                                 #ifdef _ISSM_DEBUG_
    353                                         printf("Segment %i is the same as rift segment %i\n",j,i);
    354                                 #endif
    355321                                /*segment j is the same as rift segment i.*/
    356322                                /*Let's update segments[j][:] using  element el2 and the corresponding rift segment: */
     
    440406        int n;
    441407        int el=-1;
    442         #ifdef _ISSM_DEBUG_
    443                 printf("Looking for %lf %lf\n",A,B);
    444         #endif
    445408        for (n=0;n<nel;n++){
    446409                if (((*(index+3*n+0)==A)  || (*(index+3*n+1)==A) || (*(index+3*n+2)==A) ) && ((*(index+3*n+0)==B)  || (*(index+3*n+1)==B) || (*(index+3*n+2)==B))){
    447410                        el=n;
    448                         #ifdef _ISSM_DEBUG_
    449                                 printf("Found them: %lf %lf %lf\n",*(index+3*n+0),*(index+3*n+1),*(index+3*n+2));
    450                         #endif
    451411                        break;
    452412                }
     
    921881                }
    922882
    923                 #ifdef _ISSM_DEBUG_
    924                         printf("Tips for rift#%i   (%i-%i)\n",i,tip1,tip2);
    925                 #endif
    926883                /*Record tips in riftstips: */
    927884                *(riftstips+2*i+0)=(double)tip1;
     
    960917                }
    961918
    962                 #ifdef _ISSM_DEBUG_
    963                 for (j=0;j<numsegs;j++){
    964                         printf("%i\n",order[j]);
    965                 }
    966                 #endif
    967 
    968919                /*Using the order vector, and the riftsegments_copy and riftspairs_copy, reorder the segments and the pairs: */
    969920                for (j=0;j<numsegs;j++){
  • issm/trunk/src/c/toolkits/petsc/patches/MatPartition.cpp

    r3332 r3595  
    6262                upper_row--;
    6363                range=upper_row-lower_row+1;
    64                 #ifdef _ISSM_DEBUG_
    65                         PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank %i Range %i",my_rank,range);
    66                         PetscSynchronizedFlush(MPI_COMM_WORLD);
    67                 #endif
    68                        
     64
    6965                count=0;
    7066                if (range){
     
    8480                /*Now each node has a node_rows vectors holding which rows they should extract from matrixA. Create an Index Set from node_rows.*/
    8581                ISCreateGeneral(MPI_COMM_WORLD,count,node_rows,&row_index);
    86                 #ifdef _ISSM_DEBUG_
    87                         ISView(row_index,PETSC_VIEWER_STDOUT_WORLD);
    88                 #endif
    8982               
    9083                /*Same deal for columns*/
     
    9487                }
    9588                ISCreateGeneral(MPI_COMM_WORLD,col_partition_vector_size,node_cols,&col_index);
    96                 #ifdef _ISSM_DEBUG_
    97                         ISView(col_index,PETSC_VIEWER_STDOUT_WORLD);
    98                 #endif
    9989
    10090                /*Call MatGetSubMatrix*/
  • issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToDoubleMatrix.cpp

    r1904 r3595  
    8686                }
    8787               
    88                 #ifdef _ISSM_DEBUG_
    89                 for(i=0;i<rows;i++){
    90                         for(j=0;j<cols;j++){
    91                                 printf("%g ",*(matrix+cols*i+j));
    92                         }
    93                         printf("\n");
    94                 }
    95                 #endif
    96 
    9788        }
    9889
  • issm/trunk/src/c/toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp

    r2042 r3595  
    7575        else{
    7676
    77 
    7877                /*Dealing with dense matrix: recover pointer and size: */
    7978                mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
    8079                rows=mxGetM(mxmatrix);
    8180                cols=mxGetN(mxmatrix);
    82 
    83                 #ifdef _ISSM_DEBUG_
    84                 for(i=0;i<rows;i++){
    85                         for(j=0;j<cols;j++){
    86                                 printf("%g ",*(mxmatrix_ptr+cols*j+i));
    87                         }
    88                         printf("\n");
    89                 }
    90                 #endif
    9181
    9282                /*transpose, as Petsc now does not allows MAT_COLUMN_ORIENTED matrices in MatSetValues: */
  • issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp

    r2042 r3595  
    8585                        MatGetRow(matrix,i,&ncols,&columns,&column_values);
    8686
    87                         #ifdef _ISSM_DEBUG_
    88                         for(j=0;j<ncols;j++){
    89                                 printf("%i %i: %g\n",i,columns[j],column_values[j]);
    90                         }
    91                         #endif
    92 
    9387                        /*copy values: */
    9488                        if(ncols)memcpy( val+j, column_values,ncols*sizeof(double));
  • issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp

    r3570 r3595  
    3333        VecGetSize(B,&MB);
    3434
    35         #ifdef _ISSM_DEBUG_
    36                 OutputServerMessages(0,0,"\n%s%s\n",STROFFSET,"Row partition vector:");
    37                 if (my_rank==0){
    38                         int i;
    39                         for (i=0;i<row_partition_vector_size;i++){
    40                                 OutputServerMessages(0,0,"%s%lf\n",STROFFSET,*(row_partition_vector+i));
    41                         }
    42                 }
    43         #endif
    44 
    4535        /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
    4636        if ( (row_partition_size !=MB) ){
     
    7262        VecAssemblyEnd(A);
    7363
    74         #ifdef _ISSM_DEBUG_
    75                 _printf_("Vector B:\n");
    76                 fflush(stdout);
    77                 VecView(B,PETSC_VIEWER_STDOUT_WORLD);
    78                 _printf_("Merge into  vector A:\n");
    79                 fflush(stdout);
    80                 VecView(A,PETSC_VIEWER_STDOUT_WORLD);
    81         #endif
    82 
    8364        /*Free ressources:*/
    8465        xfree((void**)&idxm);
  • issm/trunk/src/c/toolkits/petsc/patches/VecPartition.cpp

    r3332 r3595  
    5454                upper_row--;
    5555                range=upper_row-lower_row+1;
    56                 #ifdef _ISSM_DEBUG_
    57                         PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank %i Range %i\n",my_rank,range);
    58                         PetscSynchronizedFlush(MPI_COMM_WORLD);
    59                 #endif
    6056
    6157                if (range){
     
    8177                        values=NULL;
    8278                }
    83 
    84                 #ifdef _ISSM_DEBUG_
    85                         PetscSynchronizedPrintf(MPI_COMM_WORLD,"My rank: %i My count: %i node_rows: %p values: %p\n",my_rank,count,node_rows,values);
    86                         PetscSynchronizedFlush(MPI_COMM_WORLD);
    87                 #endif
    8879
    8980                if (count){
     
    115106                VecAssemblyBegin(outvector);
    116107                VecAssemblyEnd(outvector);
    117 
    118108               
    119109        }
    120        
    121         #ifdef _ISSM_DEBUG_
    122                 _printf_("Vector A:\n");
    123                 fflush(stdout);
    124                 VecView(vectorA,PETSC_VIEWER_STDOUT_WORLD);
    125                 _printf_("Partition of vector A:\n");
    126                 fflush(stdout);
    127                 VecView(outvector,PETSC_VIEWER_STDOUT_WORLD);
    128         #endif
    129110       
    130111        /*Assign output pointers:*/
  • issm/trunk/src/c/toolkits/petsc/patches/VecToMPISerial.cpp

    r1904 r3595  
    6464                if (my_rank==0){
    6565                        MPI_Recv(buffer,3,MPI_INT,i,1,MPI_COMM_WORLD,&status);
    66                         #ifdef _ISSM_DEBUG_
    67                                 _printf_("Received from node %i: %i-%i\n",buffer[0],buffer[1],buffer[2]);
    68                         #endif
    6966                        if (buffer[2])MPI_Recv(gathered_vector+buffer[1],buffer[2],MPI_DOUBLE,i,1,MPI_COMM_WORLD,&status);
    7067                }
  • issm/trunk/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp

    r3332 r3595  
    3535        *pnprows=nprows;
    3636        *pnpcols=npcols;
    37         #ifdef _ISSM_DEBUG_
    38                 _printf_("Decomposition: %i-%i\n",nprows,npcols);
    39         #endif
    4037
    4138}
     
    5148        for (i=0;i<input;i++){
    5249                SmallestPrimeFactor(&prime_factor,*(decomp+i));
    53                 #ifdef _ISSM_DEBUG_
    54                         _printf_("Smallest prime factor for term %i : %i\n",i,prime_factor);
    55                 #endif
    5650                if (prime_factor==*(decomp+i)){
    5751                        *pdecomp_size=i;
     
    6357                }
    6458        }
    65         #ifdef _ISSM_DEBUG_
    66                 _printf_("Prime factor decomposition for integer %i: \n",input);
    67                 for(i=0;i<*pdecomp_size;i++){
    68                         _printf_("%i ",*(decomp+i));
    69                 }
    70         #endif
    7159
    7260        *pdecomp=decomp;
  • issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp

    r3332 r3595  
    118118        PLA_API_end();
    119119
    120         #ifdef _ISSM_DEBUG_
    121                 PLA_Global_show("Matrix A",a," %lf","Done with A");
    122                 MatView(*A,PETSC_VIEWER_STDOUT_WORLD);
    123         #endif
    124 
    125120        /*Call the plapack invert routine*/
    126121        PLA_General_invert(PLA_METHOD_INV,a);
     
    129124        MatGetType(*A,&type);
    130125        PlapackToPetsc(inv_A,local_mA,local_nA,mA,nA,type,a,templ,nprows,npcols,nb);
    131 
    132         #ifdef _ISSM_DEBUG_
    133                 PLA_Global_show("Inverse of A",a," %lf","Done...");
    134                 MatView(*inv_A,PETSC_VIEWER_STDOUT_WORLD);
    135         #endif
    136126
    137127        /*Free ressources:*/
Note: See TracChangeset for help on using the changeset viewer.