diff --git a/Make.inc b/Make.inc index 8d1845af..3c8ba190 100644 --- a/Make.inc +++ b/Make.inc @@ -4,9 +4,16 @@ # must be specified here with absolute pathnames # # # ########################################################## -PSBLASDIR=/home/sfilippo/NUMERICAL/PSBLAS2/psblas-2.2-maint +PSBLASDIR=/home/sfilippo/NUMERICAL/PSBLAS2/psblas2-dev/ include $(PSBLASDIR)/Make.inc + +INSTALL=/usr/bin/install -c +INSTALL_DATA=${INSTALL} -m 644 +INSTALL_DIR=/usr/local/PSBLAS/MLD2P4/gnu43 +INSTALL_LIBDIR=/usr/local/PSBLAS/MLD2P4/gnu43/lib +INSTALL_INCLUDEDIR=/usr/local/PSBLAS/MLD2P4/gnu43/include + ########################################################## # # # Additional defines and libraries for multilevel # @@ -26,11 +33,11 @@ include $(PSBLASDIR)/Make.inc # # ########################################################## -SLULIBS=-lslu -L/usr/local/SuperLU_3.0/gnu43 -SLUFLAGS=-DHave_SLU_ -I/usr/local/SuperLU_3.0/gnu43 +SLULIBS= +SLUFLAGS= -SLUDISTLIBS=-lslud -L/usr/local/SLUDist_2.0/gnu43 -SLUDISTFLAGS=-DHave_SLUDist_ -I/usr/local/SLUDist_2.0/gnu43 +SLUDISTLIBS= +SLUDISTFLAGS= UMFLIBS=-lumfpack -lamd -L/home/sfilippo/LIB/Umfpack_gcc41/ diff --git a/Make.inc.in b/Make.inc.in index fb337eb5..550d4f82 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -7,6 +7,13 @@ PSBLASDIR=@PSBLAS_DIR@ include $(PSBLASDIR)/Make.inc + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ +INSTALL_DIR=@INSTALL_DIR@ +INSTALL_LIBDIR=@INSTALL_LIBDIR@ +INSTALL_INCLUDEDIR=@INSTALL_INCLUDEDIR@ + ########################################################## # # # Additional defines and libraries for multilevel # diff --git a/Makefile b/Makefile index edcdb511..1339a55b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ include Make.inc +all: library + library: libdir mlp kryl libdir: @@ -9,6 +11,12 @@ mlp: kryl: (cd krylov; make symlink) (cd krylov; make lib) + +install: + ($(INSTALL) -d $(INSTALL_DIR)/lib &&\ + $(INSTALL_DATA) lib/*.a $(INSTALL_DIR)/lib) + ($(INSTALL) -d $(INSTALL_DIR)/include && \ + $(INSTALL_DATA) lib/*$(.mod) $(INSTALL_DIR)/include) veryclean: (cd mlprec; make veryclean) (cd krylov; make veryclean) diff --git a/configure b/configure index beb70922..445485c4 100755 --- a/configure +++ b/configure @@ -652,6 +652,9 @@ LIBS build_alias host_alias target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA CC CFLAGS LDFLAGS @@ -663,6 +666,10 @@ CPP GREP EGREP PSBLAS_DIR +INSTALL +INSTALL_DIR +INSTALL_LIBDIR +INSTALL_INCLUDEDIR SLU_FLAGS SLU_LIBS UMF_FLAGS @@ -1796,6 +1803,138 @@ You must first run the configure script in $PSBLAS_DIR $pac_cv_status_file." >&2 { (exit 1); exit 1; }; } fi +# +# Installation. +# +# +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +{ echo "$as_me:$LINENO: checking where to install" >&5 +echo $ECHO_N "checking where to install... $ECHO_C" >&6; } +case $prefix in + \/* ) eval "INSTALL_DIR=$prefix";; + * ) eval "INSTALL_DIR=/usr/local/psblas";; +esac +case $libdir in + \/* ) eval "INSTALL_LIBDIR=$libdir";; + * ) eval "INSTALL_LIBDIR=$INSTALL_DIR/lib";; +esac +case $includedir in + \/* ) eval "INSTALL_INCLUDEDIR=$includedir";; + * ) eval "INSTALL_INCLUDEDIR=$INSTALL_DIR/include";; +esac +{ echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR" >&5 +echo "${ECHO_T}$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR" >&6; } ############################################################################### # Compilers detection: FC,F77,CC should be set, if found. @@ -4033,6 +4172,12 @@ fi + + + + + + ############################################################################### # the following files will be created by Automake @@ -4517,6 +4662,7 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4703,6 +4849,9 @@ LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim @@ -4714,6 +4863,10 @@ CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim PSBLAS_DIR!$PSBLAS_DIR$ac_delim +INSTALL!$INSTALL$ac_delim +INSTALL_DIR!$INSTALL_DIR$ac_delim +INSTALL_LIBDIR!$INSTALL_LIBDIR$ac_delim +INSTALL_INCLUDEDIR!$INSTALL_INCLUDEDIR$ac_delim SLU_FLAGS!$SLU_FLAGS$ac_delim SLU_LIBS!$SLU_LIBS$ac_delim UMF_FLAGS!$UMF_FLAGS$ac_delim @@ -4724,7 +4877,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -4947,6 +5100,10 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix # CONFIG_FILE # + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4999,6 +5156,7 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out diff --git a/configure.ac b/configure.ac index fd3a166e..c67dcf82 100755 --- a/configure.ac +++ b/configure.ac @@ -87,6 +87,26 @@ dnl AC_MSG_NOTICE([Loaded $pac_cv_status_file $FC $MPIFC $BLACS_LIBS]) dnl AM_INIT_AUTOMAKE dnl Specify required version of autoconf. AC_PREREQ(2.59) +# +# Installation. +# +# +AC_PROG_INSTALL + +AC_MSG_CHECKING([where to install]) +case $prefix in + \/* ) eval "INSTALL_DIR=$prefix";; + * ) eval "INSTALL_DIR=/usr/local/psblas";; +esac +case $libdir in + \/* ) eval "INSTALL_LIBDIR=$libdir";; + * ) eval "INSTALL_LIBDIR=$INSTALL_DIR/lib";; +esac +case $includedir in + \/* ) eval "INSTALL_INCLUDEDIR=$includedir";; + * ) eval "INSTALL_INCLUDEDIR=$INSTALL_DIR/include";; +esac +AC_MSG_RESULT([$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR]) ############################################################################### # Compilers detection: FC,F77,CC should be set, if found. @@ -169,6 +189,12 @@ fi AC_SUBST(PSBLAS_DIR) +AC_SUBST(INSTALL) +AC_SUBST(INSTALL_DATA) +AC_SUBST(INSTALL_DIR) +AC_SUBST(INSTALL_LIBDIR) +AC_SUBST(INSTALL_INCLUDEDIR) + AC_SUBST(SLU_FLAGS) AC_SUBST(SLU_LIBS) AC_SUBST(UMF_FLAGS) diff --git a/test/pargen/ppde.f90 b/test/pargen/ppde.f90 index 6690a1b3..762743bf 100644 --- a/test/pargen/ppde.f90 +++ b/test/pargen/ppde.f90 @@ -179,10 +179,7 @@ program ppde integer :: info character(len=20) :: name,ch_err - if(psb_get_errstatus() /= 0) goto 9999 info=0 - name='pde90' - call psb_set_errverbosity(2) call psb_init(ictxt) @@ -193,6 +190,9 @@ program ppde call psb_exit(ictxt) stop endif + if(psb_get_errstatus() /= 0) goto 9999 + name='pde90' + call psb_set_errverbosity(2) ! ! get parameters