21 #include "order/order_internal.h"
22 #include "order_scotch_strats.h"
24 #ifndef DOXYGEN_SHOULD_SKIP_THIS
25 #define STRAT_STR_MAX 1024
27 #define STRAT_DIRECT(_isPTScotch_) ( (_isPTScotch_) ? PTSCOTCH_STRAT_DIRECT : SCOTCH_STRAT_DIRECT )
28 #define STRAT_INCOMP(_isPTScotch_) ( (_isPTScotch_) ? PTSCOTCH_STRAT_INCOMP : SCOTCH_STRAT_INCOMP )
29 #define STRAT_PERSON(_isPTScotch_) ( (_isPTScotch_) ? PTSCOTCH_STRAT_PERSO : SCOTCH_STRAT_PERSO )
31 #define OUTPUT_DIRECT(_isPTScotch_) ( (_isPTScotch_) ? " PT-Scotch direct strategy\n" : " Scotch direct strategy\n" )
32 #define OUTPUT_INCOMP(_isPTScotch_) ( (_isPTScotch_) ? " PT-Scotch incomplete strategy\n" : " Scotch incomplete strategy\n" )
33 #define OUTPUT_PERSON(_isPTScotch_) ( (_isPTScotch_) ? " PT-Scotch personal strategy |%s|\n": " Scotch personal strategy |%s|\n" )
66 MALLOC_INTERN( strat, STRAT_STR_MAX,
char );
72 pastix_print( procnum, 0, OUTPUT_DIRECT(isPTscotch) );
74 snprintf( strat, STRAT_STR_MAX, STRAT_DIRECT(isPTscotch) );
78 pastix_print( procnum, 0, OUTPUT_INCOMP(isPTscotch) );
80 snprintf( strat, STRAT_STR_MAX, STRAT_INCOMP(isPTscotch) );
86 rc = snprintf( strat, STRAT_STR_MAX, STRAT_PERSON(isPTscotch),
95 if ( rc > STRAT_STR_MAX ) {
96 pastix_print_error(
"Order_scotch_build_strategy: Strategy string too long\n" );
101 pastix_print( procnum, 0, OUTPUT_PERSON(isPTscotch), strat );
127 #if defined(FORGET_PARTITION)
129 if ( ordemesh->
rangtab != NULL ) {
130 memFree_null( ordemesh->
rangtab );
132 if ( ordemesh->
treetab != NULL ) {
133 memFree_null( ordemesh->
treetab );
146 if ( ordemesh->
cblknbr == 0 ) {
BEGIN_C_DECLS typedef int pastix_int_t
@ IPARM_SCOTCH_SWITCH_LEVEL
void order_scotch_reallocate_ordemesh(pastix_order_t *ordemesh)
Reallocate the ordering structure.
char * order_scotch_build_strategy(const pastix_int_t *iparm, pastix_int_t procnum, int isPTscotch)
Generate the ordering strategy string based on the input parameters.