From b4ad5a4288ad068376ba15876671e22144908841 Mon Sep 17 00:00:00 2001 From: sfilippone Date: Thu, 8 Jan 2026 13:27:16 +0100 Subject: [PATCH] Fix build process --- Makefile | 46 ++++++++++++++++++++++++++++++++++++---------- configure | 23 +++++++++++++++++++++++ configure.ac | 16 ++++++++++++++++ cuda/Makefile | 7 ++++--- 4 files changed, 79 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index fd18a38c9..d210accb0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include Make.inc -all: dirs based precd linslvd utild cbindd extd $(CUDAD) $(OACCD) libd +all: dirs mods objs libd @echo "=====================================" @echo "PSBLAS libraries Compilation Successful." @@ -9,13 +9,39 @@ dirs: (if test ! -d include ; then mkdir include; fi; $(INSTALL_DATA) Make.inc include/Make.inc.psblas) (if test ! -d modules ; then mkdir modules; fi;) -precd: based -utild: based -linslvd: precd -extd: based -cudad: extd -oaccd: extd -cbindd: based precd linslvd utild +mods: basemods precmods linslvmods utilmods cbindmods extmods $(CUDAMODS) $(OACCMODS) +precmods utilmods extmods: basemods +linslvmods: precmods +cbindmods: basemods precmods linslvmods utilmods +oaccmods: extmods +cudamods: extmods +basemods: + $(MAKE) -C base mods +precmods: + $(MAKE) -C prec mods +linslvmods: + $(MAKE) -C linsolve mods +utilmods: + $(MAKE) -C util mods +cbindmods: + $(MAKE) -C cbind objs +extmods: + $(MAKE) -C ext mods +cudamods: + $(MAKE) -C cuda mods +oaccmods: + $(MAKE) -C openacc mods + + +objs: mods based precd linslvd utild cbindd extd $(CUDAD) $(OACCD) +based: basemods +precd: precmods +utild: utilmods +linslvd: linslvmods +extd: extmods +cudad: cudamods +oaccd: oaccmods +cbindd: cbindmods libd: based precd linslvd utild cbindd extd $(CUDALD) $(OACCLD) $(MAKE) -C base lib @@ -42,9 +68,9 @@ cbindd: $(MAKE) -C cbind objs extd: $(MAKE) -C ext objs -cudad: +cudad: cudamods $(MAKE) -C cuda objs -oaccd: +oaccd: oaccmods $(MAKE) -C openacc objs diff --git a/configure b/configure index eac4ccfd4..4c48e95f2 100755 --- a/configure +++ b/configure @@ -691,6 +691,13 @@ CINTMETIS CHAVEMETIS CHAVE_OPENMP CSERIALMPI +PSBLASBLDRMT +PSBLASBLDNOR +PSBLASDUPDEF +PSBLASDUPERR +PSBLASDUPOVW +PSBLASDUPADD +PSBLASDUPNUL PSBLASSTRING PSBLASPATCH PSBLASMINOR @@ -8814,6 +8821,14 @@ 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;}'`; +PSBLASDUPDEF=`cat $CFILE| grep dupl_def| $AWK '{print $6;}' | tr a-z A-Z | sed s/\_$//`; +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; } @@ -11765,6 +11780,14 @@ FDEFINES=$(PSBFDEFINES) + + + + + + + + diff --git a/configure.ac b/configure.ac index a4001041b..4513bb4a7 100644 --- a/configure.ac +++ b/configure.ac @@ -695,6 +695,14 @@ 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;}'`; +PSBLASDUPDEF=`cat $CFILE| grep dupl_def| $AWK '{print $6;}' | tr a-z A-Z | sed s/\_$//`; +PSBLASBLDNOR=`cat $CFILE| grep matbld_noremote| $AWK '{print $6;}'`; +PSBLASBLDRMT=`cat $CFILE| grep matbld_remote| $AWK '{print $6;}'`; + AC_MSG_RESULT([ version $PSBLASSTRING]) ############################################################################### @@ -1071,6 +1079,14 @@ 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(PSBLASDUPDEF) +AC_SUBST(PSBLASBLDNOR) +AC_SUBST(PSBLASBLDRMT) + AC_SUBST(CSERIALMPI) AC_SUBST(CHAVE_OPENMP) AC_SUBST(CHAVEMETIS) diff --git a/cuda/Makefile b/cuda/Makefile index 1e62895b4..5c9754bc7 100755 --- a/cuda/Makefile +++ b/cuda/Makefile @@ -52,12 +52,13 @@ lib: mods objs ilib cudalib spgpulib /bin/cp -p $(LIBNAME) $(LIBDIR) -mods: $(FOBJS) +mods: $(FOBJS) includes $(INSTALL) -p *$(.mod) $(MODDIR) + +includes: spgpuinc $(INSTALL) -p *.h $(INCDIR) -objs: $(OBJS) iobjs cudaobjs spgpuobjs -$(OBJS) iobjs cudaobjs spgpuobjs: spgpuinc +objs: mods $(OBJS) iobjs cudaobjs spgpuobjs spgpuinc: $(MAKE) -C spgpu incl