66#include <stdio.h>
77#include "config.h"
88
9- #if HAVE_LIBSCOTCH
9+ #if defined( HAVE_LIBSCOTCH )
1010#include <scotch.h>
11- #endif
11+ #endif /* defined(HAVE_LIBSCOTCH) */
1212
1313
1414#define USE_KL_KPART 0
@@ -49,7 +49,7 @@ int tm_get_greedy_flag(){
4949}
5050
5151
52- #if HAVE_LIBSCOTCH
52+ #if defined( HAVE_LIBSCOTCH )
5353
5454SCOTCH_Graph * com_mat_to_scotch_graph (com_mat_t * com_mat , int n ){
5555 double * * mat = com_mat -> comm ;
@@ -284,7 +284,7 @@ int *kpartition_scotch(int k, com_mat_t *com_mat, int n, int *constraints, int
284284 return partition ;
285285}
286286
287- #endif /* HAVE_LIBSCOTCH */
287+ #endif /* defined( HAVE_LIBSCOTCH) */
288288
289289
290290void allocate_vertex (int u , int * res , com_mat_t * com_mat , int n , int * size , int max_size )
@@ -475,7 +475,7 @@ int *kpartition(int k, com_mat_t *com_mat, int n, int *constraints, int nb_const
475475 /* else */
476476
477477
478- #if HAVE_LIBSCOTCH
478+ #if defined( HAVE_LIBSCOTCH )
479479 if (!greedy_flag ){
480480 if (verbose_level >= DEBUG )
481481 printf ("Using Scotch\n" );
@@ -485,11 +485,11 @@ int *kpartition(int k, com_mat_t *com_mat, int n, int *constraints, int nb_const
485485 printf ("Using greedy partitionning\n" );
486486 res = kpartition_greedy (k , com_mat , n , constraints , nb_constraints );
487487 }
488- #else
488+ #else /* defined(HAVE_LIBSCOTCH) */
489489 if (verbose_level >= DEBUG )
490490 printf ("Using greedy partitionning\n" );
491491 res = kpartition_greedy (k , com_mat , n , constraints , nb_constraints );
492- #endif
492+ #endif /* defined(HAVE_LIBSCOTCH) */
493493 return res ;
494494}
495495
@@ -684,8 +684,8 @@ void free_const_tab(constraint_t *const_tab, int k)
684684 FREE (const_tab );
685685}
686686
687-
688- void check_com_mat (com_mat_t * com_mat ){
687+ #if 0
688+ static void check_com_mat (com_mat_t * com_mat ){
689689 int i ,j ;
690690
691691 for ( i = 0 ; i < com_mat -> n ; i ++ )
@@ -694,16 +694,15 @@ void check_com_mat(com_mat_t *com_mat){
694694 printf ("com_mat->comm[%d][%d]= %f\n" ,i ,j ,com_mat -> comm [i ][j ]);
695695 exit (-1 );
696696 }
697-
698-
699697}
698+ #endif
700699
701- void print_tab (int n ){
700+ static void print_tab (int n ){
702701 for (;n ;n -- )
703702 fprintf (stdout ,"\t" );
704703}
705704
706- void display_partition (int * partition , int * local_vertices , int n , int depth , int k ){
705+ static void display_partition (int * partition , int * local_vertices , int n , int depth , int k ){
707706 int cur_part , j ;
708707 print_tab (depth );fprintf (stdout ,"Partitions at depth=%d\n" ,depth );
709708 for ( cur_part = 0 ; cur_part < k ; cur_part ++ ){
0 commit comments