From dea2186d76c09218813872f64f963b7c6aae7591 Mon Sep 17 00:00:00 2001 From: sfilippone Date: Thu, 13 Nov 2025 09:15:05 +0100 Subject: [PATCH] Updated configure to expose constants to the C interface --- base/modules/psb_config.h.in | 8 ++++++++ base/modules/psb_const_mod.F90 | 3 ++- configure | 20 ++++++++++++++++++++ configure.ac | 14 ++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/base/modules/psb_config.h.in b/base/modules/psb_config.h.in index e0258015..b26340d7 100644 --- a/base/modules/psb_config.h.in +++ b/base/modules/psb_config.h.in @@ -9,6 +9,14 @@ #define PSB_VERSION_PATCHLEVEL @PSBLASPATCH@ #define PSB_VERSION_STRING @PSBLASSTRING@ +#define PSB_DUPL_NULL @PSBLASDUPNUL@ +#define PSB_DUPL_ADD @PSBLASDUPADD@ +#define PSB_DUPL_OVWRT @PSBLASDUPOVW@ +#define PSB_DUPL_ERR @PSBLASDUPERR@ +#define PSB_MATBLD_NOREMOTE @PSBLASBLDNOR@ +#define PSB_MATBLD_REMOTE @PSBLASBLDRMT@ + + @CSERIALMPI@ @PSB_IPKDEF@ diff --git a/base/modules/psb_const_mod.F90 b/base/modules/psb_const_mod.F90 index e3509811..5f229ac8 100644 --- a/base/modules/psb_const_mod.F90 +++ b/base/modules/psb_const_mod.F90 @@ -208,7 +208,8 @@ module psb_const_mod integer(psb_ipk_), parameter :: psb_invalid_ = -1 integer(psb_ipk_), parameter :: psb_spmat_null_=0, psb_spmat_bld_=1 integer(psb_ipk_), parameter :: psb_spmat_asb_=2, psb_spmat_upd_=4 - integer(psb_ipk_), parameter :: psb_matbld_noremote_=0, psb_matbld_remote_=1 + integer(psb_ipk_), parameter :: psb_matbld_noremote_ = 0 + integer(psb_ipk_), parameter :: psb_matbld_remote_ = 1 integer(psb_ipk_), parameter :: psb_vect_null_=0, psb_vect_bld_=1 integer(psb_ipk_), parameter :: psb_vect_asb_=2, psb_vect_upd_=4 diff --git a/configure b/configure index ad040b1a..9f7434aa 100755 --- a/configure +++ b/configure @@ -690,6 +690,12 @@ CINTMETIS CHAVEMETIS CHAVE_OPENMP CSERIALMPI +PSBLASBLDRMT +PSBLASBLDNOR +PSBLASDUPERR +PSBLASDUPOVW +PSBLASDUPADD +PSBLASDUPNUL PSBLASSTRING PSBLASPATCH PSBLASMINOR @@ -8758,6 +8764,13 @@ PSBLASMAJOR=`cat $CFILE| grep version_major | $AWK '{print $6;}'`; PSBLASMINOR=`cat $CFILE| grep version_minor| $AWK '{print $6;}'`; PSBLASPATCH=`cat $CFILE| grep patchlevel| $AWK '{print $6;}'`; PSBLASSTRING=`cat $CFILE | grep version_string | $AWK '{print $6;}'`; +PSBLASDUPNUL=`cat $CFILE| grep dupl_null | $AWK '{print $6;}'`; +PSBLASDUPADD=`cat $CFILE| grep "psb_dupl_add_ =" | $AWK '{print $6;}'`; +PSBLASDUPOVW=`cat $CFILE| grep dupl_ovwrt| $AWK '{print $6;}'`; +PSBLASDUPERR=`cat $CFILE| grep dupl_err| $AWK '{print $6;}'`; +PSBLASBLDNOR=`cat $CFILE| grep matbld_noremote| $AWK '{print $6;}'`; +PSBLASBLDRMT=`cat $CFILE| grep matbld_remote| $AWK '{print $6;}'`; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: version $PSBLASSTRING" >&5 printf "%s\n" " version $PSBLASSTRING" >&6; } @@ -11710,6 +11723,13 @@ FDEFINES=$(PSBFDEFINES) + + + + + + + diff --git a/configure.ac b/configure.ac index c2eade58..ecaa89de 100644 --- a/configure.ac +++ b/configure.ac @@ -689,6 +689,13 @@ PSBLASMAJOR=`cat $CFILE| grep version_major | $AWK '{print $6;}'`; PSBLASMINOR=`cat $CFILE| grep version_minor| $AWK '{print $6;}'`; PSBLASPATCH=`cat $CFILE| grep patchlevel| $AWK '{print $6;}'`; PSBLASSTRING=`cat $CFILE | grep version_string | $AWK '{print $6;}'`; +PSBLASDUPNUL=`cat $CFILE| grep dupl_null | $AWK '{print $6;}'`; +PSBLASDUPADD=`cat $CFILE| grep "psb_dupl_add_ =" | $AWK '{print $6;}'`; +PSBLASDUPOVW=`cat $CFILE| grep dupl_ovwrt| $AWK '{print $6;}'`; +PSBLASDUPERR=`cat $CFILE| grep dupl_err| $AWK '{print $6;}'`; +PSBLASBLDNOR=`cat $CFILE| grep matbld_noremote| $AWK '{print $6;}'`; +PSBLASBLDRMT=`cat $CFILE| grep matbld_remote| $AWK '{print $6;}'`; + AC_MSG_RESULT([ version $PSBLASSTRING]) ############################################################################### @@ -1065,6 +1072,13 @@ AC_SUBST(PSBLASMAJOR) AC_SUBST(PSBLASMINOR) AC_SUBST(PSBLASPATCH) AC_SUBST(PSBLASSTRING) +AC_SUBST(PSBLASDUPNUL) +AC_SUBST(PSBLASDUPADD) +AC_SUBST(PSBLASDUPOVW) +AC_SUBST(PSBLASDUPERR) +AC_SUBST(PSBLASBLDNOR) +AC_SUBST(PSBLASBLDRMT) + AC_SUBST(CSERIALMPI) AC_SUBST(CHAVE_OPENMP) AC_SUBST(CHAVEMETIS)