41 Commits
Author SHA1 Message Date
Sylvestre Ledru 576120a26c Description of the last changes 2012-08-02 11:36:39 +02:00
Umberto De Giovannini 168aaf5a3f Fixed division by zero in smlnum by usind p[d,s]lamch instead of the serial [d,s]lamch. I am not sure why but this fix all the issues (crash pcndrv1 and wrong numbers in pzndr1) with gfortran.. 2012-08-01 17:10:54 +02:00
Sylvestre Ledru b4b959850e * Configure detected built-in LAPACK and BLAS, but refused to use them
(Closes: #784)
2012-07-17 14:30:24 +02:00
Sylvestre Ledru 37120660f3 New version off automake 2012-07-12 03:53:09 -06:00
Sylvestre Ledru 30fca4c6c1 Update the git ignore list 2012-07-12 03:52:47 -06:00
Sylvestre Ledru 628e80b2ec * Compile also PARPACK / MPI example (Closes: #783) 2012-07-12 03:52:10 -06:00
Sylvestre Ledru 7834970e92 * Compile aussi PARPACK / MPI example (Closes: #783) 2012-07-11 23:23:58 -06:00
Sylvestre Ledru 1e814091ff * Get rid of the mpif.h occurences in the source code (Closes: #782) 2012-07-11 23:10:08 -06:00
Sylvestre Ledru b105070b63 Update of the changelog 2012-06-22 22:05:57 +02:00
Sylvestre Ledru 171f59a65a * Wrong call to pdlamch was causing segfaults
Thanks to Kyrre Sjøbæk for finding the bug and the fix.
2012-06-22 21:59:32 +02:00
Sylvestre Ledru 434a1a002a * Option --enable-maintainer-mode added to the configure
* --disable-mpi disables the build of parpack (Closes: #714)
   * Switch to automake 1.11.3
2012-05-21 09:24:05 +02:00
Sylvestre Ledru 9edcf7a494 Merge branch 'master' of git.forge.scilab.org:arpack-ng 2012-02-22 11:41:49 +01:00
Sylvestre Ledru 81ce8ecb6d Update of the gitignore 2012-02-22 11:40:45 +01:00
Sylvestre Ledru 2523fb7df5 Change the build order 2012-02-22 11:40:28 +01:00
Sylvestre Ledru 36aaa0570f Update of the date 2012-02-22 10:59:03 +01:00
Tim Mitchell 3c470ca5a2 Fix potential wrong eigenvalue return. (patch by Tim Mitchell at Courant)
"ARPACK can return the wrong eigenvalues if eigenvectors are
requested and the resulting number of converged eigenvalues is less than
the number requested."
2012-02-21 18:05:06 +01:00
Sylvestre Ledru 75fb014285 Revert "Fix potential wrong eigenvalue return. (patch by Tim Mitchell at Courant)"
This reverts commit 7625b2456e.
2012-02-21 18:04:35 +01:00
Tim Mitchell 7625b2456e Fix potential wrong eigenvalue return. (patch by Tim Mitchell at Courant)
"ARPACK can return the wrong eigenvalues if eigenvectors are
requested and the resulting number of converged eigenvalues is less than
the number requested."
2012-02-21 18:03:43 +01:00
Sylvestre Ledru b3d2f34a82 Revert " * Reorder bug fixed when eigenvectors are requested and the resulting"
This reverts commit f4e816d4d2.
2012-02-21 18:03:16 +01:00
Sylvestre Ledru bf945c1837 Prepare a working make dist 2012-02-21 18:00:12 +01:00
Sylvestre Ledru 933c31a183 Update the version of arpack-ng in the configure 2012-02-21 17:28:51 +01:00
Sylvestre Ledru e315ec7419 Update of the various changes 2012-02-21 17:23:15 +01:00
Sylvestre Ledru 9a1658d77d * TESTS/ directory added and built. 2012-02-21 17:23:02 +01:00
Tim Mitchell f4e816d4d2 * Reorder bug fixed when eigenvectors are requested and the resulting
number of converged eigenvalues is less than the number requested.
     Patches from Tim Mitchell. (Closes: #664)
2012-02-21 17:21:03 +01:00
Tim Mitchell db18628436 Cosmetic changes 2012-02-21 17:20:32 +01:00
Sylvestre Ledru 9b99af7e6b * Update of the doc about TOL in dnaupd. 2012-01-19 00:22:11 +01:00
Sylvestre Ledru 8a69318bb7 Update of the changelog 2012-01-19 00:10:51 +01:00
Pauli Virtanen a8b99df06d * ARPACK routines (at least dnaupd) modifieD its argument TOL, which
is listed in the documentation as input-only. Thanks to Pauli Virtanen
     for the patch (Closes: #632)
2012-01-19 00:10:38 +01:00
Sylvestre Ledru cd7c6b4379 * Many bug fixes in the parpack lib. It is an old patch from upstream.
Thanks to Viral Shah for pinging us on this subject.
     See the PARPACK_CHANGES file for the details.
2012-01-14 14:58:11 +01:00
Sylvestre Ledru beaad2654c * Provide a M4 macro (detect_arpack_bug.m4) to check if the underlying
arpack is buggy (ie not arpack-ng). This allows developper applications
     to perform the check in their autotools build system (configure).
2012-01-13 11:16:22 +01:00
Sylvestre Ledru 4ade42ebd7 * Change the bug report from arpack@caam.rice.edu to
http://forge.scilab.org/index.php/p/arpack-ng/issues/
2012-01-10 05:59:23 +01:00
Sylvestre Ledru 78b7d449b4 * Always search for MPILIBS (in order to have the variable correctly set)
* Explicitly link against MPI fortran libs for parpack
2011-12-29 12:25:28 +01:00
Sylvestre Ledru 7c791977a1 Update of the changelog 2011-12-28 14:36:02 +01:00
Sylvestre Ledru 2d3cdaf9e5 arpack 96 => arpack-ng 3 2011-12-28 14:35:54 +01:00
Sylvestre Ledru a8e958e2d8 Install arpack.pc 2011-12-28 14:35:22 +01:00
Sylvestre Ledru fea0aabce0 pkg-config file added 2011-12-28 14:26:29 +01:00
Sylvestre Ledru 4c8e2ecc9e Readme updated regarding recent changes 2011-12-28 14:26:18 +01:00
Sylvestre Ledru eeae72a071 * Fix a long line in pznaup2.f which was showing some wrong symbols
(Closes: #620)
2011-12-28 13:47:11 +01:00
Sylvestre Ledru 2bcad73e6c Remove a useless file 2011-12-13 16:59:39 +01:00
Sylvestre Ledru 9f77178d43 * Missing license information (Closes: #614) 2011-12-13 16:44:10 +01:00
Sylvestre Ledru 30b8cc4cd4 * libtool was missing (Closes: #615) 2011-12-13 16:36:39 +01:00
68 changed files with 16826 additions and 11085 deletions
+11 -1
View File
@@ -1,3 +1,4 @@
.deps
*.o
*.lo
Makefile
@@ -17,4 +18,13 @@ libtool
*.u2d
*.suo
VISUAL_STUDIO/Release MKL/
VISUAL_STUDIO/bin/
VISUAL_STUDIO/bin/
TESTS/dnsimp
PARPACK/EXAMPLES/MPI/pcndrv1
PARPACK/EXAMPLES/MPI/pdndrv1
PARPACK/EXAMPLES/MPI/pdndrv3
PARPACK/EXAMPLES/MPI/pdsdrv1
PARPACK/EXAMPLES/MPI/psndrv3
PARPACK/EXAMPLES/MPI/pssdrv1
PARPACK/EXAMPLES/MPI/pzndrv1
+61
View File
@@ -1,3 +1,64 @@
arpack-ng - 3.1.2
* Wrong call to pdlamch was causing segfaults
Thanks to Kyrre Sjøbæk for finding the bug and the fix.
* Get rid of the mpif.h occurences in the source code (Closes: #782)
* Compile also PARPACK / MPI example (Closes: #783)
* Configure detected built-in LAPACK and BLAS, but refused to use them
(Closes: #784)
* Fixed division by zero in smlnum by usind p[d,s]lamch instead of the
serial. Thanks to Umberto De Giovannini.
-- Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> Fri, 22 Jun 2012 22:05:41 +0200
arpack-ng - 3.1.1
* Option --enable-maintainer-mode added to the configure
* --disable-mpi disables the build of parpack (Closes: #714)
* Switch to automake 1.11.3
-- Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> Mon, 21 May 2012 09:08:41 +0200
arpack-ng - 3.1.0
* Many bug fixes in the parpack lib. It is an old patch from upstream.
Thanks to Viral Shah for pinging us on this subject.
See the PARPACK_CHANGES file for the details.
* Change the bug report from arpack@caam.rice.edu to
http://forge.scilab.org/index.php/p/arpack-ng/issues/
* Provide a M4 macro (detect_arpack_bug.m4) to check if the underlying
arpack is buggy (ie not arpack-ng). This allows developper applications
to perform the check in their autotools build system (configure).
* Fixed a lack of appropriate bounds check in DNAUP2. Thanks to Pauli Virtanen
for the patch (Closes: #632)
* Update of the doc about TOL in dnaupd.
* Reorder bug fixed when eigenvectors are requested and the resulting
number of converged eigenvalues is less than the number requested.
Patches from Tim Mitchell. (Closes: #664)
* TESTS/ directory added and built.
-- Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> Wed, 22 Feb 2012 10:58:39 +0100
arpack-ng - 3.0.2
* Fix a long line in pznaup2.f which was showing some wrong symbols
(Closes: #620)
* README content updated regarding ARPACK-NG
* arpack.pc (pkg-config) file added
* Update the title & version in the configure.ac
* Always search for MPILIBS (in order to have the variable correctly set)
* Explicitly link against MPI fortran libs for parpack
-- Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> Wed, 28 Dec 2011 13:45:53 +0100
arpack-ng - 3.0.1
* libtool was missing (Closes: #615)
* Missing license information (Closes: #614)
* TODO added
-- Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com> Tue, 13 Dec 2011 16:33:25 +0100
arpack-ng - 3.0
* Patches from Scilab
+46
View File
@@ -0,0 +1,46 @@
BSD Software License
Pertains to ARPACK and P_ARPACK
Copyright (c) 1996-2008 Rice University.
Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff.
All rights reserved.
Arpack has been renamed to arpack-ng.
Copyright (c) 2001-2011 - Scilab Enterprises
Updated by Allan Cornet, Sylvestre Ledru.
Copyright (c) 2010 - Jordi Gutiérrez Hermoso (Octave patch)
Copyright (c) 2007 - Sébastien Fabbro (gentoo patch)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer listed
in this license in the documentation and/or other materials
provided with the distribution.
- Neither the name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+16 -2
View File
@@ -1,12 +1,26 @@
SUBDIRS = UTIL SRC @MPIDIR@
SUBDIRS = UTIL SRC . TESTS
if MPI
SUBDIRS += PARPACK
endif
lib_LTLIBRARIES = libarpack.la
ACLOCAL_AMFLAGS = -I m4/
libarpack_la_SOURCES =
libarpack_la_LDFLAGS = -version-info 2:0
libarpack_la_LIBADD = \
$(top_builddir)/SRC/libarpacksrc.la \
$(top_builddir)/UTIL/libarpackutil.la \
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS)
EXTRA_DIST = README
EXTRA_DIST = README CHANGES
# Pkgconfig directory
pkgconfigdir = $(libdir)/pkgconfig
# Files to install in Pkgconfig directory
pkgconfig_DATA = arpack.pc
+102 -44
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,7 @@
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -34,10 +35,11 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@MPI_TRUE@am__append_1 = PARPACK
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure config.guess \
config.sub install-sh ltmain.sh missing
$(srcdir)/Makefile.in $(top_srcdir)/configure COPYING TODO \
config.guess config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_blas.m4 \
$(top_srcdir)/m4/ax_lapack.m4 $(top_srcdir)/m4/ax_mpi.m4 \
@@ -72,7 +74,13 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)"
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libarpack_la_DEPENDENCIES = $(top_builddir)/SRC/libarpacksrc.la \
@@ -102,6 +110,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -109,14 +118,16 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DIST_SUBDIRS = UTIL SRC . TESTS PARPACK
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -145,6 +156,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -189,10 +202,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -268,7 +281,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = UTIL SRC @MPIDIR@
SUBDIRS = UTIL SRC . TESTS $(am__append_1)
lib_LTLIBRARIES = libarpack.la
ACLOCAL_AMFLAGS = -I m4/
libarpack_la_SOURCES =
@@ -278,13 +291,19 @@ libarpack_la_LIBADD = \
$(top_builddir)/UTIL/libarpackutil.la \
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS)
EXTRA_DIST = README
EXTRA_DIST = README CHANGES
# Pkgconfig directory
pkgconfigdir = $(libdir)/pkgconfig
# Files to install in Pkgconfig directory
pkgconfig_DATA = arpack.pc
all: all-recursive
.SUFFIXES:
am--refresh:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -311,9 +330,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@@ -347,7 +366,7 @@ clean-libLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libarpack.la: $(libarpack_la_OBJECTS) $(libarpack_la_DEPENDENCIES)
libarpack.la: $(libarpack_la_OBJECTS) $(libarpack_la_DEPENDENCIES) $(EXTRA_libarpack_la_DEPENDENCIES)
$(libarpack_la_LINK) -rpath $(libdir) $(libarpack_la_OBJECTS) $(libarpack_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -364,6 +383,24 @@ clean-libtool:
distclean-libtool:
-rm -f libtool config.lt
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -572,7 +609,11 @@ dist-gzip: distdir
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
@@ -580,7 +621,7 @@ dist-lzma: distdir
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
@@ -611,6 +652,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -630,6 +673,7 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -658,8 +702,16 @@ distcheck: dist
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@@ -677,10 +729,10 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(LTLIBRARIES)
all-am: Makefile $(LTLIBRARIES) $(DATA)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)"; do \
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
@@ -693,10 +745,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@@ -731,7 +788,7 @@ info: info-recursive
info-am:
install-data-am:
install-data-am: install-pkgconfigDATA
install-dvi: install-dvi-recursive
@@ -778,7 +835,7 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-libLTLIBRARIES
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
@@ -786,20 +843,21 @@ uninstall-am: uninstall-libLTLIBRARIES
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-libLTLIBRARIES
dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
install-man install-pdf install-pdf-am install-pkgconfigDATA \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
+31
View File
@@ -0,0 +1,31 @@
F77 = $(MPIF77)
bin_PROGRAMS = pzndrv1 psndrv3 pdndrv1 pdndrv3 pssdrv1 pdsdrv1 pcndrv1
pzndrv1_SOURCES = pzndrv1.f
pzndrv1_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
psndrv3_SOURCES = psndrv3.f
psndrv3_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdndrv1_SOURCES = pdndrv1.f
pdndrv1_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdndrv3_SOURCES = pdndrv3.f
pdndrv3_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pssdrv1_SOURCES = pssdrv1.f
pssdrv1_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdsdrv1_SOURCES = pdsdrv1.f
pdsdrv1_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pcndrv1_SOURCES = pcndrv1.f
pcndrv1_LDADD=../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
+563
View File
@@ -0,0 +1,563 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = pzndrv1$(EXEEXT) psndrv3$(EXEEXT) pdndrv1$(EXEEXT) \
pdndrv3$(EXEEXT) pssdrv1$(EXEEXT) pdsdrv1$(EXEEXT) \
pcndrv1$(EXEEXT)
subdir = PARPACK/EXAMPLES/MPI
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_blas.m4 \
$(top_srcdir)/m4/ax_lapack.m4 $(top_srcdir)/m4/ax_mpi.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_pcndrv1_OBJECTS = pcndrv1.$(OBJEXT)
pcndrv1_OBJECTS = $(am_pcndrv1_OBJECTS)
am__DEPENDENCIES_1 =
pcndrv1_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pdndrv1_OBJECTS = pdndrv1.$(OBJEXT)
pdndrv1_OBJECTS = $(am_pdndrv1_OBJECTS)
pdndrv1_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pdndrv3_OBJECTS = pdndrv3.$(OBJEXT)
pdndrv3_OBJECTS = $(am_pdndrv3_OBJECTS)
pdndrv3_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pdsdrv1_OBJECTS = pdsdrv1.$(OBJEXT)
pdsdrv1_OBJECTS = $(am_pdsdrv1_OBJECTS)
pdsdrv1_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_psndrv3_OBJECTS = psndrv3.$(OBJEXT)
psndrv3_OBJECTS = $(am_psndrv3_OBJECTS)
psndrv3_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pssdrv1_OBJECTS = pssdrv1.$(OBJEXT)
pssdrv1_OBJECTS = $(am_pssdrv1_OBJECTS)
pssdrv1_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pzndrv1_OBJECTS = pzndrv1.$(OBJEXT)
pzndrv1_OBJECTS = $(am_pzndrv1_OBJECTS)
pzndrv1_DEPENDENCIES = ../../libparpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@
F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
F77LD = $(F77)
F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(pcndrv1_SOURCES) $(pdndrv1_SOURCES) $(pdndrv3_SOURCES) \
$(pdsdrv1_SOURCES) $(psndrv3_SOURCES) $(pssdrv1_SOURCES) \
$(pzndrv1_SOURCES)
DIST_SOURCES = $(pcndrv1_SOURCES) $(pdndrv1_SOURCES) \
$(pdndrv3_SOURCES) $(pdsdrv1_SOURCES) $(psndrv3_SOURCES) \
$(pssdrv1_SOURCES) $(pzndrv1_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BLAS_LIBS = @BLAS_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = $(MPIF77)
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FLIBS = @FLIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LAPACK_LIBS = @LAPACK_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pzndrv1_SOURCES = pzndrv1.f
pzndrv1_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
psndrv3_SOURCES = psndrv3.f
psndrv3_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdndrv1_SOURCES = pdndrv1.f
pdndrv1_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdndrv3_SOURCES = pdndrv3.f
pdndrv3_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pssdrv1_SOURCES = pssdrv1.f
pssdrv1_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pdsdrv1_SOURCES = pdsdrv1.f
pdsdrv1_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
pcndrv1_SOURCES = pcndrv1.f
pcndrv1_LDADD = ../../libparpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign PARPACK/EXAMPLES/MPI/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign PARPACK/EXAMPLES/MPI/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
pcndrv1$(EXEEXT): $(pcndrv1_OBJECTS) $(pcndrv1_DEPENDENCIES) $(EXTRA_pcndrv1_DEPENDENCIES)
@rm -f pcndrv1$(EXEEXT)
$(F77LINK) $(pcndrv1_OBJECTS) $(pcndrv1_LDADD) $(LIBS)
pdndrv1$(EXEEXT): $(pdndrv1_OBJECTS) $(pdndrv1_DEPENDENCIES) $(EXTRA_pdndrv1_DEPENDENCIES)
@rm -f pdndrv1$(EXEEXT)
$(F77LINK) $(pdndrv1_OBJECTS) $(pdndrv1_LDADD) $(LIBS)
pdndrv3$(EXEEXT): $(pdndrv3_OBJECTS) $(pdndrv3_DEPENDENCIES) $(EXTRA_pdndrv3_DEPENDENCIES)
@rm -f pdndrv3$(EXEEXT)
$(F77LINK) $(pdndrv3_OBJECTS) $(pdndrv3_LDADD) $(LIBS)
pdsdrv1$(EXEEXT): $(pdsdrv1_OBJECTS) $(pdsdrv1_DEPENDENCIES) $(EXTRA_pdsdrv1_DEPENDENCIES)
@rm -f pdsdrv1$(EXEEXT)
$(F77LINK) $(pdsdrv1_OBJECTS) $(pdsdrv1_LDADD) $(LIBS)
psndrv3$(EXEEXT): $(psndrv3_OBJECTS) $(psndrv3_DEPENDENCIES) $(EXTRA_psndrv3_DEPENDENCIES)
@rm -f psndrv3$(EXEEXT)
$(F77LINK) $(psndrv3_OBJECTS) $(psndrv3_LDADD) $(LIBS)
pssdrv1$(EXEEXT): $(pssdrv1_OBJECTS) $(pssdrv1_DEPENDENCIES) $(EXTRA_pssdrv1_DEPENDENCIES)
@rm -f pssdrv1$(EXEEXT)
$(F77LINK) $(pssdrv1_OBJECTS) $(pssdrv1_LDADD) $(LIBS)
pzndrv1$(EXEEXT): $(pzndrv1_OBJECTS) $(pzndrv1_DEPENDENCIES) $(EXTRA_pzndrv1_DEPENDENCIES)
@rm -f pzndrv1$(EXEEXT)
$(F77LINK) $(pzndrv1_OBJECTS) $(pzndrv1_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.f.o:
$(F77COMPILE) -c -o $@ $<
.f.obj:
$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.f.lo:
$(LTF77COMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-83
View File
@@ -1,83 +0,0 @@
#
# makefile to run simple examples of the reverse communication
# protocol.
#
# Modify if ARPACK library was built somewhere else.
# We assume that the required BLAS and LAPACK routines
# are in the version of libarpack.a built. If not, you
# will need to modify the link step below and link to them.
#
#
include ../../../ARmake.inc
# Issue "make nonsym" to make all nonsymmetric drivers.
# Issue "make psndrv" to make single precision nonsymmetric drivers.
# Issue "make pdndrv" to make double precision nonsymmetric drivers.
#
nonsym: psndrv pdndrv
#
# Issue "make sym" to make all symmetric drivers
# Issue "make pssdrv" to make single precision symmetric drivers
# Issue "make pdsdrv" to make double precision symmetric drivers
#
sym: pssdrv pdsdrv
#
# Issue "complex" to make all complex drivers.
# Issue "pcndrv" to make single precision complex drivers.
# Issue "pzndrv" to make double precision complex drivers.
#
complex: pcndrv pzndrv
#
#-----------------------------------------------------------------------
# Simple nonsymmetric problem using single precision
#
psndrv: psndrv1 psndrv3
psndrv1: psndrv1.o
$(PFC) $(PFFLAGS) psndrv1.o $(PLIBS) -o psndrv1_$(PLAT)
#
psndrv3: psndrv3.o
$(PFC) $(PFFLAGS) psndrv3.o $(PLIBS) -o psndrv3_$(PLAT)
#
#------------------------------------------------------
# Simple nonsymmetric problem using double precision
#
pdndrv: pdndrv1 pdndrv3
pdndrv1: pdndrv1.o
$(PFC) $(PFFLAGS) pdndrv1.o $(PLIBS) -o pdndrv1_$(PLAT)
#
pdndrv3: pdndrv3.o
$(PFC) $(PFFLAGS) pdndrv3.o $(PLIBS) -o pdndrv3_$(PLAT)
#
#-----------------------------------------------------------------------
# Simple symmetric problem using single precision
#
pssdrv: pssdrv1
pssdrv1: pssdrv1.o
$(PFC) $(PFFLAGS) pssdrv1.o $(PLIBS) -o pssdrv1_$(PLAT)
#
#------------------------------------------------------
# Simple symmetric problem using double precision
#
pdsdrv: pdsdrv1
pdsdrv1: pdsdrv1.o
$(PFC) $(PFFLAGS) pdsdrv1.o $(PLIBS) -o pdsdrv1_$(PLAT)
#-----------------------------------------------------------------------
# Complex problem using single complex
#
pcndrv: pcndrv1
pcndrv1: pcndrv1.o
$(PFC) $(PFFLAGS) pcndrv1.o $(PLIBS) -o pcndrv1_$(PLAT)
#
#----------------------------------------------------------------------
# Complex problem using double complex
#
pzndrv: pzndrv1
pzndrv1: pzndrv1.o
$(PFC) $(PFFLAGS) pzndrv1.o $(PLIBS) -o pzndrv1_$(PLAT)
-130
View File
@@ -1,130 +0,0 @@
C/*
C *
C * (C) 1993 by Argonne National Laboratory and Mississipi State University.
C * All rights reserved. See COPYRIGHT in top-level directory.
C */
C
C/* user include file for MPI programs, with no dependencies */
C
C/* return codes */
integer MPI_SUCCESS,MPI_ERR_EXHAUSTED,MPI_ERR_TAG,
$ MPI_ERR_COMM_NULL,MPI_ERR_COMM_INTER,MPI_ERR_COMM_INTRA,
$ MPI_ERR_ARG,MPI_ERR_BUFFER,MPI_ERR_COUNT,MPI_ERR_TYPE,
$ MPI_ERR_ROOT,MPI_ERR_OP,MPI_ERR_ERRORCODE,
$ MPI_ERR_GROUP,MPI_ERR_RANK,MPI_ERR_TOPOLOGY,
$ MPI_ERR_DIMS,MPI_ERR_NULL,MPI_ERR_UNKNOWN,
$ MPI_ERR_REQUEST,MPI_ERR_LIMIT,MPI_ERR_INTERN,
$ MPI_ERR_NOMATCH,MPI_ERR_TRUNCATE,MPI_ERR_BAD_ARGS,
$ MPI_ERR_INIT,MPI_ERR_PERM_KEY,MPI_ERR_BUFFER_EXISTS,
$ MPI_ERR_COMM,MPI_ERR_PERM_TYPE,MPI_ERR_IN_STATUS,
$ MPI_ERR_OTHER,MPI_ERR_LASTCODE
parameter (MPI_SUCCESS=0,MPI_ERR_EXHAUSTED=1,MPI_ERR_TAG=2,
$ MPI_ERR_COMM_NULL=3,MPI_ERR_COMM_INTER=4,MPI_ERR_COMM_INTRA=5,
$ MPI_ERR_ARG=6,MPI_ERR_BUFFER=7,MPI_ERR_COUNT=8,MPI_ERR_TYPE=9,
$ MPI_ERR_ROOT=10,MPI_ERR_OP=11,MPI_ERR_ERRORCODE=12,
$ MPI_ERR_GROUP=13,MPI_ERR_RANK=14,MPI_ERR_TOPOLOGY=15,
$ MPI_ERR_DIMS=16,MPI_ERR_NULL=17,MPI_ERR_UNKNOWN=18,
$ MPI_ERR_REQUEST=19,MPI_ERR_LIMIT=20,MPI_ERR_INTERN=21,
$ MPI_ERR_NOMATCH=22,MPI_ERR_TRUNCATE=23,MPI_ERR_BAD_ARGS=24,
$ MPI_ERR_INIT=25,MPI_ERR_PERM_KEY=26,MPI_ERR_BUFFER_EXISTS=27,
$ MPI_ERR_COMM=28,MPI_ERR_PERM_TYPE=29,MPI_ERR_IN_STATUS=30,
$ MPI_ERR_OTHER=31,
$ MPI_ERR_LASTCODE=32)
C
integer MPI_UNDEFINED
parameter (MPI_UNDEFINED = (-32766))
C
INTEGER MPI_GRAPH, MPI_CART
PARAMETER (MPI_GRAPH = 1, MPI_CART = 2)
INTEGER MPI_PROC_NULL
PARAMETER ( MPI_PROC_NULL = (-1) )
C
INTEGER MPI_BSEND_OVERHEAD
PARAMETER ( MPI_BSEND_OVERHEAD = 512 )
INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
PARAMETER(MPI_SOURCE=2, MPI_TAG=3, MPI_ERROR=4)
INTEGER MPI_STATUS_SIZE
PARAMETER (MPI_STATUS_SIZE=4)
INTEGER MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING
PARAMETER (MPI_MAX_PROCESSOR_NAME=256,
$ MPI_MAX_ERROR_STRING=256)
C
INTEGER MPI_COMM_NULL
PARAMETER (MPI_COMM_NULL=0)
c
INTEGER MPI_DATATYPE_NULL
PARAMETER (MPI_DATATYPE_NULL = 0)
INTEGER MPI_ERRHANDLER_NULL
PARAMETER (MPI_ERRHANDLER_NULL = 0)
INTEGER MPI_GROUP_NULL
PARAMETER (MPI_GROUP_NULL = 0)
INTEGER MPI_KEYVAL_INVALID
PARAMETER (MPI_KEYVAL_INVALID = 0)
INTEGER MPI_REQUEST_NULL
PARAMETER (MPI_REQUEST_NULL = 0)
C
INTEGER MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL
PARAMETER (MPI_IDENT=0, MPI_CONGRUENT=1, MPI_SIMILAR=2,
$ MPI_UNEQUAL=3)
C
C We handle datatypes by putting the variables that hold them into
C common. This way, a Fortran program can directly use the various
C datatypes and can even give them to C programs.
C
C MPI_BOTTOM needs to be a known address; here we put it at the
C beginning of the common block. The point-to-point and collective
C routines know about MPI_BOTTOM, but MPI_TYPE_STRUCT as yet does not.
C
C The types MPI_INTEGER1,2,4 and MPI_REAL4,8 are OPTIONAL.
C Their values are zero if they are not available. Note that
C using these reduces the portability of code (though may enhance
C portability between Crays and other systems)
C
integer MPI_TAG_UB, MPI_HOST, MPI_IO
integer MPI_BOTTOM, MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8, MPI_UB, MPI_LB,
$ MPI_PACKED
integer MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY
integer MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL
integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
common /mpipriv/ MPI_BOTTOM, MPI_INTEGER, MPI_REAL,
$ MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8,
$ MPI_UB, MPI_LB,
$ MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY,
$ MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL,
$ MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_ERRORS_ARE_FATAL,
$ MPI_ERRORS_RETURN, MPI_PACKED
C
integer MPI_ANY_SOURCE
parameter (MPI_ANY_SOURCE = (-2))
integer MPI_ANY_TAG
parameter (MPI_ANY_TAG = (-1))
C
C All other MPI routines are subroutines
double precision MPI_WTIME, MPI_WTICK
external MPI_WTIME, MPI_WTICK
C
C The attribute copy/delete functions are symbols that can be passed
C to MPI routines
external MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN, MPI_DUP_FN
+3 -3
View File
@@ -1,11 +1,11 @@
SUBDIRS = UTIL SRC
SUBDIRS = UTIL SRC . EXAMPLES/MPI
lib_LTLIBRARIES = libparpack.la
libparpack_la_SOURCES =
libparpack_la_SOURCES =
libparpack_la_LDFLAGS = -version-info 2:0
libparpack_la_LIBADD = \
$(top_builddir)/SRC/libarpacksrc.la \
$(top_builddir)/UTIL/libarpackutil.la \
$(top_builddir)/PARPACK/SRC/MPI/libparpacksrcmpi.la \
$(top_builddir)/PARPACK/UTIL/MPI/libparpackutilmpi.la \
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS)
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS) $(MPILIBS)
+26 -15
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -68,6 +68,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
@@ -76,7 +82,7 @@ libparpack_la_DEPENDENCIES = $(top_builddir)/SRC/libarpacksrc.la \
$(top_builddir)/PARPACK/SRC/MPI/libparpacksrcmpi.la \
$(top_builddir)/PARPACK/UTIL/MPI/libparpackutilmpi.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libparpack_la_OBJECTS =
libparpack_la_OBJECTS = $(am_libparpack_la_OBJECTS)
libparpack_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -178,10 +184,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -257,7 +263,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = UTIL SRC
SUBDIRS = UTIL SRC . EXAMPLES/MPI
lib_LTLIBRARIES = libparpack.la
libparpack_la_SOURCES =
libparpack_la_LDFLAGS = -version-info 2:0
@@ -266,12 +272,12 @@ libparpack_la_LIBADD = \
$(top_builddir)/UTIL/libarpackutil.la \
$(top_builddir)/PARPACK/SRC/MPI/libparpacksrcmpi.la \
$(top_builddir)/PARPACK/UTIL/MPI/libparpackutilmpi.la \
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS)
$(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS) $(MPILIBS)
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -296,9 +302,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@@ -332,7 +338,7 @@ clean-libLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libparpack.la: $(libparpack_la_OBJECTS) $(libparpack_la_DEPENDENCIES)
libparpack.la: $(libparpack_la_OBJECTS) $(libparpack_la_DEPENDENCIES) $(EXTRA_libparpack_la_DEPENDENCIES)
$(libparpack_la_LINK) -rpath $(libdir) $(libparpack_la_OBJECTS) $(libparpack_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -558,10 +564,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
+37 -2
View File
@@ -127,7 +127,7 @@ c\Revision history:
c Starting Point: Serial Complex Code FILE: napps.F SID: 2.1
c
c\SCCS Information:
c FILE: napps.F SID: 1.3 DATE OF SID: 06/04/98
c FILE: napps.F SID: 1.4 DATE OF SID: 10/25/03
c
c\Remarks
c 1. In this version, each shift is applied to all the sublocks of
@@ -243,7 +243,7 @@ c | overflow should not occur. |
c | REFERENCE: LAPACK subroutine clahqr |
c %-----------------------------------------------%
c
unfl = slamch( 'safe minimum' )
unfl = pslamch( 'safe minimum' )
ovfl = real(one / unfl)
call slabad( unfl, ovfl )
ulp = slamch( 'precision' )
@@ -282,6 +282,13 @@ c %----------------------------------------------%
c
do 110 jj = 1, np
sigma = shift(jj)
c
if (msglvl .gt. 2 ) then
call pivout (comm, logfil, 1, jj, ndigit,
& '_napps: shift number.')
call pcvout (comm, logfil, 1, sigma, ndigit,
& '_napps: Value of the shift ')
end if
c
istart = 1
20 continue
@@ -299,6 +306,14 @@ c
& tst1 = clanhs( '1', kplusp-jj+1, h, ldh, workl )
if ( abs(real(h(i+1,i)))
& .le. max(ulp*tst1, smlnum) ) then
if (msglvl .gt. 0) then
call pivout (comm, logfil, 1, i, ndigit,
& '_napps: matrix splitting at row/column no.')
call pivout (comm, logfil, 1, jj, ndigit,
& '_napps: matrix splitting with shift number.')
call pcvout (comm, logfil, 1, h(i+1,i), ndigit,
& '_napps: off diagonal element.')
end if
iend = i
h(i+1,i) = zero
go to 40
@@ -307,6 +322,12 @@ c
iend = kplusp
40 continue
c
if (msglvl .gt. 2) then
call pivout (comm, logfil, 1, istart, ndigit,
& '_napps: Start of current block ')
call pivout (comm, logfil, 1, iend, ndigit,
& '_napps: End of current block ')
end if
c
c %------------------------------------------------%
c | No reason to apply a shift to block of order 1 |
@@ -474,6 +495,20 @@ c
call cscal (n, q(kplusp,kev), resid, 1)
if ( real( h(kev+1,kev) ) .gt. rzero )
& call caxpy (n, h(kev+1,kev), v(1,kev+1), 1, resid, 1)
c
if (msglvl .gt. 1) then
call pcvout (comm, logfil, 1, q(kplusp,kev), ndigit,
& '_napps: sigmak = (e_{kev+p}^T*Q)*e_{kev}')
call pcvout (comm, logfil, 1, h(kev+1,kev), ndigit,
& '_napps: betak = e_{kev+1}^T*H*e_{kev}')
call pivout (comm, logfil, 1, kev, ndigit,
& '_napps: Order of the final Hessenberg matrix ')
if (msglvl .gt. 2) then
call pcmout (comm, logfil, kev, kev, h, ldh, ndigit,
& '_napps: updated Hessenberg matrix H for next iteration')
end if
c
end if
c
9000 continue
call second (t1)
+29 -30
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: pcnaup2
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c Intermediate level interface called by pcnaupd.
@@ -39,7 +39,7 @@ c IUPD Integer. (INPUT)
c IUPD .EQ. 0: use explicit restart instead implicit update.
c IUPD .NE. 0: use implicit update.
c
c V Complex N by (NEV+NP) array. (INPUT/OUTPUT)
c V Complex N by (NEV+NP) array. (INPUT/OUTPUT)
c The Arnoldi basis vectors are returned in the first NEV
c columns of V.
c
@@ -47,21 +47,21 @@ c LDV Integer. (INPUT)
c Leading dimension of V exactly as declared in the calling
c program.
c
c H Complex (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H Complex (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H is used to store the generated upper Hessenberg matrix
c
c LDH Integer. (INPUT)
c Leading dimension of H exactly as declared in the calling
c program.
c
c RITZ Complex array of length NEV+NP. (OUTPUT)
c RITZ Complex array of length NEV+NP. (OUTPUT)
c RITZ(1:NEV) contains the computed Ritz values of OP.
c
c BOUNDS Complex array of length NEV+NP. (OUTPUT)
c BOUNDS Complex array of length NEV+NP. (OUTPUT)
c BOUNDS(1:NEV) contain the error bounds corresponding to
c the computed Ritz values.
c
c Q Complex (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Q Complex (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Private (replicated) work array used to accumulate the
c rotation in the shift application step.
c
@@ -69,7 +69,7 @@ c LDQ Integer. (INPUT)
c Leading dimension of Q exactly as declared in the calling
c program.
c
c WORKL Complex work array of length at least
c WORKL Complex work array of length at least
c (NEV+NP)**2 + 3*(NEV+NP). (WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end. It is used in shifts calculation, shifts
@@ -86,13 +86,13 @@ c IPNTR(3): pointer to the vector B * X when used in the
c shift-and-invert mode. X is the current operand.
c -------------------------------------------------------------
c
c WORKD Complex work array of length 3*N. (WORKSPACE)
c WORKD Complex work array of length 3*N. (WORKSPACE)
c Distributed array to be used in the basic Arnoldi iteration
c for reverse communication. The user should not use WORKD
c as temporary workspace during the iteration !!!!!!!!!!
c See Data Distribution Note in PCNAUPD.
c
c RWORK Real work array of length NEV+NP ( WORKSPACE)
c RWORK Real work array of length NEV+NP ( WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end.
c
@@ -119,7 +119,7 @@ c
c\BeginLib
c
c\Local variables:
c xxxxxx Complex
c xxxxxx Complex
c
c\References:
c 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in
@@ -156,7 +156,7 @@ c Applied Mathematics
c Rice University
c Houston, Texas
c
c FILE: naup2.F SID: 1.6 DATE OF SID: 06/01/00 RELEASE: 1
c FILE: naup2.F SID: 1.7 DATE OF SID: 10/25/03 RELEASE: 1
c
c\Remarks
c 1. None
@@ -192,7 +192,7 @@ c
character bmat*1, which*2
integer ido, info, ishift, iupd, mode, ldh, ldq, ldv, mxiter,
& n, nev, np
Real
Real
& tol
c
c %-----------------%
@@ -200,23 +200,23 @@ c | Array Arguments |
c %-----------------%
c
integer ipntr(13)
Complex
Complex
& bounds(nev+np), h(ldh,nev+np), q(ldq,nev+np),
& resid(n), ritz(nev+np), v(ldv,nev+np),
& workd(3*n), workl( (nev+np)*(nev+np+3) )
Real
Real
& rwork(nev+np)
c
c %------------%
c | Parameters |
c %------------%
c
Complex
Complex
& one, zero
Real
Real
& rzero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) ,
& rzero = 0.0 )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0),
& rzero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -226,9 +226,9 @@ c
integer ierr , iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0 , nptemp, i ,
& j
Complex
Complex
& cmpnorm
Real
Real
& rnorm, eps23, rtemp
character wprime*2
c
@@ -236,7 +236,6 @@ c
& rnorm, iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0, eps23
c
c %-----------------------%
c | Local array arguments |
c %-----------------------%
@@ -254,9 +253,9 @@ c %--------------------%
c | External functions |
c %--------------------%
c
Complex
Complex
& cdotc
Real
Real
& pscnorm2, pslamch, slapy2
external cdotc, pscnorm2, pslamch, slapy2
c
@@ -264,7 +263,7 @@ c %---------------------%
c | Intrinsic Functions |
c %---------------------%
c
intrinsic aimag, real , min, max, sqrt
intrinsic aimag, real, min, max, sqrt
c
c %-----------------------%
c | Executable Statements |
@@ -297,7 +296,7 @@ c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | Set flags for computing the first NEV |
@@ -500,9 +499,9 @@ c
nconv = 0
c
do 25 i = 1, nev
rtemp = max( eps23, slapy2( real (ritz(np+i)),
rtemp = max( eps23, slapy2( real(ritz(np+i)),
& aimag(ritz(np+i)) ) )
if ( slapy2(real (bounds(np+i)),aimag(bounds(np+i)))
if ( slapy2(real(bounds(np+i)),aimag(bounds(np+i)))
& .le. tol*rtemp ) then
nconv = nconv + 1
end if
@@ -587,7 +586,7 @@ c | by 1 / max(eps23, magnitude of the Ritz value). |
c %--------------------------------------------------%
c
do 35 j = 1, nev0
rtemp = max( eps23, slapy2( real (ritz(j)),
rtemp = max( eps23, slapy2( real(ritz(j)),
& aimag(ritz(j)) ) )
bounds(j) = bounds(j)/rtemp
35 continue
@@ -608,7 +607,7 @@ c | value. |
c %----------------------------------------------%
c
do 40 j = 1, nev0
rtemp = max( eps23, slapy2( real (ritz(j)),
rtemp = max( eps23, slapy2( real(ritz(j)),
& aimag(ritz(j)) ) )
bounds(j) = bounds(j)*rtemp
40 continue
@@ -770,7 +769,7 @@ c
if (bmat .eq. 'G') then
cmpnorm = cdotc (n, resid, 1, workd, 1)
call cgsum2d( comm, 'All', ' ', 1, 1, cmpnorm, 1, -1, -1 )
rnorm = sqrt(slapy2(real (cmpnorm),aimag(cmpnorm)))
rnorm = sqrt(slapy2(real(cmpnorm),aimag(cmpnorm)))
else if (bmat .eq. 'I') then
rnorm = pscnorm2(comm, n, resid, 1)
end if
+27 -27
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: pcneupd
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c This subroutine returns the converged approximations to eigenvalues
@@ -42,7 +42,7 @@ c N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD,
c WORKL, LWORKL, RWORK, INFO )
c
c\Arguments
c COMM BLACS Communicator for the processor grid. (INPUT)
c COMM BLACS Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether a basis for the invariant subspace corresponding
@@ -70,11 +70,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex array of dimension NEV+1. (OUTPUT)
c D Complex array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex N by NEV array (OUTPUT)
c Z Complex N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -92,11 +92,11 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex (INPUT)
c SIGMA Complex (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PCNAUPD that was just completed. ****
@@ -112,7 +112,7 @@ c the the last call to PCNAUPD and the call to CNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex N by NCV array. (INPUT/OUTPUT)
c V Complex N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by PCNAUPD .
@@ -128,7 +128,7 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c PCNAUPD. They are not changed by PCNEUPD.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
@@ -249,7 +249,7 @@ c\Revision history:
c Starting Point: Complex Serial Code FILE: neupd.F SID: 2.2
c
c\SCCS Information:
c FILE: neupd.F SID: 1.6 DATE OF SID: 04/10/01
c FILE: neupd.F SID: 1.9 DATE OF SID: 10/25/03
c
c\EndLib
c
@@ -262,7 +262,7 @@ c-----------------------------------------------------------------------
& workd, workl , lworkl, rwork , info )
c
c %--------------------%
c | BLACS Communicator |
c | BLACS Communicator |
c %--------------------%
c
integer comm
@@ -281,9 +281,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex
Complex
& sigma
Real
Real
& tol
c
c %-----------------%
@@ -292,9 +292,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Real
Real
& rwork(ncv)
Complex
Complex
& d(nev) , resid(n) , v(ldv,ncv) ,
& z(ldz, nev), workd(3*n), workl(lworkl),
& workev(2*ncv)
@@ -303,9 +303,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex
Complex
& one, zero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0))
c
c %---------------%
c | Local Scalars |
@@ -317,9 +317,9 @@ c
& mode , msglvl, ritz , wr , k , irz ,
& ibd , outncv, iq , np , numcnv, jj ,
& ishift
Complex
Complex
& rnorm, temp, vl(1)
Real
Real
& conds, sep, rtemp, eps23
logical reord
c
@@ -335,11 +335,11 @@ c %--------------------%
c | External Functions |
c %--------------------%
c
Real
Real
& scnrm2,pslamch,slapy2
external scnrm2,pslamch,slapy2
c
Complex
Complex
& cdotc
external cdotc
c
@@ -368,7 +368,7 @@ c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %-------------------------------%
c | Quick return |
@@ -518,9 +518,9 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call cngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
call pcngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
c
if (msglvl .gt. 2) then
call pcvout(comm,logfil, ncv, workl(irz), ndigit,
@@ -686,8 +686,8 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( real ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real (zero) ) then
if ( real( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real(zero) ) then
call cscal(nconv, -one, workl(iuptri+j-1), ldq)
call cscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
@@ -730,7 +730,7 @@ c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = scnrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = real (one) / rtemp
rtemp = real(one) / rtemp
call csscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
+93 -93
View File
@@ -1,8 +1,8 @@
c\BeginDoc
c
c\Name: pdseupd
c\Name: pdseupd
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c
@@ -41,12 +41,12 @@ c There is also the option of computing a selected set of these vectors
c with a single call.
c
c\Usage:
c call pdseupd
c call pdseupd
c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, BMAT, N, WHICH, NEV, TOL,
c RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO )
c
c\Arguments
c COMM BLACS Communicator for the processor grid. (INPUT)
c COMM BLACS Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether Ritz vectors corresponding to the Ritz value
@@ -69,16 +69,16 @@ c computed. To select the Ritz vector corresponding to a
c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' , SELECT is used as workspace.
c
c D Double precision array of dimension NEV. (OUTPUT)
c D Double precision array of dimension NEV. (OUTPUT)
c On exit, D contains the Ritz value approximations to the
c eigenvalues of A*z = lambda*B*z. The values are returned
c in ascending order. If IPARAM(7) = 3,4,5 then D represents
c the Ritz values of OP computed by pdsaupd transformed to
c the Ritz values of OP computed by pdsaupd transformed to
c those of the original eigensystem A*z = lambda*B*z. If
c IPARAM(7) = 1,2 then the Ritz values of OP are the same
c as the those of A*z = lambda*B*z.
c
c Z Double precision N by NEV array if HOWMNY = 'A'. (OUTPUT)
c Z Double precision N by NEV array if HOWMNY = 'A'. (OUTPUT)
c On exit, Z contains the B-orthonormal Ritz vectors of the
c eigensystem A*z = lambda*B*z corresponding to the Ritz
c value approximations.
@@ -90,13 +90,13 @@ c LDZ Integer. (INPUT)
c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ). In any case, LDZ .ge. 1.
c
c SIGMA Double precision (INPUT)
c SIGMA Double precision (INPUT)
c If IPARAM(7) = 3,4,5 represents the shift. Not referenced if
c IPARAM(7) = 1 or 2.
c
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PDNAUPD that was just completed. ****
c **** call to PDNAUPD that was just completed. ****
c
c NOTE: The remaining arguments
c
@@ -109,7 +109,7 @@ c the the last call to PSSAUPD and the call to PSSEUPD.
c
c Two of these parameters (WORKL, INFO) are also output parameters:
c
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:4*ncv) contains information obtained in
c PSSAUPD. They are not changed by PSSEUPD.
c WORKL(4*ncv+1:ncv*ncv+8*ncv) holds the
@@ -136,7 +136,7 @@ c = -5: WHICH must be one of 'LM', 'SM', 'LA', 'SA' or 'BE'.
c = -6: BMAT must be one of 'I' or 'G'.
c = -7: Length of private work WORKL array is not sufficient.
c = -8: Error return from trid. eigenvalue calculation;
c Information error from LAPACK routine dsteqr .
c Information error from LAPACK routine dsteqr.
c = -9: Starting vector is zero.
c = -10: IPARAM(7) must be 1,2,3,4,5.
c = -11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.
@@ -145,11 +145,11 @@ c = -14: PSSAUPD did not find any eigenvalues to sufficient
c accuracy.
c = -15: HOWMNY must be one of 'A' or 'S' if RVEC = .true.
c = -16: HOWMNY = 'S' not yet implemented
c = -17: DSEUPD got a different count of the number of converged
c Ritz values than DSAUPD got. This indicates the user
c probably made an error in passing data from DSAUPD to
c DSEUPD or that the data was modified before entering
c DSEUPD .
c = -17: DSEUPD got a different count of the number of converged
c Ritz values than DSAUPD got. This indicates the user
c probably made an error in passing data from DSAUPD to
c DSEUPD or that the data was modified before entering
c DSEUPD.
c
c\BeginLib
c
@@ -182,24 +182,24 @@ c 2. Currently only HOWMNY = 'A' is implemented. It is included at this
c stage for the user who wants to incorporate it.
c
c\Routines called:
c dsesrt ARPACK routine that sorts an array X, and applies the
c dsesrt ARPACK routine that sorts an array X, and applies the
c corresponding permutation to a matrix A.
c dsortr dsortr ARPACK sorting routine.
c pdnorm2 Parallel ARPACK routine that computes the 2-norm of a vector.
c dsortr dsortr ARPACK sorting routine.
c pdnorm2 Parallel ARPACK routine that computes the 2-norm of a vector.
c pivout Parallel ARPACK utility routine that prints integers.
c pdvout Parallel ARPACK utility routine that prints vectors.
c dgeqr2 LAPACK routine that computes the QR factorization of
c pdvout Parallel ARPACK utility routine that prints vectors.
c dgeqr2 LAPACK routine that computes the QR factorization of
c a matrix.
c dlacpy LAPACK matrix copy routine.
c pdlamch ScaLAPACK routine that determines machine constants.
c dorm2r LAPACK routine that applies an orthogonal matrix in
c dlacpy LAPACK matrix copy routine.
c pdlamch ScaLAPACK routine that determines machine constants.
c dorm2r LAPACK routine that applies an orthogonal matrix in
c factored form.
c dsteqr LAPACK routine that computes eigenvalues and eigenvectors
c dsteqr LAPACK routine that computes eigenvalues and eigenvectors
c of a tridiagonal matrix.
c dger Level 2 BLAS rank one update to a matrix.
c dcopy Level 1 BLAS that copies one vector to another .
c dscal Level 1 BLAS that scales a vector.
c dswap Level 1 BLAS that swaps the contents of two vectors.
c dger Level 2 BLAS rank one update to a matrix.
c dcopy Level 1 BLAS that copies one vector to another .
c dscal Level 1 BLAS that scales a vector.
c dswap Level 1 BLAS that swaps the contents of two vectors.
c\Authors
c Danny Sorensen Phuong Vu
c Richard Lehoucq CRPC / Rice University
@@ -216,12 +216,12 @@ c\Revision history:
c Starting Point: Serial Code FILE: seupd.F SID: 2.4
c
c\SCCS Information:
c FILE: seupd.F SID: 1.10 DATE OF SID: 04/10/01
c FILE: seupd.F SID: 1.11 DATE OF SID: 10/25/03
c
c\EndLib
c
c-----------------------------------------------------------------------
subroutine pdseupd
subroutine pdseupd
& (comm , rvec , howmny, select, d ,
& z , ldz , sigma , bmat , n ,
& which , nev , tol , resid , ncv ,
@@ -229,7 +229,7 @@ c-----------------------------------------------------------------------
& workl , lworkl, info )
c
c %--------------------%
c | BLACS Communicator |
c | BLACS Communicator |
c %--------------------%
c
integer comm
@@ -248,7 +248,7 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Double precision
Double precision
& sigma, tol
c
c %-----------------%
@@ -257,7 +257,7 @@ c %-----------------%
c
integer iparam(7), ipntr(11)
logical select(ncv)
Double precision
Double precision
& d(nev), resid(n), v(ldv,ncv), z(ldz, nev),
& workd(2*n), workl(lworkl)
c
@@ -265,9 +265,9 @@ c %------------%
c | Parameters |
c %------------%
c
Double precision
Double precision
& one, zero
parameter (one = 1.0 , zero = 0.0 )
parameter (one = 1.0, zero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -279,7 +279,7 @@ c
& ldq , mode , msglvl, nconv , next ,
& ritz , irz , ibd , np , ishift,
& leftptr, rghtptr, numcnv, jj
Double precision
Double precision
& bnorm2, rnorm, temp, temp1, eps23
logical reord
c
@@ -287,16 +287,16 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external dcopy , dger , dgeqr2 , dlacpy , dorm2r , dscal ,
& dsesrt , dsteqr , dswap , pdvout , pivout, dsortr
external dcopy , dger , dgeqr2, dlacpy, dorm2r, dscal,
& dsesrt, dsteqr, dswap , pdvout, pivout, dsortr
c
c %--------------------%
c | External Functions |
c %--------------------%
c
Double precision
& pdnorm2 , pdlamch
external pdnorm2 , pdlamch
Double precision
& pdnorm2, pdlamch
external pdnorm2, pdlamch
c
c %---------------------%
c | Intrinsic Functions |
@@ -373,18 +373,18 @@ c | Memory is laid out as follows: |
c | workl(1:2*ncv) := generated tridiagonal matrix H |
c | The subdiagonal is stored in workl(2:ncv). |
c | The dead spot is workl(1) but upon exiting |
c | pdsaupd stores the B-norm of the last residual |
c | pdsaupd stores the B-norm of the last residual |
c | vector in workl(1). We use this !!! |
c | workl(2*ncv+1:2*ncv+ncv) := ritz values |
c | The wanted values are in the first NCONV spots. |
c | workl(3*ncv+1:3*ncv+ncv) := computed Ritz estimates |
c | The wanted values are in the first NCONV spots. |
c | NOTE: workl(1:4*ncv) is set by pdsaupd and is not |
c | modified by pdseupd . |
c | NOTE: workl(1:4*ncv) is set by pdsaupd and is not |
c | modified by pdseupd. |
c %-------------------------------------------------------%
c
c %-------------------------------------------------------%
c | The following is used and set by pdseupd . |
c | The following is used and set by pdseupd. |
c | workl(4*ncv+1:4*ncv+ncv) := used as workspace during |
c | computation of the eigenvectors of H. Stores |
c | the diagonal of H. Upon EXIT contains the NCV |
@@ -400,10 +400,10 @@ c | wanted values. If MODE = 1,2 then will equal |
c | workl(3*ncv+1:4*ncv). |
c | workl(6*ncv+1:6*ncv+ncv*ncv) := orthogonal Q that is |
c | the eigenvector matrix for H as returned by |
c | dsteqr . Not referenced if RVEC = .False. |
c | dsteqr. Not referenced if RVEC = .False. |
c | Ordering follows that of workl(4*ncv+1:5*ncv) |
c | workl(6*ncv+ncv*ncv+1:6*ncv+ncv*ncv+2*ncv) := |
c | Workspace. Needed by dsteqr and by pdseupd . |
c | Workspace. Needed by dsteqr and by pdseupd. |
c | GRAND total of NCV*(NCV+8) locations. |
c %-------------------------------------------------------%
c
@@ -439,13 +439,13 @@ c %---------------------------------%
c | Set machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | RNORM is B-norm of the RESID(1:N). |
c | BNORM2 is the 2 norm of B*RESID(1:N). |
c | Upon exit of pdsaupd WORKD(1:N) has |
c | Upon exit of pdsaupd WORKD(1:N) has |
c | B*RESID(1:N). |
c %---------------------------------------%
c
@@ -453,13 +453,13 @@ c
if (bmat .eq. 'I') then
bnorm2 = rnorm
else if (bmat .eq. 'G') then
bnorm2 = pdnorm2 (comm, n, workd, 1)
bnorm2 = pdnorm2(comm, n, workd, 1)
end if
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(irz), ndigit,
call pdvout(comm, logfil, ncv, workl(irz), ndigit,
& '_seupd: Ritz values passed in from _SAUPD.')
call pdvout (comm, logfil, ncv, workl(ibd), ndigit,
call pdvout(comm, logfil, ncv, workl(ibd), ndigit,
& '_seupd: Ritz estimates passed in from _SAUPD.')
end if
if (rvec) then
@@ -487,14 +487,14 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call pdsgets (comm , ishift, which ,
call pdsgets(comm , ishift, which ,
& nev , np , workl(irz),
& workl(bounds), workl , workl(np+1))
& workl(bounds), workl)
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(irz), ndigit,
call pdvout(comm, logfil, ncv, workl(irz), ndigit,
& '_seupd: Ritz values after calling _SGETS.')
call pdvout (comm, logfil, ncv, workl(bounds), ndigit,
call pdvout(comm, logfil, ncv, workl(bounds), ndigit,
& '_seupd: Ritz value indices after calling _SGETS.')
end if
c
@@ -540,10 +540,10 @@ c | eigenvectors of the final symmetric tridiagonal matrix H. |
c | Initialize the eigenvector matrix Q to the identity. |
c %-----------------------------------------------------------%
c
call dcopy (ncv-1, workl(ih+1) , 1, workl(ihb), 1)
call dcopy (ncv , workl(ih+ldh), 1, workl(ihd), 1)
call dcopy (ncv-1, workl(ih+1) , 1, workl(ihb), 1)
call dcopy (ncv , workl(ih+ldh), 1, workl(ihd), 1)
c
call dsteqr ('Identity', ncv , workl(ihd),
call dsteqr('Identity', ncv , workl(ihd),
& workl(ihb), workl(iq), ldq ,
& workl(iw) , ierr)
c
@@ -553,10 +553,10 @@ c
end if
c
if (msglvl .gt. 1) then
call dcopy (ncv, workl(iq+ncv-1), ldq, workl(iw), 1)
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
call dcopy (ncv, workl(iq+ncv-1), ldq, workl(iw), 1)
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
& '_seupd: NCV Ritz values of the final H matrix')
call pdvout (comm, logfil, ncv, workl(iw), ndigit,
call pdvout (comm, logfil, ncv, workl(iw), ndigit,
& '_seupd: last row of the eigenvector matrix for H')
end if
c
@@ -607,11 +607,11 @@ c
temp = workl(ihd+leftptr-1)
workl(ihd+leftptr-1) = workl(ihd+rghtptr-1)
workl(ihd+rghtptr-1) = temp
call dcopy (ncv, workl(iq+ncv*(leftptr-1)), 1,
call dcopy(ncv, workl(iq+ncv*(leftptr-1)), 1,
& workl(iw), 1)
call dcopy (ncv, workl(iq+ncv*(rghtptr-1)), 1,
call dcopy(ncv, workl(iq+ncv*(rghtptr-1)), 1,
& workl(iq+ncv*(leftptr-1)), 1)
call dcopy (ncv, workl(iw), 1,
call dcopy(ncv, workl(iw), 1,
& workl(iq+ncv*(rghtptr-1)), 1)
leftptr = leftptr + 1
rghtptr = rghtptr - 1
@@ -623,7 +623,7 @@ c
30 end if
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
& '_seupd: The eigenvalues of H--reordered')
end if
c
@@ -631,7 +631,7 @@ c %----------------------------------------%
c | Load the converged Ritz values into D. |
c %----------------------------------------%
c
call dcopy (nconv, workl(ihd), 1, d, 1)
call dcopy(nconv, workl(ihd), 1, d, 1)
c
else
c
@@ -639,8 +639,8 @@ c %-----------------------------------------------------%
c | Ritz vectors not required. Load Ritz values into D. |
c %-----------------------------------------------------%
c
call dcopy (nconv, workl(ritz), 1, d, 1)
call dcopy (ncv, workl(ritz), 1, workl(ihd), 1)
call dcopy(nconv, workl(ritz), 1, d, 1)
call dcopy(ncv, workl(ritz), 1, workl(ihd), 1)
c
end if
c
@@ -658,9 +658,9 @@ c | bounds. Not necessary if only Ritz values are desired. |
c %---------------------------------------------------------%
c
if (rvec) then
call dsesrt ('LA', rvec , nconv, d, ncv, workl(iq), ldq)
call dsesrt('LA', rvec , nconv, d, ncv, workl(iq), ldq)
else
call dcopy (ncv, workl(bounds), 1, workl(ihb), 1)
call dcopy(ncv, workl(bounds), 1, workl(ihb), 1)
end if
c
else
@@ -674,13 +674,13 @@ c | For TYPE = 'BUCKLE' the transformation is |
c | lambda = sigma * theta / ( theta - 1 ) |
c | For TYPE = 'CAYLEY' the transformation is |
c | lambda = sigma * (theta + 1) / (theta - 1 ) |
c | where the theta are the Ritz values returned by pdsaupd . |
c | where the theta are the Ritz values returned by pdsaupd. |
c | NOTES: |
c | *The Ritz vectors are not affected by the transformation. |
c | They are only reordered. |
c %-------------------------------------------------------------%
c
call dcopy (ncv, workl(ihd), 1, workl(iw), 1)
call dcopy (ncv, workl(ihd), 1, workl(iw), 1)
if (type .eq. 'SHIFTI') then
do 40 k=1, ncv
workl(ihd+k-1) = one / workl(ihd+k-1) + sigma
@@ -712,14 +712,14 @@ c | match the ordering of the lambda. We`ll use them again for |
c | Ritz vector purification. |
c %-------------------------------------------------------------%
c
call dcopy (nconv, workl(ihd), 1, d, 1)
call dsortr ('LA', .true., nconv, workl(ihd), workl(iw))
call dcopy (nconv, workl(ihd), 1, d, 1)
call dsortr('LA', .true., nconv, workl(ihd), workl(iw))
if (rvec) then
call dsesrt ('LA', rvec , nconv, d, ncv, workl(iq), ldq)
call dsesrt('LA', rvec , nconv, d, ncv, workl(iq), ldq)
else
call dcopy (ncv, workl(bounds), 1, workl(ihb), 1)
call dscal (ncv, bnorm2/rnorm, workl(ihb), 1)
call dsortr ('LA', .true., nconv, d, workl(ihb))
call dcopy(ncv, workl(bounds), 1, workl(ihb), 1)
call dscal(ncv, bnorm2/rnorm, workl(ihb), 1)
call dsortr('LA', .true., nconv, d, workl(ihb))
end if
c
end if
@@ -738,7 +738,7 @@ c | the wanted invariant subspace located in the first NCONV |
c | columns of workl(iq,ldq). |
c %----------------------------------------------------------%
c
call dgeqr2 (ncv, nconv , workl(iq) ,
call dgeqr2(ncv, nconv , workl(iq) ,
& ldq, workl(iw+ncv), workl(ihb),
& ierr)
c
@@ -750,11 +750,11 @@ c | of the approximate invariant subspace associated with |
c | the Ritz values in workl(ihd). |
c %--------------------------------------------------------%
c
call dorm2r ('Right' , 'Notranspose', n ,
call dorm2r('Right' , 'Notranspose', n ,
& ncv , nconv , workl(iq),
& ldq , workl(iw+ncv), v ,
& ldv , workd(n+1) , ierr )
call dlacpy ('All', n, nconv, v, ldv, z, ldz)
call dlacpy('All', n, nconv, v, ldv, z, ldz)
c
c %-----------------------------------------------------%
c | In order to compute the Ritz estimates for the Ritz |
@@ -766,7 +766,7 @@ c
workl(ihb+j-1) = zero
65 continue
workl(ihb+ncv-1) = one
call dorm2r ('Left', 'Transpose' , ncv ,
call dorm2r('Left', 'Transpose' , ncv ,
& 1 , nconv , workl(iq) ,
& ldq , workl(iw+ncv), workl(ihb),
& ncv , temp , ierr )
@@ -790,11 +790,11 @@ c | * Determine Ritz estimates of the theta. |
c | If RVEC = .true. then compute Ritz estimates |
c | of the theta. |
c | If RVEC = .false. then copy Ritz estimates |
c | as computed by pdsaupd . |
c | as computed by pdsaupd. |
c | * Determine Ritz estimates of the lambda. |
c %-------------------------------------------------%
c
call dscal (ncv, bnorm2, workl(ihb), 1)
call dscal (ncv, bnorm2, workl(ihb), 1)
if (type .eq. 'SHIFTI') then
c
do 80 k=1, ncv
@@ -821,14 +821,14 @@ c
end if
c
if (type .ne. 'REGULR' .and. msglvl .gt. 1) then
call pdvout (comm, logfil, nconv, d, ndigit,
call pdvout (comm, logfil, nconv, d, ndigit,
& '_seupd: Untransformed converged Ritz values')
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
& '_seupd: Ritz estimates of the untransformed Ritz values')
else if (msglvl .gt. 1) then
call pdvout (comm, logfil, nconv, d, ndigit,
call pdvout (comm, logfil, nconv, d, ndigit,
& '_seupd: Converged Ritz values')
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
& '_seupd: Associated Ritz estimates')
end if
c
@@ -855,14 +855,14 @@ c
end if
c
if (type .ne. 'REGULR')
& call dger (n, nconv, one, resid, 1, workl(iw), 1, z, ldz)
& call dger(n, nconv, one, resid, 1, workl(iw), 1, z, ldz)
c
9000 continue
c
return
c
c %----------------%
c | End of pdseupd |
c | End of pdseupd |
c %----------------%
c
end
+16 -16
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: psseupd
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c
@@ -46,7 +46,7 @@ c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, BMAT, N, WHICH, NEV, TOL,
c RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO )
c
c\Arguments
c COMM BLACS Communicator for the processor grid. (INPUT)
c COMM BLACS Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether Ritz vectors corresponding to the Ritz value
@@ -69,7 +69,7 @@ c computed. To select the Ritz vector corresponding to a
c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' , SELECT is used as workspace.
c
c D Real array of dimension NEV. (OUTPUT)
c D Real array of dimension NEV. (OUTPUT)
c On exit, D contains the Ritz value approximations to the
c eigenvalues of A*z = lambda*B*z. The values are returned
c in ascending order. If IPARAM(7) = 3,4,5 then D represents
@@ -78,7 +78,7 @@ c those of the original eigensystem A*z = lambda*B*z. If
c IPARAM(7) = 1,2 then the Ritz values of OP are the same
c as the those of A*z = lambda*B*z.
c
c Z Real N by NEV array if HOWMNY = 'A'. (OUTPUT)
c Z Real N by NEV array if HOWMNY = 'A'. (OUTPUT)
c On exit, Z contains the B-orthonormal Ritz vectors of the
c eigensystem A*z = lambda*B*z corresponding to the Ritz
c value approximations.
@@ -90,7 +90,7 @@ c LDZ Integer. (INPUT)
c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ). In any case, LDZ .ge. 1.
c
c SIGMA Real (INPUT)
c SIGMA Real (INPUT)
c If IPARAM(7) = 3,4,5 represents the shift. Not referenced if
c IPARAM(7) = 1 or 2.
c
@@ -109,7 +109,7 @@ c the the last call to PSSAUPD and the call to PSSEUPD.
c
c Two of these parameters (WORKL, INFO) are also output parameters:
c
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:4*ncv) contains information obtained in
c PSSAUPD. They are not changed by PSSEUPD.
c WORKL(4*ncv+1:ncv*ncv+8*ncv) holds the
@@ -216,7 +216,7 @@ c\Revision history:
c Starting Point: Serial Code FILE: seupd.F SID: 2.4
c
c\SCCS Information:
c FILE: seupd.F SID: 1.10 DATE OF SID: 04/10/01
c FILE: seupd.F SID: 1.11 DATE OF SID: 10/25/03
c
c\EndLib
c
@@ -229,7 +229,7 @@ c-----------------------------------------------------------------------
& workl , lworkl, info )
c
c %--------------------%
c | BLACS Communicator |
c | BLACS Communicator |
c %--------------------%
c
integer comm
@@ -248,7 +248,7 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Real
Real
& sigma, tol
c
c %-----------------%
@@ -257,7 +257,7 @@ c %-----------------%
c
integer iparam(7), ipntr(11)
logical select(ncv)
Real
Real
& d(nev), resid(n), v(ldv,ncv), z(ldz, nev),
& workd(2*n), workl(lworkl)
c
@@ -265,9 +265,9 @@ c %------------%
c | Parameters |
c %------------%
c
Real
Real
& one, zero
parameter (one = 1.0 , zero = 0.0 )
parameter (one = 1.0, zero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -279,7 +279,7 @@ c
& ldq , mode , msglvl, nconv , next ,
& ritz , irz , ibd , np , ishift,
& leftptr, rghtptr, numcnv, jj
Real
Real
& bnorm2, rnorm, temp, temp1, eps23
logical reord
c
@@ -294,7 +294,7 @@ c %--------------------%
c | External Functions |
c %--------------------%
c
Real
Real
& psnorm2, pslamch
external psnorm2, pslamch
c
@@ -440,7 +440,7 @@ c | Set machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | RNORM is B-norm of the RESID(1:N). |
@@ -489,7 +489,7 @@ c
ishift = 0
call pssgets(comm , ishift, which ,
& nev , np , workl(irz),
& workl(bounds), workl , workl(np+1))
& workl(bounds), workl)
c
if (msglvl .gt. 2) then
call psvout(comm, logfil, ncv, workl(irz), ndigit,
+37 -2
View File
@@ -127,7 +127,7 @@ c\Revision history:
c Starting Point: Serial Complex Code FILE: napps.F SID: 2.1
c
c\SCCS Information:
c FILE: napps.F SID: 1.3 DATE OF SID: 06/04/98
c FILE: napps.F SID: 1.4 DATE OF SID: 10/25/03
c
c\Remarks
c 1. In this version, each shift is applied to all the sublocks of
@@ -243,7 +243,7 @@ c | overflow should not occur. |
c | REFERENCE: LAPACK subroutine zlahqr |
c %-----------------------------------------------%
c
unfl = dlamch( 'safe minimum' )
unfl = pdlamch( comm, 'safe minimum' )
ovfl = dble(one / unfl)
call dlabad( unfl, ovfl )
ulp = dlamch( 'precision' )
@@ -282,6 +282,13 @@ c %----------------------------------------------%
c
do 110 jj = 1, np
sigma = shift(jj)
c
if (msglvl .gt. 2 ) then
call pivout (comm, logfil, 1, jj, ndigit,
& '_napps: shift number.')
call pzvout (comm, logfil, 1, sigma, ndigit,
& '_napps: Value of the shift ')
end if
c
istart = 1
20 continue
@@ -299,6 +306,14 @@ c
& tst1 = zlanhs( '1', kplusp-jj+1, h, ldh, workl )
if ( abs(dble(h(i+1,i)))
& .le. max(ulp*tst1, smlnum) ) then
if (msglvl .gt. 0) then
call pivout (comm, logfil, 1, i, ndigit,
& '_napps: matrix splitting at row/column no.')
call pivout (comm, logfil, 1, jj, ndigit,
& '_napps: matrix splitting with shift number.')
call pzvout (comm, logfil, 1, h(i+1,i), ndigit,
& '_napps: off diagonal element.')
end if
iend = i
h(i+1,i) = zero
go to 40
@@ -307,6 +322,12 @@ c
iend = kplusp
40 continue
c
if (msglvl .gt. 2) then
call pivout (comm, logfil, 1, istart, ndigit,
& '_napps: Start of current block ')
call pivout (comm, logfil, 1, iend, ndigit,
& '_napps: End of current block ')
end if
c
c %------------------------------------------------%
c | No reason to apply a shift to block of order 1 |
@@ -474,6 +495,20 @@ c
call zscal (n, q(kplusp,kev), resid, 1)
if ( dble( h(kev+1,kev) ) .gt. rzero )
& call zaxpy (n, h(kev+1,kev), v(1,kev+1), 1, resid, 1)
c
if (msglvl .gt. 1) then
call pzvout (comm, logfil, 1, q(kplusp,kev), ndigit,
& '_napps: sigmak = (e_{kev+p}^T*Q)*e_{kev}')
call pzvout (comm, logfil, 1, h(kev+1,kev), ndigit,
& '_napps: betak = e_{kev+1}^T*H*e_{kev}')
call pivout (comm, logfil, 1, kev, ndigit,
& '_napps: Order of the final Hessenberg matrix ')
if (msglvl .gt. 2) then
call pzmout (comm, logfil, kev, kev, h, ldh, ndigit,
& '_napps: updated Hessenberg matrix H for next iteration')
end if
c
end if
c
9000 continue
call second (t1)
+98 -99
View File
@@ -1,22 +1,22 @@
c\BeginDoc
c
c\Name: pznaup2
c\Name: pznaup2
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c Intermediate level interface called by pznaupd .
c Intermediate level interface called by pznaupd.
c
c\Usage:
c call pznaup2
c call pznaup2
c ( COMM, IDO, BMAT, N, WHICH, NEV, NP, TOL, RESID, MODE, IUPD,
c ISHIFT, MXITER, V, LDV, H, LDH, RITZ, BOUNDS,
c Q, LDQ, WORKL, IPNTR, WORKD, RWORK, INFO )
c
c\Arguments
c
c COMM, IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in pznaupd .
c MODE, ISHIFT, MXITER: see the definition of IPARAM in pznaupd .
c COMM, IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in pznaupd.
c MODE, ISHIFT, MXITER: see the definition of IPARAM in pznaupd.
c
c NP Integer. (INPUT/OUTPUT)
c Contains the number of implicit shifts to apply during
@@ -39,7 +39,7 @@ c IUPD Integer. (INPUT)
c IUPD .EQ. 0: use explicit restart instead implicit update.
c IUPD .NE. 0: use implicit update.
c
c V Complex*16 N by (NEV+NP) array. (INPUT/OUTPUT)
c V Complex*16 N by (NEV+NP) array. (INPUT/OUTPUT)
c The Arnoldi basis vectors are returned in the first NEV
c columns of V.
c
@@ -47,21 +47,21 @@ c LDV Integer. (INPUT)
c Leading dimension of V exactly as declared in the calling
c program.
c
c H Complex*16 (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H Complex*16 (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H is used to store the generated upper Hessenberg matrix
c
c LDH Integer. (INPUT)
c Leading dimension of H exactly as declared in the calling
c program.
c
c RITZ Complex*16 array of length NEV+NP. (OUTPUT)
c RITZ Complex*16 array of length NEV+NP. (OUTPUT)
c RITZ(1:NEV) contains the computed Ritz values of OP.
c
c BOUNDS Complex*16 array of length NEV+NP. (OUTPUT)
c BOUNDS Complex*16 array of length NEV+NP. (OUTPUT)
c BOUNDS(1:NEV) contain the error bounds corresponding to
c the computed Ritz values.
c
c Q Complex*16 (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Q Complex*16 (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Private (replicated) work array used to accumulate the
c rotation in the shift application step.
c
@@ -69,7 +69,7 @@ c LDQ Integer. (INPUT)
c Leading dimension of Q exactly as declared in the calling
c program.
c
c WORKL Complex*16 work array of length at least
c WORKL Complex*16 work array of length at least
c (NEV+NP)**2 + 3*(NEV+NP). (WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end. It is used in shifts calculation, shifts
@@ -86,13 +86,13 @@ c IPNTR(3): pointer to the vector B * X when used in the
c shift-and-invert mode. X is the current operand.
c -------------------------------------------------------------
c
c WORKD Complex*16 work array of length 3*N. (WORKSPACE)
c WORKD Complex*16 work array of length 3*N. (WORKSPACE)
c Distributed array to be used in the basic Arnoldi iteration
c for reverse communication. The user should not use WORKD
c as temporary workspace during the iteration !!!!!!!!!!
c See Data Distribution Note in PZNAUPD .
c See Data Distribution Note in PZNAUPD.
c
c RWORK Double precision work array of length NEV+NP ( WORKSPACE)
c RWORK Double precision work array of length NEV+NP ( WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end.
c
@@ -119,7 +119,7 @@ c
c\BeginLib
c
c\Local variables:
c xxxxxx Complex*16
c xxxxxx Complex*16
c
c\References:
c 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in
@@ -130,23 +130,23 @@ c Restarted Arnoldi Iteration", Rice University Technical Report
c TR95-13, Department of Computational and Applied Mathematics.
c
c\Routines called:
c pzgetv0 Parallel ARPACK initial vector generation routine.
c pznaitr Parallel ARPACK Arnoldi factorization routine.
c pznapps Parallel ARPACK application of implicit shifts routine.
c pzneigh Parallel ARPACK compute Ritz values and error bounds routine.
c pzngets Parallel ARPACK reorder Ritz values and error bounds routine.
c zsortc ARPACK sorting routine.
c pzgetv0 Parallel ARPACK initial vector generation routine.
c pznaitr Parallel ARPACK Arnoldi factorization routine.
c pznapps Parallel ARPACK application of implicit shifts routine.
c pzneigh Parallel ARPACK compute Ritz values and error bounds routine.
c pzngets Parallel ARPACK reorder Ritz values and error bounds routine.
c zsortc ARPACK sorting routine.
c pivout Parallel ARPACK utility routine that prints integers.
c second ARPACK utility routine for timing.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c pdvout ARPACK utility routine that prints vectors.
c pdlamch ScaLAPACK routine that determines machine constants.
c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c zcopy Level 1 BLAS that copies one vector to another .
c zdotc Level 1 BLAS that computes the scalar product of two vectors.
c zswap Level 1 BLAS that swaps two vectors.
c pdznorm2 Parallel version of Level 1 BLAS that computes the norm of a vector.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c pdvout ARPACK utility routine that prints vectors.
c pdlamch ScaLAPACK routine that determines machine constants.
c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c zcopy Level 1 BLAS that copies one vector to another .
c zdotc Level 1 BLAS that computes the scalar product of two vectors.
c zswap Level 1 BLAS that swaps two vectors.
c pdznorm2 Parallel version of Level 1 BLAS that computes the norm of a vector.
c
c\Author
c Danny Sorensen Phuong Vu
@@ -156,7 +156,7 @@ c Applied Mathematics
c Rice University
c Houston, Texas
c
c FILE: naup2.F SID: 1.6 DATE OF SID: 06/01/00 RELEASE: 1
c FILE: naup2.F SID: 1.7 DATE OF SID: 10/25/03 RELEASE: 1
c
c\Remarks
c 1. None
@@ -165,7 +165,7 @@ c\EndLib
c
c-----------------------------------------------------------------------
c
subroutine pznaup2
subroutine pznaup2
& ( comm, ido, bmat, n, which, nev, np, tol, resid, mode, iupd,
& ishift, mxiter, v, ldv, h, ldh, ritz, bounds,
& q, ldq, workl, ipntr, workd, rwork, info )
@@ -176,7 +176,7 @@ c | BLACS Variables and Routines |
c %------------------------------%
c
integer comm
external zgsum2d
external zgsum2d
c
c %----------------------------------------------------%
c | Include files for debugging and timing information |
@@ -192,7 +192,7 @@ c
character bmat*1, which*2
integer ido, info, ishift, iupd, mode, ldh, ldq, ldv, mxiter,
& n, nev, np
Double precision
Double precision
& tol
c
c %-----------------%
@@ -200,23 +200,23 @@ c | Array Arguments |
c %-----------------%
c
integer ipntr(13)
Complex*16
Complex*16
& bounds(nev+np), h(ldh,nev+np), q(ldq,nev+np),
& resid(n), ritz(nev+np), v(ldv,nev+np),
& workd(3*n), workl( (nev+np)*(nev+np+3) )
Double precision
Double precision
& rwork(nev+np)
c
c %------------%
c | Parameters |
c %------------%
c
Complex*16
Complex*16
& one, zero
Double precision
Double precision
& rzero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) ,
& rzero = 0.0 )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0),
& rzero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -226,9 +226,9 @@ c
integer ierr , iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0 , nptemp, i ,
& j
Complex*16
Complex*16
& cmpnorm
Double precision
Double precision
& rnorm, eps23, rtemp
character wprime*2
c
@@ -236,7 +236,6 @@ c
& rnorm, iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0, eps23
c
c %-----------------------%
c | Local array arguments |
c %-----------------------%
@@ -247,24 +246,24 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external zcopy , pzgetv0 , pznaitr , pzneigh , pzngets , pznapps ,
& zsortc , zswap , pzmout , pzvout , pivout, second
external zcopy, pzgetv0, pznaitr, pzneigh, pzngets, pznapps,
& zsortc, zswap, pzmout, pzvout, pivout, second
c
c %--------------------%
c | External functions |
c %--------------------%
c
Complex*16
& zdotc
Double precision
& pdznorm2 , pdlamch , dlapy2
external zdotc , pdznorm2 , pdlamch , dlapy2
Complex*16
& zdotc
Double precision
& pdznorm2, pdlamch, dlapy2
external zdotc, pdznorm2, pdlamch, dlapy2
c
c %---------------------%
c | Intrinsic Functions |
c %---------------------%
c
intrinsic dimag , dble , min, max, sqrt
intrinsic dimag, dble, min, max, sqrt
c
c %-----------------------%
c | Executable Statements |
@@ -296,8 +295,8 @@ c %---------------------------------%
c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | Set flags for computing the first NEV |
@@ -330,7 +329,7 @@ c
10 continue
c
if (getv0) then
call pzgetv0 (comm, ido, bmat, 1, initv, n, 1, v, ldv,
call pzgetv0 (comm, ido, bmat, 1, initv, n, 1, v, ldv,
& resid, rnorm, ipntr, workd, workl, info)
c
if (ido .ne. 99) go to 9000
@@ -372,7 +371,7 @@ c %----------------------------------------------------------%
c | Compute the first NEV steps of the Arnoldi factorization |
c %----------------------------------------------------------%
c
call pznaitr (comm, ido, bmat, n, 0, nev, mode,
call pznaitr (comm, ido, bmat, n, 0, nev, mode,
& resid, rnorm, v, ldv,
& h, ldh, ipntr, workd, workl, info)
c
@@ -406,7 +405,7 @@ c
c %-----------------------------------------------------------%
c | Compute NP additional steps of the Arnoldi factorization. |
c | Adjust NP since NEV might have been updated by last call |
c | to the shift application routine pznapps . |
c | to the shift application routine pznapps. |
c %-----------------------------------------------------------%
c
np = kplusp - nev
@@ -426,7 +425,7 @@ c
20 continue
update = .true.
c
call pznaitr (comm, ido, bmat, n, nev, np, mode,
call pznaitr (comm, ido, bmat, n, nev, np, mode,
& resid, rnorm, v, ldv,
& h, ldh, ipntr, workd, workl, info)
c
@@ -441,7 +440,7 @@ c
update = .false.
c
if (msglvl .gt. 1) then
call pdvout (comm, logfil, 1, rnorm, ndigit,
call pdvout (comm, logfil, 1, rnorm, ndigit,
& '_naup2: Corresponding B-norm of the residual')
end if
c
@@ -450,7 +449,7 @@ c | Compute the eigenvalues and corresponding error bounds |
c | of the current upper Hessenberg matrix. |
c %--------------------------------------------------------%
c
call pzneigh ( comm, rnorm, kplusp, h, ldh, ritz, bounds,
call pzneigh ( comm, rnorm, kplusp, h, ldh, ritz, bounds,
& q, ldq, workl, rwork, ierr)
c
if (ierr .ne. 0) then
@@ -471,11 +470,11 @@ c
c
c %--------------------------------------------------%
c | Make a copy of Ritz values and the corresponding |
c | Ritz estimates obtained from pzneigh . |
c | Ritz estimates obtained from pzneigh. |
c %--------------------------------------------------%
c
call zcopy (kplusp,ritz,1,workl(kplusp**2+1),1)
call zcopy (kplusp,bounds,1,workl(kplusp**2+kplusp+1),1)
call zcopy(kplusp,ritz,1,workl(kplusp**2+1),1)
call zcopy(kplusp,bounds,1,workl(kplusp**2+kplusp+1),1)
c
c %---------------------------------------------------%
c | Select the wanted Ritz values and their bounds |
@@ -485,7 +484,7 @@ c | bounds are in the last NEV loc. of RITZ |
c | BOUNDS respectively. |
c %---------------------------------------------------%
c
call pzngets ( comm, ishift, which, nev, np, ritz,
call pzngets ( comm, ishift, which, nev, np, ritz,
& bounds)
c
c %------------------------------------------------------------%
@@ -500,9 +499,9 @@ c
nconv = 0
c
do 25 i = 1, nev
rtemp = max( eps23, dlapy2 ( dble (ritz(np+i)),
& dimag (ritz(np+i)) ) )
if ( dlapy2 (dble (bounds(np+i)),dimag (bounds(np+i)))
rtemp = max( eps23, dlapy2( dble(ritz(np+i)),
& dimag(ritz(np+i)) ) )
if ( dlapy2(dble(bounds(np+i)),dimag(bounds(np+i)))
& .le. tol*rtemp ) then
nconv = nconv + 1
end if
@@ -514,9 +513,9 @@ c
kp(3) = nconv
call pivout (comm, logfil, 3, kp, ndigit,
& '_naup2: NEV, NP, NCONV are')
call pzvout (comm, logfil, kplusp, ritz, ndigit,
call pzvout (comm, logfil, kplusp, ritz, ndigit,
& '_naup2: The eigenvalues of H')
call pzvout (comm, logfil, kplusp, bounds, ndigit,
call pzvout (comm, logfil, kplusp, bounds, ndigit,
& '_naup2: Ritz estimates of the current NCV Ritz values')
end if
c
@@ -543,10 +542,10 @@ c
& (np .eq. 0) ) then
c
if (msglvl .gt. 4) then
call pzvout (comm, logfil, kplusp,
call pzvout(comm, logfil, kplusp,
& workl(kplusp**2+1), ndigit,
& '_naup2: Eigenvalues computed by _neigh:')
call pzvout (comm, logfil, kplusp,
call pzvout(comm, logfil, kplusp,
& workl(kplusp**2+kplusp+1), ndigit,
& '_naup2: Ritz eistmates computed by _neigh:')
end if
@@ -560,10 +559,10 @@ c %------------------------------------------------%
c
c %------------------------------------------%
c | Use h( 3,1 ) as storage to communicate |
c | rnorm to pzneupd if needed |
c | rnorm to pzneupd if needed |
c %------------------------------------------%
c
h(3,1) = dcmplx (rnorm,rzero)
h(3,1) = dcmplx(rnorm,rzero)
c
c %----------------------------------------------%
c | Sort Ritz values so that converged Ritz |
@@ -579,7 +578,7 @@ c
if (which .eq. 'LI') wprime = 'SI'
if (which .eq. 'SI') wprime = 'LI'
c
call zsortc (wprime, .true., kplusp, ritz, bounds)
call zsortc(wprime, .true., kplusp, ritz, bounds)
c
c %--------------------------------------------------%
c | Scale the Ritz estimate of each Ritz value |
@@ -587,8 +586,8 @@ c | by 1 / max(eps23, magnitude of the Ritz value). |
c %--------------------------------------------------%
c
do 35 j = 1, nev0
rtemp = max( eps23, dlapy2 ( dble (ritz(j)),
& dimag (ritz(j)) ) )
rtemp = max( eps23, dlapy2( dble(ritz(j)),
& dimag(ritz(j)) ) )
bounds(j) = bounds(j)/rtemp
35 continue
c
@@ -600,7 +599,7 @@ c | when NCONV < NEV.) |
c %---------------------------------------------------%
c
wprime = 'LM'
call zsortc (wprime, .true., nev0, bounds, ritz)
call zsortc(wprime, .true., nev0, bounds, ritz)
c
c %----------------------------------------------%
c | Scale the Ritz estimate back to its original |
@@ -608,8 +607,8 @@ c | value. |
c %----------------------------------------------%
c
do 40 j = 1, nev0
rtemp = max( eps23, dlapy2 ( dble (ritz(j)),
& dimag (ritz(j)) ) )
rtemp = max( eps23, dlapy2( dble(ritz(j)),
& dimag(ritz(j)) ) )
bounds(j) = bounds(j)*rtemp
40 continue
c
@@ -619,12 +618,12 @@ c | the "threshold" value appears at the front of |
c | ritz and bound. |
c %-----------------------------------------------%
c
call zsortc (which, .true., nconv, ritz, bounds)
call zsortc(which, .true., nconv, ritz, bounds)
c
if (msglvl .gt. 1) then
call pzvout (comm, logfil, kplusp, ritz, ndigit,
call pzvout (comm, logfil, kplusp, ritz, ndigit,
& '_naup2: Sorted eigenvalues')
call pzvout (comm, logfil, kplusp, bounds, ndigit,
call pzvout (comm, logfil, kplusp, bounds, ndigit,
& '_naup2: Sorted ritz estimates.')
end if
c
@@ -666,7 +665,7 @@ c | resort the eigenvalues. |
c %---------------------------------------%
c
if (nevbef .lt. nev)
& call pzngets (comm, ishift, which, nev, np, ritz,
& call pzngets (comm, ishift, which, nev, np, ritz,
& bounds)
c
end if
@@ -679,9 +678,9 @@ c
kp(2) = np
call pivout (comm, logfil, 2, kp, ndigit,
& '_naup2: NEV and NP are')
call pzvout (comm, logfil, nev, ritz(np+1), ndigit,
call pzvout (comm, logfil, nev, ritz(np+1), ndigit,
& '_naup2: "wanted" Ritz values ')
call pzvout (comm, logfil, nev, bounds(np+1), ndigit,
call pzvout (comm, logfil, nev, bounds(np+1), ndigit,
& '_naup2: Ritz estimates of the "wanted" values ')
end if
end if
@@ -708,16 +707,16 @@ c | RITZ, to free up WORKL |
c | for non-exact shift case. |
c %----------------------------------%
c
call zcopy (np, workl, 1, ritz, 1)
call zcopy (np, workl, 1, ritz, 1)
end if
c
if (msglvl .gt. 2) then
call pivout (comm, logfil, 1, np, ndigit,
& '_naup2: The number of shifts to apply ')
call pzvout (comm, logfil, np, ritz, ndigit,
call pzvout (comm, logfil, np, ritz, ndigit,
& '_naup2: values of the shifts')
if ( ishift .eq. 1 )
& call pzvout (comm, logfil, np, bounds, ndigit,
& call pzvout (comm, logfil, np, bounds, ndigit,
& '_naup2: Ritz estimates of the shifts')
end if
c
@@ -728,20 +727,20 @@ c | matrix H. |
c | The first 2*N locations of WORKD are used as workspace. |
c %---------------------------------------------------------%
c
call pznapps (comm, n, nev, np, ritz, v, ldv,
call pznapps(comm, n, nev, np, ritz, v, ldv,
& h, ldh, resid, q, ldq, workl, workd)
c
c %---------------------------------------------%
c | Compute the B-norm of the updated residual. |
c | Keep B*RESID in WORKD(1:N) to be used in |
c | the first step of the next call to pznaitr . |
c | the first step of the next call to pznaitr. |
c %---------------------------------------------%
c
cnorm = .true.
call second (t2)
if (bmat .eq. 'G') then
nbx = nbx + 1
call zcopy (n, resid, 1, workd(n+1), 1)
call zcopy (n, resid, 1, workd(n+1), 1)
ipntr(1) = n + 1
ipntr(2) = 1
ido = 2
@@ -752,7 +751,7 @@ c %----------------------------------%
c
go to 9000
else if (bmat .eq. 'I') then
call zcopy (n, resid, 1, workd, 1)
call zcopy (n, resid, 1, workd, 1)
end if
c
100 continue
@@ -768,18 +767,18 @@ c
end if
c
if (bmat .eq. 'G') then
cmpnorm = zdotc (n, resid, 1, workd, 1)
call zgsum2d ( comm, 'All', ' ', 1, 1, cmpnorm, 1, -1, -1 )
rnorm = sqrt(dlapy2 (dble (cmpnorm),dimag (cmpnorm)))
cmpnorm = zdotc (n, resid, 1, workd, 1)
call zgsum2d( comm, 'All', ' ', 1, 1, cmpnorm, 1, -1, -1 )
rnorm = sqrt(dlapy2(dble(cmpnorm),dimag(cmpnorm)))
else if (bmat .eq. 'I') then
rnorm = pdznorm2 (comm, n, resid, 1)
rnorm = pdznorm2(comm, n, resid, 1)
end if
cnorm = .false.
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, 1, rnorm, ndigit,
call pdvout (comm, logfil, 1, rnorm, ndigit,
& '_naup2: B-norm of residual for compressed factorization')
call pzmout (comm, logfil, nev, nev, h, ldh, ndigit,
call pzmout (comm, logfil, nev, nev, h, ldh, ndigit,
& '_naup2: Compressed upper Hessenberg matrix H')
end if
c
@@ -809,7 +808,7 @@ c
9000 continue
c
c %----------------%
c | End of pznaup2 |
c | End of pznaup2 |
c %----------------%
c
return
+126 -126
View File
@@ -1,8 +1,8 @@
c\BeginDoc
c
c\Name: pzneupd
c\Name: pzneupd
c
c Message Passing Layer: BLACS
c Message Passing Layer: BLACS
c
c\Description:
c This subroutine returns the converged approximations to eigenvalues
@@ -22,7 +22,7 @@ c
c The approximate eigenvalues and eigenvectors of A*z = lambda*B*z
c are derived from approximate eigenvalues and eigenvectors of
c of the linear operator OP prescribed by the MODE selection in the
c call to PZNAUPD . PZNAUPD must be called before this routine is called.
c call to PZNAUPD. PZNAUPD must be called before this routine is called.
c These approximate eigenvalues and vectors are commonly called Ritz
c values and Ritz vectors respectively. They are referred to as such
c in the comments that follow. The computed orthonormal basis for the
@@ -31,18 +31,18 @@ c Schur basis.
c
c The definition of OP as well as other terms and the relation of computed
c Ritz values and vectors of OP with respect to the given problem
c A*z = lambda*B*z may be found in the header of PZNAUPD . For a brief
c A*z = lambda*B*z may be found in the header of PZNAUPD. For a brief
c description, see definitions of IPARAM(7), MODE and WHICH in the
c documentation of PZNAUPD .
c documentation of PZNAUPD.
c
c\Usage:
c call pzneupd
c call pzneupd
c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, WORKEV, BMAT,
c N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD,
c WORKL, LWORKL, RWORK, INFO )
c
c\Arguments
c COMM BLACS Communicator for the processor grid. (INPUT)
c COMM BLACS Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether a basis for the invariant subspace corresponding
@@ -70,11 +70,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex*16 N by NEV array (OUTPUT)
c Z Complex*16 N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -84,7 +84,7 @@ c If RVEC = .FALSE. or HOWMNY = 'P', then Z is NOT REFERENCED.
c
c NOTE: If if RVEC = .TRUE. and a Schur basis is not required,
c the array Z may be set equal to first NEV+1 columns of the Arnoldi
c basis array V computed by PZNAUPD . In this case the Arnoldi basis
c basis array V computed by PZNAUPD. In this case the Arnoldi basis
c will be destroyed and overwritten with the eigenvector basis.
c
c LDZ Integer. (INPUT)
@@ -92,30 +92,30 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex*16 (INPUT)
c SIGMA Complex*16 (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PZNAUPD that was just completed. ****
c **** call to PZNAUPD that was just completed. ****
c
c NOTE: The remaining arguments
c
c BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR,
c WORKD, WORKL, LWORKL, RWORK, INFO
c
c must be passed directly to ZNEUPD following the last call
c to PZNAUPD . These arguments MUST NOT BE MODIFIED between
c the the last call to PZNAUPD and the call to ZNEUPD .
c must be passed directly to ZNEUPD following the last call
c to PZNAUPD. These arguments MUST NOT BE MODIFIED between
c the the last call to PZNAUPD and the call to ZNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by PZNAUPD .
c vectors for OP as constructed by PZNAUPD .
c
c Upon OUTPUT: If RVEC = .TRUE. the first NCONV=IPARAM(5) columns
c contain approximate Schur vectors that span the
@@ -128,16 +128,16 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c PZNAUPD . They are not changed by PZNEUPD .
c PZNAUPD. They are not changed by PZNEUPD.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
c untransformed Ritz values, the untransformed error estimates of
c the Ritz values, the upper triangular matrix for H, and the
c associated matrix representation of the invariant subspace for H.
c
c Note: IPNTR(9:13) contains the pointer into WORKL for addresses
c of the above information computed by PZNEUPD .
c of the above information computed by PZNEUPD.
c -------------------------------------------------------------
c IPNTR(9): pointer to the NCV RITZ values of the
c original system.
@@ -147,7 +147,7 @@ c IPNTR(12): pointer to the NCV by NCV upper triangular
c Schur matrix for H.
c IPNTR(13): pointer to the NCV by NCV matrix of eigenvectors
c of the upper Hessenberg matrix H. Only referenced by
c PZNEUPD if RVEC = .TRUE. See Remark 2 below.
c PZNEUPD if RVEC = .TRUE. See Remark 2 below.
c -------------------------------------------------------------
c
c INFO Integer. (OUTPUT)
@@ -155,8 +155,8 @@ c Error flag on output.
c = 0: Normal exit.
c
c = 1: The Schur form computed by LAPACK routine csheqr
c could not be reordered by LAPACK routine ztrsen .
c Re-enter subroutine pzneupd with IPARAM(5)=NCV and
c could not be reordered by LAPACK routine ztrsen.
c Re-enter subroutine pzneupd with IPARAM(5)=NCV and
c increase the size of the array D to have
c dimension at least dimension NCV and allocate at least NCV
c columns for Z. NOTE: Not necessary if Z and V share
@@ -172,18 +172,18 @@ c = -7: Length of private work WORKL array is not sufficient.
c = -8: Error return from LAPACK eigenvalue calculation.
c This should never happened.
c = -9: Error return from calculation of eigenvectors.
c Informational error from LAPACK routine ztrevc .
c Informational error from LAPACK routine ztrevc.
c = -10: IPARAM(7) must be 1,2,3
c = -11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.
c = -12: HOWMNY = 'S' not yet implemented
c = -13: HOWMNY must be one of 'A' or 'P' if RVEC = .true.
c = -14: PZNAUPD did not find any eigenvalues to sufficient
c = -14: PZNAUPD did not find any eigenvalues to sufficient
c accuracy.
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD .
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD.
c
c\BeginLib
c
@@ -200,26 +200,26 @@ c Vol. 48, No. 178, April, 1987 pp. 664-673.
c
c\Routines called:
c pivout Parallel ARPACK utility routine that prints integers.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c a matrix.
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c upper Hessenberg matrix.
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c in upper triangular form.
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c factored form.
c pdlamch ScaLAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c pdlamch ScaLAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c
c\Remarks
c
@@ -249,12 +249,12 @@ c\Revision history:
c Starting Point: Complex Serial Code FILE: neupd.F SID: 2.2
c
c\SCCS Information:
c FILE: neupd.F SID: 1.6 DATE OF SID: 04/10/01
c FILE: neupd.F SID: 1.9 DATE OF SID: 10/25/03
c
c\EndLib
c
c-----------------------------------------------------------------------
subroutine pzneupd
subroutine pzneupd
& ( comm , rvec , howmny, select, d ,
& z , ldz , sigma , workev, bmat ,
& n , which , nev , tol , resid,
@@ -262,7 +262,7 @@ c-----------------------------------------------------------------------
& workd, workl , lworkl, rwork , info )
c
c %--------------------%
c | BLACS Communicator |
c | BLACS Communicator |
c %--------------------%
c
integer comm
@@ -281,9 +281,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex*16
Complex*16
& sigma
Double precision
Double precision
& tol
c
c %-----------------%
@@ -292,9 +292,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Double precision
Double precision
& rwork(ncv)
Complex*16
Complex*16
& d(nev) , resid(n) , v(ldv,ncv) ,
& z(ldz, nev), workd(3*n), workl(lworkl),
& workev(2*ncv)
@@ -303,9 +303,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex*16
Complex*16
& one, zero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0))
c
c %---------------%
c | Local Scalars |
@@ -317,9 +317,9 @@ c
& mode , msglvl, ritz , wr , k , irz ,
& ibd , outncv, iq , np , numcnv, jj ,
& ishift
Complex*16
Complex*16
& rnorm, temp, vl(1)
Double precision
Double precision
& conds, sep, rtemp, eps23
logical reord
c
@@ -327,21 +327,21 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external zcopy ,zgeru ,zgeqr2 ,zlacpy ,pzmout ,
& zunm2r ,ztrmm ,pzvout ,pivout,
& zlahqr
external zcopy ,zgeru,zgeqr2,zlacpy,pzmout,
& zunm2r,ztrmm,pzvout,pivout,
& zlahqr
c
c %--------------------%
c | External Functions |
c %--------------------%
c
Double precision
& dznrm2 ,pdlamch ,dlapy2
external dznrm2 ,pdlamch ,dlapy2
Double precision
& dznrm2,pdlamch,dlapy2
external dznrm2,pdlamch,dlapy2
c
Complex*16
& zdotc
external zdotc
Complex*16
& zdotc
external zdotc
c
c %---------------------%
c | Intrinsic Functions |
@@ -367,8 +367,8 @@ c %---------------------------------%
c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %-------------------------------%
c | Quick return |
@@ -433,7 +433,7 @@ c | workl(ncv*ncv+ncv+1:ncv*ncv+2*ncv) := error bounds |
c %--------------------------------------------------------%
c
c %-----------------------------------------------------------%
c | The following is used and set by ZNEUPD . |
c | The following is used and set by ZNEUPD. |
c | workl(ncv*ncv+2*ncv+1:ncv*ncv+3*ncv) := The untransformed |
c | Ritz values. |
c | workl(ncv*ncv+3*ncv+1:ncv*ncv+4*ncv) := The untransformed |
@@ -486,9 +486,9 @@ c
workl(ih+2) = zero
c
if (msglvl .gt. 2) then
call pzvout (comm, logfil, ncv, workl(irz), ndigit,
call pzvout(comm, logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values passed in from _NAUPD.')
call pzvout (comm, logfil, ncv, workl(ibd), ndigit,
call pzvout(comm, logfil, ncv, workl(ibd), ndigit,
& '_neupd: Ritz estimates passed in from _NAUPD.')
end if
c
@@ -518,14 +518,14 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call zngets (comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
call pzngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
c
if (msglvl .gt. 2) then
call pzvout (comm,logfil, ncv, workl(irz), ndigit,
call pzvout(comm,logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values after calling _NGETS.')
call pzvout (comm,logfil, ncv, workl(bounds), ndigit,
call pzvout(comm,logfil, ncv, workl(bounds), ndigit,
& '_neupd: Ritz value indices after calling _NGETS.')
end if
c
@@ -537,12 +537,12 @@ c
numcnv = 0
do 11 j = 1,ncv
rtemp = max(eps23,
& dlapy2 ( real (workl(irz+ncv-j)),
& dimag (workl(irz+ncv-j)) ))
& dlapy2 ( dble (workl(irz+ncv-j)),
& dimag(workl(irz+ncv-j)) ))
jj = workl(bounds + ncv - j)
if (numcnv .lt. nconv .and.
& dlapy2 ( real (workl(ibd+jj-1)),
& dimag (workl(ibd+jj-1)) )
& dlapy2( dble (workl(ibd+jj-1)),
& dimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
select(jj) = .true.
numcnv = numcnv + 1
@@ -570,20 +570,20 @@ c
end if
c
c %-------------------------------------------------------%
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by PZNAUPD . |
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by PZNAUPD. |
c | Make a copy of the upper Hessenberg matrix. |
c | Initialize the Schur vector matrix Q to the identity. |
c %-------------------------------------------------------%
c
call zcopy (ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset ('All', ncv, ncv, zero, one, workl(invsub), ldq)
call zlahqr (.true. , .true. , ncv ,
call zcopy(ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset('All', ncv, ncv, zero, one, workl(invsub), ldq)
call zlahqr(.true. , .true. , ncv ,
& 1 , ncv , workl(iuptri),
& ldh , workl(iheig) , 1 ,
& ncv , workl(invsub), ldq ,
& ierr )
call zcopy (ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
call zcopy(ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
c
if (ierr .ne. 0) then
info = -8
@@ -591,12 +591,12 @@ c
end if
c
if (msglvl .gt. 1) then
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
call pzvout(comm, logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H')
call pzvout (comm, logfil, ncv, workl(ihbds), ndigit,
call pzvout(comm, logfil, ncv, workl(ihbds), ndigit,
& '_neupd: Last row of the Schur vector matrix')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, ncv, ncv,
call pzmout(comm, logfil, ncv, ncv,
& workl(iuptri), ldh, ndigit,
& '_neupd: The upper triangular matrix ')
end if
@@ -607,7 +607,7 @@ c %-----------------------------------------------%
c | Reorder the computed upper triangular matrix. |
c %-----------------------------------------------%
c
call ztrsen ('None' , 'V' , select ,
call ztrsen('None' , 'V' , select ,
& ncv , workl(iuptri), ldh ,
& workl(invsub), ldq , workl(iheig),
& nconv , conds , sep ,
@@ -619,10 +619,10 @@ c
end if
c
if (msglvl .gt. 2) then
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H--reordered')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, ncv, ncv,
call pzmout (comm, logfil, ncv, ncv,
& workl(iuptri), ldq, ndigit,
& '_neupd: Triangular matrix after re-ordering')
end if
@@ -636,7 +636,7 @@ c | to compute the Ritz estimates of converged |
c | Ritz values. |
c %---------------------------------------------%
c
call zcopy (ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
call zcopy(ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
c
c %--------------------------------------------%
c | Place the computed eigenvalues of H into D |
@@ -644,7 +644,7 @@ c | if a spectral transformation was not used. |
c %--------------------------------------------%
c
if (type .eq. 'REGULR') then
call zcopy (nconv, workl(iheig), 1, d, 1)
call zcopy(nconv, workl(iheig), 1, d, 1)
end if
c
c %----------------------------------------------------------%
@@ -653,12 +653,12 @@ c | the wanted invariant subspace located in the first NCONV |
c | columns of workl(invsub,ldq). |
c %----------------------------------------------------------%
c
call zgeqr2 (ncv, nconv , workl(invsub),
call zgeqr2(ncv, nconv , workl(invsub),
& ldq, workev, workev(ncv+1),
& ierr)
c
c %--------------------------------------------------------%
c | * Postmultiply V by Q using zunm2r . |
c | * Postmultiply V by Q using zunm2r. |
c | * Copy the first NCONV columns of VQ into Z. |
c | * Postmultiply Z by R. |
c | The N by NCONV matrix Z is now a matrix representation |
@@ -669,11 +669,11 @@ c | associated with the upper triangular matrix of order |
c | NCONV in workl(iuptri). |
c %--------------------------------------------------------%
c
call zunm2r ('Right', 'Notranspose', n ,
call zunm2r('Right', 'Notranspose', n ,
& ncv , nconv , workl(invsub),
& ldq , workev , v ,
& ldv , workd(n+1) , ierr )
call zlacpy ('All', n, nconv, v, ldv, z, ldz)
call zlacpy('All', n, nconv, v, ldv, z, ldz)
c
do 20 j=1, nconv
c
@@ -686,10 +686,10 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( dble ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble (zero) ) then
call zscal (nconv, -one, workl(iuptri+j-1), ldq)
call zscal (nconv, -one, workl(iuptri+(j-1)*ldq), 1)
if ( dble( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble(zero) ) then
call zscal(nconv, -one, workl(iuptri+j-1), ldq)
call zscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
c
20 continue
@@ -709,7 +709,7 @@ c
end if
30 continue
c
call ztrevc ('Right', 'Select' , select ,
call ztrevc('Right', 'Select' , select ,
& ncv , workl(iuptri), ldq ,
& vl , 1 , workl(invsub),
& ldq , ncv , outncv ,
@@ -723,15 +723,15 @@ c
c %------------------------------------------------%
c | Scale the returning eigenvectors so that their |
c | Euclidean norms are all one. LAPACK subroutine |
c | ztrevc returns each eigenvector normalized so |
c | ztrevc returns each eigenvector normalized so |
c | that the element of largest magnitude has |
c | magnitude 1. |
c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = dznrm2 (ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble (one) / rtemp
call zdscal ( ncv, rtemp,
rtemp = dznrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble(one) / rtemp
call zdscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
c %------------------------------------------%
@@ -743,17 +743,17 @@ c | upper triangular, thus the length of the |
c | inner product can be set to j. |
c %------------------------------------------%
c
workev(j) = zdotc (j, workl(ihbds), 1,
workev(j) = zdotc(j, workl(ihbds), 1,
& workl(invsub+(j-1)*ldq), 1)
40 continue
c
if (msglvl .gt. 2) then
call zcopy (nconv, workl(invsub+ncv-1), ldq,
call zcopy(nconv, workl(invsub+ncv-1), ldq,
& workl(ihbds), 1)
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout(comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Last row of the eigenvector matrix for T')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, nconv, ncv,
call pzmout(comm, logfil, nconv, ncv,
& workl(invsub), ldq, ndigit,
& '_neupd: The eigenvector matrix for T')
end if
@@ -763,14 +763,14 @@ c %---------------------------------------%
c | Copy Ritz estimates into workl(ihbds) |
c %---------------------------------------%
c
call zcopy (nconv, workev, 1, workl(ihbds), 1)
call zcopy(nconv, workev, 1, workl(ihbds), 1)
c
c %----------------------------------------------%
c | The eigenvector matrix Q of T is triangular. |
c | Form Z*Q. |
c %----------------------------------------------%
c
call ztrmm ('Right' , 'Upper' , 'No transpose',
call ztrmm('Right' , 'Upper' , 'No transpose',
& 'Non-unit', n , nconv ,
& one , workl(invsub), ldq ,
& z , ldz)
@@ -781,12 +781,12 @@ c
c
c %--------------------------------------------------%
c | An approximate invariant subspace is not needed. |
c | Place the Ritz values computed PZNAUPD into D. |
c | Place the Ritz values computed PZNAUPD into D. |
c %--------------------------------------------------%
c
call zcopy (nconv, workl(ritz), 1, d, 1)
call zcopy (nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy (nconv, workl(bounds), 1, workl(ihbds), 1)
call zcopy(nconv, workl(ritz), 1, d, 1)
call zcopy(nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy(nconv, workl(bounds), 1, workl(ihbds), 1)
c
end if
c
@@ -799,7 +799,7 @@ c
if (type .eq. 'REGULR') then
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
else
c
@@ -810,7 +810,7 @@ c | Ritz values in the original system. |
c %---------------------------------------%
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
do 50 k=1, ncv
temp = workl(iheig+k-1)
@@ -834,14 +834,14 @@ c
end if
c
if (type .ne. 'REGULR' .and. msglvl .gt. 1) then
call pzvout (comm, logfil, nconv, d, ndigit,
call pzvout (comm, logfil, nconv, d, ndigit,
& '_neupd: Untransformed Ritz values.')
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Ritz estimates of the untransformed Ritz values.')
else if ( msglvl .gt. 1) then
call pzvout (comm, logfil, nconv, d, ndigit,
call pzvout (comm, logfil, nconv, d, ndigit,
& '_neupd: Converged Ritz values.')
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Associated Ritz estimates.')
end if
c
@@ -873,7 +873,7 @@ c | Perform a rank one update to Z and |
c | purify all the Ritz vectors together. |
c %---------------------------------------%
c
call zgeru (n, nconv, one, resid, 1, workev, 1, z, ldz)
call zgeru(n, nconv, one, resid, 1, workev, 1, z, ldz)
c
end if
c
@@ -882,7 +882,7 @@ c
return
c
c %----------------%
c | End of pzneupd |
c | End of pzneupd |
c %----------------%
c
end
+2
View File
@@ -21,3 +21,5 @@ libparpacksrcmpi_la_SOURCES = \
libparpacksrcmpi_la_FFLAGS = $(FFLAGS_SAV)
libparpacksrcmpi_la_LIBADD = libparpack_noopt.la
EXTRA_DIST = debug.h stat.h
+19 -13
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -148,10 +148,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -246,11 +246,12 @@ libparpacksrcmpi_la_SOURCES = \
libparpacksrcmpi_la_FFLAGS = $(FFLAGS_SAV)
libparpacksrcmpi_la_LIBADD = libparpack_noopt.la
EXTRA_DIST = debug.h stat.h
all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -275,9 +276,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -289,9 +290,9 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libparpack_noopt.la: $(libparpack_noopt_la_OBJECTS) $(libparpack_noopt_la_DEPENDENCIES)
libparpack_noopt.la: $(libparpack_noopt_la_OBJECTS) $(libparpack_noopt_la_DEPENDENCIES) $(EXTRA_libparpack_noopt_la_DEPENDENCIES)
$(libparpack_noopt_la_LINK) $(libparpack_noopt_la_OBJECTS) $(libparpack_noopt_la_LIBADD) $(LIBS)
libparpacksrcmpi.la: $(libparpacksrcmpi_la_OBJECTS) $(libparpacksrcmpi_la_DEPENDENCIES)
libparpacksrcmpi.la: $(libparpacksrcmpi_la_OBJECTS) $(libparpacksrcmpi_la_DEPENDENCIES) $(EXTRA_libparpacksrcmpi_la_DEPENDENCIES)
$(libparpacksrcmpi_la_LINK) $(libparpacksrcmpi_la_OBJECTS) $(libparpacksrcmpi_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -579,10 +580,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-130
View File
@@ -1,130 +0,0 @@
C/*
C *
C * (C) 1993 by Argonne National Laboratory and Mississipi State University.
C * All rights reserved. See COPYRIGHT in top-level directory.
C */
C
C/* user include file for MPI programs, with no dependencies */
C
C/* return codes */
integer MPI_SUCCESS,MPI_ERR_EXHAUSTED,MPI_ERR_TAG,
$ MPI_ERR_COMM_NULL,MPI_ERR_COMM_INTER,MPI_ERR_COMM_INTRA,
$ MPI_ERR_ARG,MPI_ERR_BUFFER,MPI_ERR_COUNT,MPI_ERR_TYPE,
$ MPI_ERR_ROOT,MPI_ERR_OP,MPI_ERR_ERRORCODE,
$ MPI_ERR_GROUP,MPI_ERR_RANK,MPI_ERR_TOPOLOGY,
$ MPI_ERR_DIMS,MPI_ERR_NULL,MPI_ERR_UNKNOWN,
$ MPI_ERR_REQUEST,MPI_ERR_LIMIT,MPI_ERR_INTERN,
$ MPI_ERR_NOMATCH,MPI_ERR_TRUNCATE,MPI_ERR_BAD_ARGS,
$ MPI_ERR_INIT,MPI_ERR_PERM_KEY,MPI_ERR_BUFFER_EXISTS,
$ MPI_ERR_COMM,MPI_ERR_PERM_TYPE,MPI_ERR_IN_STATUS,
$ MPI_ERR_OTHER,MPI_ERR_LASTCODE
parameter (MPI_SUCCESS=0,MPI_ERR_EXHAUSTED=1,MPI_ERR_TAG=2,
$ MPI_ERR_COMM_NULL=3,MPI_ERR_COMM_INTER=4,MPI_ERR_COMM_INTRA=5,
$ MPI_ERR_ARG=6,MPI_ERR_BUFFER=7,MPI_ERR_COUNT=8,MPI_ERR_TYPE=9,
$ MPI_ERR_ROOT=10,MPI_ERR_OP=11,MPI_ERR_ERRORCODE=12,
$ MPI_ERR_GROUP=13,MPI_ERR_RANK=14,MPI_ERR_TOPOLOGY=15,
$ MPI_ERR_DIMS=16,MPI_ERR_NULL=17,MPI_ERR_UNKNOWN=18,
$ MPI_ERR_REQUEST=19,MPI_ERR_LIMIT=20,MPI_ERR_INTERN=21,
$ MPI_ERR_NOMATCH=22,MPI_ERR_TRUNCATE=23,MPI_ERR_BAD_ARGS=24,
$ MPI_ERR_INIT=25,MPI_ERR_PERM_KEY=26,MPI_ERR_BUFFER_EXISTS=27,
$ MPI_ERR_COMM=28,MPI_ERR_PERM_TYPE=29,MPI_ERR_IN_STATUS=30,
$ MPI_ERR_OTHER=31,
$ MPI_ERR_LASTCODE=32)
C
integer MPI_UNDEFINED
parameter (MPI_UNDEFINED = (-32766))
C
INTEGER MPI_GRAPH, MPI_CART
PARAMETER (MPI_GRAPH = 1, MPI_CART = 2)
INTEGER MPI_PROC_NULL
PARAMETER ( MPI_PROC_NULL = (-1) )
C
INTEGER MPI_BSEND_OVERHEAD
PARAMETER ( MPI_BSEND_OVERHEAD = 512 )
INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
PARAMETER(MPI_SOURCE=2, MPI_TAG=3, MPI_ERROR=4)
INTEGER MPI_STATUS_SIZE
PARAMETER (MPI_STATUS_SIZE=4)
INTEGER MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING
PARAMETER (MPI_MAX_PROCESSOR_NAME=256,
$ MPI_MAX_ERROR_STRING=256)
C
INTEGER MPI_COMM_NULL
PARAMETER (MPI_COMM_NULL=0)
c
INTEGER MPI_DATATYPE_NULL
PARAMETER (MPI_DATATYPE_NULL = 0)
INTEGER MPI_ERRHANDLER_NULL
PARAMETER (MPI_ERRHANDLER_NULL = 0)
INTEGER MPI_GROUP_NULL
PARAMETER (MPI_GROUP_NULL = 0)
INTEGER MPI_KEYVAL_INVALID
PARAMETER (MPI_KEYVAL_INVALID = 0)
INTEGER MPI_REQUEST_NULL
PARAMETER (MPI_REQUEST_NULL = 0)
C
INTEGER MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL
PARAMETER (MPI_IDENT=0, MPI_CONGRUENT=1, MPI_SIMILAR=2,
$ MPI_UNEQUAL=3)
C
C We handle datatypes by putting the variables that hold them into
C common. This way, a Fortran program can directly use the various
C datatypes and can even give them to C programs.
C
C MPI_BOTTOM needs to be a known address; here we put it at the
C beginning of the common block. The point-to-point and collective
C routines know about MPI_BOTTOM, but MPI_TYPE_STRUCT as yet does not.
C
C The types MPI_INTEGER1,2,4 and MPI_REAL4,8 are OPTIONAL.
C Their values are zero if they are not available. Note that
C using these reduces the portability of code (though may enhance
C portability between Crays and other systems)
C
integer MPI_TAG_UB, MPI_HOST, MPI_IO
integer MPI_BOTTOM, MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8, MPI_UB, MPI_LB,
$ MPI_PACKED
integer MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY
integer MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL
integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
common /mpipriv/ MPI_BOTTOM, MPI_INTEGER, MPI_REAL,
$ MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8,
$ MPI_UB, MPI_LB,
$ MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY,
$ MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL,
$ MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_ERRORS_ARE_FATAL,
$ MPI_ERRORS_RETURN, MPI_PACKED
C
integer MPI_ANY_SOURCE
parameter (MPI_ANY_SOURCE = (-2))
integer MPI_ANY_TAG
parameter (MPI_ANY_TAG = (-1))
C
C All other MPI routines are subroutines
double precision MPI_WTIME, MPI_WTICK
external MPI_WTIME, MPI_WTICK
C
C The attribute copy/delete functions are symbols that can be passed
C to MPI routines
external MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN, MPI_DUP_FN
+3 -3
View File
@@ -127,7 +127,7 @@ c\Revision history:
c Starting Point: Serial Complex Code FILE: napps.F SID: 2.1
c
c\SCCS Information:
c FILE: napps.F SID: 1.3 DATE OF SID: 06/04/98
c FILE: napps.F SID: 1.4 DATE OF SID: 10/25/03
c
c\Remarks
c 1. In this version, each shift is applied to all the sublocks of
@@ -243,10 +243,10 @@ c | overflow should not occur. |
c | REFERENCE: LAPACK subroutine clahqr |
c %-----------------------------------------------%
c
unfl = slamch( 'safe minimum' )
unfl = pslamch( comm, 'safe minimum' )
ovfl = real(one / unfl)
call slabad( unfl, ovfl )
ulp = slamch( 'precision' )
ulp = pslamch( comm, 'precision' )
smlnum = unfl*( n / ulp )
first = .false.
end if
+30 -31
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: pcnaup2
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c Intermediate level interface called by pcnaupd.
@@ -39,7 +39,7 @@ c IUPD Integer. (INPUT)
c IUPD .EQ. 0: use explicit restart instead implicit update.
c IUPD .NE. 0: use implicit update.
c
c V Complex N by (NEV+NP) array. (INPUT/OUTPUT)
c V Complex N by (NEV+NP) array. (INPUT/OUTPUT)
c The Arnoldi basis vectors are returned in the first NEV
c columns of V.
c
@@ -47,21 +47,21 @@ c LDV Integer. (INPUT)
c Leading dimension of V exactly as declared in the calling
c program.
c
c H Complex (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H Complex (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H is used to store the generated upper Hessenberg matrix
c
c LDH Integer. (INPUT)
c Leading dimension of H exactly as declared in the calling
c program.
c
c RITZ Complex array of length NEV+NP. (OUTPUT)
c RITZ Complex array of length NEV+NP. (OUTPUT)
c RITZ(1:NEV) contains the computed Ritz values of OP.
c
c BOUNDS Complex array of length NEV+NP. (OUTPUT)
c BOUNDS Complex array of length NEV+NP. (OUTPUT)
c BOUNDS(1:NEV) contain the error bounds corresponding to
c the computed Ritz values.
c
c Q Complex (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Q Complex (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Private (replicated) work array used to accumulate the
c rotation in the shift application step.
c
@@ -69,7 +69,7 @@ c LDQ Integer. (INPUT)
c Leading dimension of Q exactly as declared in the calling
c program.
c
c WORKL Complex work array of length at least
c WORKL Complex work array of length at least
c (NEV+NP)**2 + 3*(NEV+NP). (WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end. It is used in shifts calculation, shifts
@@ -86,13 +86,13 @@ c IPNTR(3): pointer to the vector B * X when used in the
c shift-and-invert mode. X is the current operand.
c -------------------------------------------------------------
c
c WORKD Complex work array of length 3*N. (WORKSPACE)
c WORKD Complex work array of length 3*N. (WORKSPACE)
c Distributed array to be used in the basic Arnoldi iteration
c for reverse communication. The user should not use WORKD
c as temporary workspace during the iteration !!!!!!!!!!
c See Data Distribution Note in PCNAUPD.
c
c RWORK Real work array of length NEV+NP ( WORKSPACE)
c RWORK Real work array of length NEV+NP ( WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end.
c
@@ -119,7 +119,7 @@ c
c\BeginLib
c
c\Local variables:
c xxxxxx Complex
c xxxxxx Complex
c
c\References:
c 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in
@@ -156,7 +156,7 @@ c Applied Mathematics
c Rice University
c Houston, Texas
c
c FILE: naup2.F SID: 1.6 DATE OF SID: 06/01/00 RELEASE: 1
c FILE: naup2.F SID: 1.7 DATE OF SID: 10/25/03 RELEASE: 1
c
c\Remarks
c 1. None
@@ -192,7 +192,7 @@ c
character bmat*1, which*2
integer ido, info, ishift, iupd, mode, ldh, ldq, ldv, mxiter,
& n, nev, np
Real
Real
& tol
c
c %-----------------%
@@ -200,23 +200,23 @@ c | Array Arguments |
c %-----------------%
c
integer ipntr(13)
Complex
Complex
& bounds(nev+np), h(ldh,nev+np), q(ldq,nev+np),
& resid(n), ritz(nev+np), v(ldv,nev+np),
& workd(3*n), workl( (nev+np)*(nev+np+3) )
Real
Real
& rwork(nev+np)
c
c %------------%
c | Parameters |
c %------------%
c
Complex
Complex
& one, zero
Real
Real
& rzero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) ,
& rzero = 0.0 )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0),
& rzero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -226,9 +226,9 @@ c
integer ierr , iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0 , nptemp, i ,
& j
Complex
Complex
& cmpnorm
Real
Real
& rnorm, eps23, rtemp
character wprime*2
c
@@ -236,8 +236,7 @@ c
& rnorm, iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0, eps23
c
Real
Real
& cmpnorm_buf
c
c %-----------------------%
@@ -257,9 +256,9 @@ c %--------------------%
c | External functions |
c %--------------------%
c
Complex
Complex
& cdotc
Real
Real
& pscnorm2, pslamch, slapy2
external cdotc, pscnorm2, pslamch, slapy2
c
@@ -267,7 +266,7 @@ c %---------------------%
c | Intrinsic Functions |
c %---------------------%
c
intrinsic aimag, real , min, max, sqrt
intrinsic aimag, real, min, max, sqrt
c
c %-----------------------%
c | Executable Statements |
@@ -300,7 +299,7 @@ c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | Set flags for computing the first NEV |
@@ -503,9 +502,9 @@ c
nconv = 0
c
do 25 i = 1, nev
rtemp = max( eps23, slapy2( real (ritz(np+i)),
rtemp = max( eps23, slapy2( real(ritz(np+i)),
& aimag(ritz(np+i)) ) )
if ( slapy2(real (bounds(np+i)),aimag(bounds(np+i)))
if ( slapy2(real(bounds(np+i)),aimag(bounds(np+i)))
& .le. tol*rtemp ) then
nconv = nconv + 1
end if
@@ -590,7 +589,7 @@ c | by 1 / max(eps23, magnitude of the Ritz value). |
c %--------------------------------------------------%
c
do 35 j = 1, nev0
rtemp = max( eps23, slapy2( real (ritz(j)),
rtemp = max( eps23, slapy2( real(ritz(j)),
& aimag(ritz(j)) ) )
bounds(j) = bounds(j)/rtemp
35 continue
@@ -611,7 +610,7 @@ c | value. |
c %----------------------------------------------%
c
do 40 j = 1, nev0
rtemp = max( eps23, slapy2( real (ritz(j)),
rtemp = max( eps23, slapy2( real(ritz(j)),
& aimag(ritz(j)) ) )
bounds(j) = bounds(j)*rtemp
40 continue
@@ -774,7 +773,7 @@ c
cmpnorm_buf = cdotc (n, resid, 1, workd, 1)
call MPI_ALLREDUCE( cmpnorm_buf, cmpnorm, 1,
& MPI_COMPLEX, MPI_SUM, comm, ierr )
rnorm = sqrt(slapy2(real (cmpnorm),aimag(cmpnorm)))
rnorm = sqrt(slapy2(real(cmpnorm),aimag(cmpnorm)))
else if (bmat .eq. 'I') then
rnorm = pscnorm2(comm, n, resid, 1)
end if
+27 -27
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: pcneupd
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c This subroutine returns the converged approximations to eigenvalues
@@ -42,7 +42,7 @@ c N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD,
c WORKL, LWORKL, RWORK, INFO )
c
c\Arguments
c COMM MPI Communicator for the processor grid. (INPUT)
c COMM MPI Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether a basis for the invariant subspace corresponding
@@ -70,11 +70,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex array of dimension NEV+1. (OUTPUT)
c D Complex array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex N by NEV array (OUTPUT)
c Z Complex N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -92,11 +92,11 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex (INPUT)
c SIGMA Complex (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PCNAUPD that was just completed. ****
@@ -112,7 +112,7 @@ c the the last call to PCNAUPD and the call to CNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex N by NCV array. (INPUT/OUTPUT)
c V Complex N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by PCNAUPD .
@@ -128,7 +128,7 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c PCNAUPD. They are not changed by PCNEUPD.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
@@ -249,7 +249,7 @@ c\Revision history:
c Starting Point: Complex Serial Code FILE: neupd.F SID: 2.2
c
c\SCCS Information:
c FILE: neupd.F SID: 1.6 DATE OF SID: 04/10/01
c FILE: neupd.F SID: 1.9 DATE OF SID: 10/25/03
c
c\EndLib
c
@@ -262,7 +262,7 @@ c-----------------------------------------------------------------------
& workd, workl , lworkl, rwork , info )
c
c %--------------------%
c | MPI Communicator |
c | MPI Communicator |
c %--------------------%
c
integer comm
@@ -281,9 +281,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex
Complex
& sigma
Real
Real
& tol
c
c %-----------------%
@@ -292,9 +292,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Real
Real
& rwork(ncv)
Complex
Complex
& d(nev) , resid(n) , v(ldv,ncv) ,
& z(ldz, nev), workd(3*n), workl(lworkl),
& workev(2*ncv)
@@ -303,9 +303,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex
Complex
& one, zero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0))
c
c %---------------%
c | Local Scalars |
@@ -317,9 +317,9 @@ c
& mode , msglvl, ritz , wr , k , irz ,
& ibd , outncv, iq , np , numcnv, jj ,
& ishift
Complex
Complex
& rnorm, temp, vl(1)
Real
Real
& conds, sep, rtemp, eps23
logical reord
c
@@ -335,11 +335,11 @@ c %--------------------%
c | External Functions |
c %--------------------%
c
Real
Real
& scnrm2,pslamch,slapy2
external scnrm2,pslamch,slapy2
c
Complex
Complex
& cdotc
external cdotc
c
@@ -368,7 +368,7 @@ c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %-------------------------------%
c | Quick return |
@@ -518,9 +518,9 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call cngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
call pcngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
c
if (msglvl .gt. 2) then
call pcvout(comm,logfil, ncv, workl(irz), ndigit,
@@ -686,8 +686,8 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( real ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real (zero) ) then
if ( real( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real(zero) ) then
call cscal(nconv, -one, workl(iuptri+j-1), ldq)
call cscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
@@ -730,7 +730,7 @@ c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = scnrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = real (one) / rtemp
rtemp = real(one) / rtemp
call csscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
+93 -93
View File
@@ -1,8 +1,8 @@
c\BeginDoc
c
c\Name: pdseupd
c\Name: pdseupd
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c
@@ -41,12 +41,12 @@ c There is also the option of computing a selected set of these vectors
c with a single call.
c
c\Usage:
c call pdseupd
c call pdseupd
c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, BMAT, N, WHICH, NEV, TOL,
c RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO )
c
c\Arguments
c COMM MPI Communicator for the processor grid. (INPUT)
c COMM MPI Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether Ritz vectors corresponding to the Ritz value
@@ -69,16 +69,16 @@ c computed. To select the Ritz vector corresponding to a
c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' , SELECT is used as workspace.
c
c D Double precision array of dimension NEV. (OUTPUT)
c D Double precision array of dimension NEV. (OUTPUT)
c On exit, D contains the Ritz value approximations to the
c eigenvalues of A*z = lambda*B*z. The values are returned
c in ascending order. If IPARAM(7) = 3,4,5 then D represents
c the Ritz values of OP computed by pdsaupd transformed to
c the Ritz values of OP computed by pdsaupd transformed to
c those of the original eigensystem A*z = lambda*B*z. If
c IPARAM(7) = 1,2 then the Ritz values of OP are the same
c as the those of A*z = lambda*B*z.
c
c Z Double precision N by NEV array if HOWMNY = 'A'. (OUTPUT)
c Z Double precision N by NEV array if HOWMNY = 'A'. (OUTPUT)
c On exit, Z contains the B-orthonormal Ritz vectors of the
c eigensystem A*z = lambda*B*z corresponding to the Ritz
c value approximations.
@@ -90,13 +90,13 @@ c LDZ Integer. (INPUT)
c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ). In any case, LDZ .ge. 1.
c
c SIGMA Double precision (INPUT)
c SIGMA Double precision (INPUT)
c If IPARAM(7) = 3,4,5 represents the shift. Not referenced if
c IPARAM(7) = 1 or 2.
c
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PDNAUPD that was just completed. ****
c **** call to PDNAUPD that was just completed. ****
c
c NOTE: The remaining arguments
c
@@ -109,7 +109,7 @@ c the the last call to PSSAUPD and the call to PSSEUPD.
c
c Two of these parameters (WORKL, INFO) are also output parameters:
c
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:4*ncv) contains information obtained in
c PSSAUPD. They are not changed by PSSEUPD.
c WORKL(4*ncv+1:ncv*ncv+8*ncv) holds the
@@ -136,7 +136,7 @@ c = -5: WHICH must be one of 'LM', 'SM', 'LA', 'SA' or 'BE'.
c = -6: BMAT must be one of 'I' or 'G'.
c = -7: Length of private work WORKL array is not sufficient.
c = -8: Error return from trid. eigenvalue calculation;
c Information error from LAPACK routine dsteqr .
c Information error from LAPACK routine dsteqr.
c = -9: Starting vector is zero.
c = -10: IPARAM(7) must be 1,2,3,4,5.
c = -11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.
@@ -145,11 +145,11 @@ c = -14: PSSAUPD did not find any eigenvalues to sufficient
c accuracy.
c = -15: HOWMNY must be one of 'A' or 'S' if RVEC = .true.
c = -16: HOWMNY = 'S' not yet implemented
c = -17: DSEUPD got a different count of the number of converged
c Ritz values than DSAUPD got. This indicates the user
c probably made an error in passing data from DSAUPD to
c DSEUPD or that the data was modified before entering
c DSEUPD .
c = -17: DSEUPD got a different count of the number of converged
c Ritz values than DSAUPD got. This indicates the user
c probably made an error in passing data from DSAUPD to
c DSEUPD or that the data was modified before entering
c DSEUPD.
c
c\BeginLib
c
@@ -182,24 +182,24 @@ c 2. Currently only HOWMNY = 'A' is implemented. It is included at this
c stage for the user who wants to incorporate it.
c
c\Routines called:
c dsesrt ARPACK routine that sorts an array X, and applies the
c dsesrt ARPACK routine that sorts an array X, and applies the
c corresponding permutation to a matrix A.
c dsortr dsortr ARPACK sorting routine.
c pdnorm2 Parallel ARPACK routine that computes the 2-norm of a vector.
c dsortr dsortr ARPACK sorting routine.
c pdnorm2 Parallel ARPACK routine that computes the 2-norm of a vector.
c pivout Parallel ARPACK utility routine that prints integers.
c pdvout Parallel ARPACK utility routine that prints vectors.
c dgeqr2 LAPACK routine that computes the QR factorization of
c pdvout Parallel ARPACK utility routine that prints vectors.
c dgeqr2 LAPACK routine that computes the QR factorization of
c a matrix.
c dlacpy LAPACK matrix copy routine.
c pdlamch ScaLAPACK routine that determines machine constants.
c dorm2r LAPACK routine that applies an orthogonal matrix in
c dlacpy LAPACK matrix copy routine.
c pdlamch ScaLAPACK routine that determines machine constants.
c dorm2r LAPACK routine that applies an orthogonal matrix in
c factored form.
c dsteqr LAPACK routine that computes eigenvalues and eigenvectors
c dsteqr LAPACK routine that computes eigenvalues and eigenvectors
c of a tridiagonal matrix.
c dger Level 2 BLAS rank one update to a matrix.
c dcopy Level 1 BLAS that copies one vector to another .
c dscal Level 1 BLAS that scales a vector.
c dswap Level 1 BLAS that swaps the contents of two vectors.
c dger Level 2 BLAS rank one update to a matrix.
c dcopy Level 1 BLAS that copies one vector to another .
c dscal Level 1 BLAS that scales a vector.
c dswap Level 1 BLAS that swaps the contents of two vectors.
c\Authors
c Danny Sorensen Phuong Vu
c Richard Lehoucq CRPC / Rice University
@@ -216,12 +216,12 @@ c\Revision history:
c Starting Point: Serial Code FILE: seupd.F SID: 2.4
c
c\SCCS Information:
c FILE: seupd.F SID: 1.10 DATE OF SID: 04/10/01
c FILE: seupd.F SID: 1.11 DATE OF SID: 10/25/03
c
c\EndLib
c
c-----------------------------------------------------------------------
subroutine pdseupd
subroutine pdseupd
& (comm , rvec , howmny, select, d ,
& z , ldz , sigma , bmat , n ,
& which , nev , tol , resid , ncv ,
@@ -229,7 +229,7 @@ c-----------------------------------------------------------------------
& workl , lworkl, info )
c
c %--------------------%
c | MPI Communicator |
c | MPI Communicator |
c %--------------------%
c
integer comm
@@ -248,7 +248,7 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Double precision
Double precision
& sigma, tol
c
c %-----------------%
@@ -257,7 +257,7 @@ c %-----------------%
c
integer iparam(7), ipntr(11)
logical select(ncv)
Double precision
Double precision
& d(nev), resid(n), v(ldv,ncv), z(ldz, nev),
& workd(2*n), workl(lworkl)
c
@@ -265,9 +265,9 @@ c %------------%
c | Parameters |
c %------------%
c
Double precision
Double precision
& one, zero
parameter (one = 1.0 , zero = 0.0 )
parameter (one = 1.0, zero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -279,7 +279,7 @@ c
& ldq , mode , msglvl, nconv , next ,
& ritz , irz , ibd , np , ishift,
& leftptr, rghtptr, numcnv, jj
Double precision
Double precision
& bnorm2, rnorm, temp, temp1, eps23
logical reord
c
@@ -287,16 +287,16 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external dcopy , dger , dgeqr2 , dlacpy , dorm2r , dscal ,
& dsesrt , dsteqr , dswap , pdvout , pivout, dsortr
external dcopy , dger , dgeqr2, dlacpy, dorm2r, dscal,
& dsesrt, dsteqr, dswap , pdvout, pivout, dsortr
c
c %--------------------%
c | External Functions |
c %--------------------%
c
Double precision
& pdnorm2 , pdlamch
external pdnorm2 , pdlamch
Double precision
& pdnorm2, pdlamch
external pdnorm2, pdlamch
c
c %---------------------%
c | Intrinsic Functions |
@@ -373,18 +373,18 @@ c | Memory is laid out as follows: |
c | workl(1:2*ncv) := generated tridiagonal matrix H |
c | The subdiagonal is stored in workl(2:ncv). |
c | The dead spot is workl(1) but upon exiting |
c | pdsaupd stores the B-norm of the last residual |
c | pdsaupd stores the B-norm of the last residual |
c | vector in workl(1). We use this !!! |
c | workl(2*ncv+1:2*ncv+ncv) := ritz values |
c | The wanted values are in the first NCONV spots. |
c | workl(3*ncv+1:3*ncv+ncv) := computed Ritz estimates |
c | The wanted values are in the first NCONV spots. |
c | NOTE: workl(1:4*ncv) is set by pdsaupd and is not |
c | modified by pdseupd . |
c | NOTE: workl(1:4*ncv) is set by pdsaupd and is not |
c | modified by pdseupd. |
c %-------------------------------------------------------%
c
c %-------------------------------------------------------%
c | The following is used and set by pdseupd . |
c | The following is used and set by pdseupd. |
c | workl(4*ncv+1:4*ncv+ncv) := used as workspace during |
c | computation of the eigenvectors of H. Stores |
c | the diagonal of H. Upon EXIT contains the NCV |
@@ -400,10 +400,10 @@ c | wanted values. If MODE = 1,2 then will equal |
c | workl(3*ncv+1:4*ncv). |
c | workl(6*ncv+1:6*ncv+ncv*ncv) := orthogonal Q that is |
c | the eigenvector matrix for H as returned by |
c | dsteqr . Not referenced if RVEC = .False. |
c | dsteqr. Not referenced if RVEC = .False. |
c | Ordering follows that of workl(4*ncv+1:5*ncv) |
c | workl(6*ncv+ncv*ncv+1:6*ncv+ncv*ncv+2*ncv) := |
c | Workspace. Needed by dsteqr and by pdseupd . |
c | Workspace. Needed by dsteqr and by pdseupd. |
c | GRAND total of NCV*(NCV+8) locations. |
c %-------------------------------------------------------%
c
@@ -439,13 +439,13 @@ c %---------------------------------%
c | Set machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | RNORM is B-norm of the RESID(1:N). |
c | BNORM2 is the 2 norm of B*RESID(1:N). |
c | Upon exit of pdsaupd WORKD(1:N) has |
c | Upon exit of pdsaupd WORKD(1:N) has |
c | B*RESID(1:N). |
c %---------------------------------------%
c
@@ -453,13 +453,13 @@ c
if (bmat .eq. 'I') then
bnorm2 = rnorm
else if (bmat .eq. 'G') then
bnorm2 = pdnorm2 (comm, n, workd, 1)
bnorm2 = pdnorm2(comm, n, workd, 1)
end if
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(irz), ndigit,
call pdvout(comm, logfil, ncv, workl(irz), ndigit,
& '_seupd: Ritz values passed in from _SAUPD.')
call pdvout (comm, logfil, ncv, workl(ibd), ndigit,
call pdvout(comm, logfil, ncv, workl(ibd), ndigit,
& '_seupd: Ritz estimates passed in from _SAUPD.')
end if
if (rvec) then
@@ -487,14 +487,14 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call pdsgets (comm , ishift, which ,
call pdsgets(comm , ishift, which ,
& nev , np , workl(irz),
& workl(bounds), workl , workl(np+1))
& workl(bounds), workl)
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(irz), ndigit,
call pdvout(comm, logfil, ncv, workl(irz), ndigit,
& '_seupd: Ritz values after calling _SGETS.')
call pdvout (comm, logfil, ncv, workl(bounds), ndigit,
call pdvout(comm, logfil, ncv, workl(bounds), ndigit,
& '_seupd: Ritz value indices after calling _SGETS.')
end if
c
@@ -540,10 +540,10 @@ c | eigenvectors of the final symmetric tridiagonal matrix H. |
c | Initialize the eigenvector matrix Q to the identity. |
c %-----------------------------------------------------------%
c
call dcopy (ncv-1, workl(ih+1) , 1, workl(ihb), 1)
call dcopy (ncv , workl(ih+ldh), 1, workl(ihd), 1)
call dcopy (ncv-1, workl(ih+1) , 1, workl(ihb), 1)
call dcopy (ncv , workl(ih+ldh), 1, workl(ihd), 1)
c
call dsteqr ('Identity', ncv , workl(ihd),
call dsteqr('Identity', ncv , workl(ihd),
& workl(ihb), workl(iq), ldq ,
& workl(iw) , ierr)
c
@@ -553,10 +553,10 @@ c
end if
c
if (msglvl .gt. 1) then
call dcopy (ncv, workl(iq+ncv-1), ldq, workl(iw), 1)
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
call dcopy (ncv, workl(iq+ncv-1), ldq, workl(iw), 1)
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
& '_seupd: NCV Ritz values of the final H matrix')
call pdvout (comm, logfil, ncv, workl(iw), ndigit,
call pdvout (comm, logfil, ncv, workl(iw), ndigit,
& '_seupd: last row of the eigenvector matrix for H')
end if
c
@@ -607,11 +607,11 @@ c
temp = workl(ihd+leftptr-1)
workl(ihd+leftptr-1) = workl(ihd+rghtptr-1)
workl(ihd+rghtptr-1) = temp
call dcopy (ncv, workl(iq+ncv*(leftptr-1)), 1,
call dcopy(ncv, workl(iq+ncv*(leftptr-1)), 1,
& workl(iw), 1)
call dcopy (ncv, workl(iq+ncv*(rghtptr-1)), 1,
call dcopy(ncv, workl(iq+ncv*(rghtptr-1)), 1,
& workl(iq+ncv*(leftptr-1)), 1)
call dcopy (ncv, workl(iw), 1,
call dcopy(ncv, workl(iw), 1,
& workl(iq+ncv*(rghtptr-1)), 1)
leftptr = leftptr + 1
rghtptr = rghtptr - 1
@@ -623,7 +623,7 @@ c
30 end if
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
call pdvout (comm, logfil, ncv, workl(ihd), ndigit,
& '_seupd: The eigenvalues of H--reordered')
end if
c
@@ -631,7 +631,7 @@ c %----------------------------------------%
c | Load the converged Ritz values into D. |
c %----------------------------------------%
c
call dcopy (nconv, workl(ihd), 1, d, 1)
call dcopy(nconv, workl(ihd), 1, d, 1)
c
else
c
@@ -639,8 +639,8 @@ c %-----------------------------------------------------%
c | Ritz vectors not required. Load Ritz values into D. |
c %-----------------------------------------------------%
c
call dcopy (nconv, workl(ritz), 1, d, 1)
call dcopy (ncv, workl(ritz), 1, workl(ihd), 1)
call dcopy(nconv, workl(ritz), 1, d, 1)
call dcopy(ncv, workl(ritz), 1, workl(ihd), 1)
c
end if
c
@@ -658,9 +658,9 @@ c | bounds. Not necessary if only Ritz values are desired. |
c %---------------------------------------------------------%
c
if (rvec) then
call dsesrt ('LA', rvec , nconv, d, ncv, workl(iq), ldq)
call dsesrt('LA', rvec , nconv, d, ncv, workl(iq), ldq)
else
call dcopy (ncv, workl(bounds), 1, workl(ihb), 1)
call dcopy(ncv, workl(bounds), 1, workl(ihb), 1)
end if
c
else
@@ -674,13 +674,13 @@ c | For TYPE = 'BUCKLE' the transformation is |
c | lambda = sigma * theta / ( theta - 1 ) |
c | For TYPE = 'CAYLEY' the transformation is |
c | lambda = sigma * (theta + 1) / (theta - 1 ) |
c | where the theta are the Ritz values returned by pdsaupd . |
c | where the theta are the Ritz values returned by pdsaupd. |
c | NOTES: |
c | *The Ritz vectors are not affected by the transformation. |
c | They are only reordered. |
c %-------------------------------------------------------------%
c
call dcopy (ncv, workl(ihd), 1, workl(iw), 1)
call dcopy (ncv, workl(ihd), 1, workl(iw), 1)
if (type .eq. 'SHIFTI') then
do 40 k=1, ncv
workl(ihd+k-1) = one / workl(ihd+k-1) + sigma
@@ -712,14 +712,14 @@ c | match the ordering of the lambda. We`ll use them again for |
c | Ritz vector purification. |
c %-------------------------------------------------------------%
c
call dcopy (nconv, workl(ihd), 1, d, 1)
call dsortr ('LA', .true., nconv, workl(ihd), workl(iw))
call dcopy (nconv, workl(ihd), 1, d, 1)
call dsortr('LA', .true., nconv, workl(ihd), workl(iw))
if (rvec) then
call dsesrt ('LA', rvec , nconv, d, ncv, workl(iq), ldq)
call dsesrt('LA', rvec , nconv, d, ncv, workl(iq), ldq)
else
call dcopy (ncv, workl(bounds), 1, workl(ihb), 1)
call dscal (ncv, bnorm2/rnorm, workl(ihb), 1)
call dsortr ('LA', .true., nconv, d, workl(ihb))
call dcopy(ncv, workl(bounds), 1, workl(ihb), 1)
call dscal(ncv, bnorm2/rnorm, workl(ihb), 1)
call dsortr('LA', .true., nconv, d, workl(ihb))
end if
c
end if
@@ -738,7 +738,7 @@ c | the wanted invariant subspace located in the first NCONV |
c | columns of workl(iq,ldq). |
c %----------------------------------------------------------%
c
call dgeqr2 (ncv, nconv , workl(iq) ,
call dgeqr2(ncv, nconv , workl(iq) ,
& ldq, workl(iw+ncv), workl(ihb),
& ierr)
c
@@ -750,11 +750,11 @@ c | of the approximate invariant subspace associated with |
c | the Ritz values in workl(ihd). |
c %--------------------------------------------------------%
c
call dorm2r ('Right' , 'Notranspose', n ,
call dorm2r('Right' , 'Notranspose', n ,
& ncv , nconv , workl(iq),
& ldq , workl(iw+ncv), v ,
& ldv , workd(n+1) , ierr )
call dlacpy ('All', n, nconv, v, ldv, z, ldz)
call dlacpy('All', n, nconv, v, ldv, z, ldz)
c
c %-----------------------------------------------------%
c | In order to compute the Ritz estimates for the Ritz |
@@ -766,7 +766,7 @@ c
workl(ihb+j-1) = zero
65 continue
workl(ihb+ncv-1) = one
call dorm2r ('Left', 'Transpose' , ncv ,
call dorm2r('Left', 'Transpose' , ncv ,
& 1 , nconv , workl(iq) ,
& ldq , workl(iw+ncv), workl(ihb),
& ncv , temp , ierr )
@@ -790,11 +790,11 @@ c | * Determine Ritz estimates of the theta. |
c | If RVEC = .true. then compute Ritz estimates |
c | of the theta. |
c | If RVEC = .false. then copy Ritz estimates |
c | as computed by pdsaupd . |
c | as computed by pdsaupd. |
c | * Determine Ritz estimates of the lambda. |
c %-------------------------------------------------%
c
call dscal (ncv, bnorm2, workl(ihb), 1)
call dscal (ncv, bnorm2, workl(ihb), 1)
if (type .eq. 'SHIFTI') then
c
do 80 k=1, ncv
@@ -821,14 +821,14 @@ c
end if
c
if (type .ne. 'REGULR' .and. msglvl .gt. 1) then
call pdvout (comm, logfil, nconv, d, ndigit,
call pdvout (comm, logfil, nconv, d, ndigit,
& '_seupd: Untransformed converged Ritz values')
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
& '_seupd: Ritz estimates of the untransformed Ritz values')
else if (msglvl .gt. 1) then
call pdvout (comm, logfil, nconv, d, ndigit,
call pdvout (comm, logfil, nconv, d, ndigit,
& '_seupd: Converged Ritz values')
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
call pdvout (comm, logfil, nconv, workl(ihb), ndigit,
& '_seupd: Associated Ritz estimates')
end if
c
@@ -855,14 +855,14 @@ c
end if
c
if (type .ne. 'REGULR')
& call dger (n, nconv, one, resid, 1, workl(iw), 1, z, ldz)
& call dger(n, nconv, one, resid, 1, workl(iw), 1, z, ldz)
c
9000 continue
c
return
c
c %----------------%
c | End of pdseupd |
c | End of pdseupd |
c %----------------%
c
end
+16 -16
View File
@@ -2,7 +2,7 @@ c\BeginDoc
c
c\Name: psseupd
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c
@@ -46,7 +46,7 @@ c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, BMAT, N, WHICH, NEV, TOL,
c RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD, WORKL, LWORKL, INFO )
c
c\Arguments
c COMM MPI Communicator for the processor grid. (INPUT)
c COMM MPI Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether Ritz vectors corresponding to the Ritz value
@@ -69,7 +69,7 @@ c computed. To select the Ritz vector corresponding to a
c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' , SELECT is used as workspace.
c
c D Real array of dimension NEV. (OUTPUT)
c D Real array of dimension NEV. (OUTPUT)
c On exit, D contains the Ritz value approximations to the
c eigenvalues of A*z = lambda*B*z. The values are returned
c in ascending order. If IPARAM(7) = 3,4,5 then D represents
@@ -78,7 +78,7 @@ c those of the original eigensystem A*z = lambda*B*z. If
c IPARAM(7) = 1,2 then the Ritz values of OP are the same
c as the those of A*z = lambda*B*z.
c
c Z Real N by NEV array if HOWMNY = 'A'. (OUTPUT)
c Z Real N by NEV array if HOWMNY = 'A'. (OUTPUT)
c On exit, Z contains the B-orthonormal Ritz vectors of the
c eigensystem A*z = lambda*B*z corresponding to the Ritz
c value approximations.
@@ -90,7 +90,7 @@ c LDZ Integer. (INPUT)
c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ). In any case, LDZ .ge. 1.
c
c SIGMA Real (INPUT)
c SIGMA Real (INPUT)
c If IPARAM(7) = 3,4,5 represents the shift. Not referenced if
c IPARAM(7) = 1 or 2.
c
@@ -109,7 +109,7 @@ c the the last call to PSSAUPD and the call to PSSEUPD.
c
c Two of these parameters (WORKL, INFO) are also output parameters:
c
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:4*ncv) contains information obtained in
c PSSAUPD. They are not changed by PSSEUPD.
c WORKL(4*ncv+1:ncv*ncv+8*ncv) holds the
@@ -216,7 +216,7 @@ c\Revision history:
c Starting Point: Serial Code FILE: seupd.F SID: 2.4
c
c\SCCS Information:
c FILE: seupd.F SID: 1.10 DATE OF SID: 04/10/01
c FILE: seupd.F SID: 1.11 DATE OF SID: 10/25/03
c
c\EndLib
c
@@ -229,7 +229,7 @@ c-----------------------------------------------------------------------
& workl , lworkl, info )
c
c %--------------------%
c | MPI Communicator |
c | MPI Communicator |
c %--------------------%
c
integer comm
@@ -248,7 +248,7 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Real
Real
& sigma, tol
c
c %-----------------%
@@ -257,7 +257,7 @@ c %-----------------%
c
integer iparam(7), ipntr(11)
logical select(ncv)
Real
Real
& d(nev), resid(n), v(ldv,ncv), z(ldz, nev),
& workd(2*n), workl(lworkl)
c
@@ -265,9 +265,9 @@ c %------------%
c | Parameters |
c %------------%
c
Real
Real
& one, zero
parameter (one = 1.0 , zero = 0.0 )
parameter (one = 1.0, zero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -279,7 +279,7 @@ c
& ldq , mode , msglvl, nconv , next ,
& ritz , irz , ibd , np , ishift,
& leftptr, rghtptr, numcnv, jj
Real
Real
& bnorm2, rnorm, temp, temp1, eps23
logical reord
c
@@ -294,7 +294,7 @@ c %--------------------%
c | External Functions |
c %--------------------%
c
Real
Real
& psnorm2, pslamch
external psnorm2, pslamch
c
@@ -440,7 +440,7 @@ c | Set machine dependent constant. |
c %---------------------------------%
c
eps23 = pslamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | RNORM is B-norm of the RESID(1:N). |
@@ -489,7 +489,7 @@ c
ishift = 0
call pssgets(comm , ishift, which ,
& nev , np , workl(irz),
& workl(bounds), workl , workl(np+1))
& workl(bounds), workl)
c
if (msglvl .gt. 2) then
call psvout(comm, logfil, ncv, workl(irz), ndigit,
+3 -3
View File
@@ -127,7 +127,7 @@ c\Revision history:
c Starting Point: Serial Complex Code FILE: napps.F SID: 2.1
c
c\SCCS Information:
c FILE: napps.F SID: 1.3 DATE OF SID: 06/04/98
c FILE: napps.F SID: 1.4 DATE OF SID: 10/25/03
c
c\Remarks
c 1. In this version, each shift is applied to all the sublocks of
@@ -243,10 +243,10 @@ c | overflow should not occur. |
c | REFERENCE: LAPACK subroutine zlahqr |
c %-----------------------------------------------%
c
unfl = dlamch( 'safe minimum' )
unfl = pdlamch( comm, 'safe minimum' )
ovfl = dble(one / unfl)
call dlabad( unfl, ovfl )
ulp = dlamch( 'precision' )
ulp = pdlamch( comm, 'precision' )
smlnum = unfl*( n / ulp )
first = .false.
end if
+98 -99
View File
@@ -1,22 +1,22 @@
c\BeginDoc
c
c\Name: pznaup2
c\Name: pznaup2
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c Intermediate level interface called by pznaupd .
c Intermediate level interface called by pznaupd.
c
c\Usage:
c call pznaup2
c call pznaup2
c ( COMM, IDO, BMAT, N, WHICH, NEV, NP, TOL, RESID, MODE, IUPD,
c ISHIFT, MXITER, V, LDV, H, LDH, RITZ, BOUNDS,
c Q, LDQ, WORKL, IPNTR, WORKD, RWORK, INFO )
c
c\Arguments
c
c COMM, IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in pznaupd .
c MODE, ISHIFT, MXITER: see the definition of IPARAM in pznaupd .
c COMM, IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in pznaupd.
c MODE, ISHIFT, MXITER: see the definition of IPARAM in pznaupd.
c
c NP Integer. (INPUT/OUTPUT)
c Contains the number of implicit shifts to apply during
@@ -39,7 +39,7 @@ c IUPD Integer. (INPUT)
c IUPD .EQ. 0: use explicit restart instead implicit update.
c IUPD .NE. 0: use implicit update.
c
c V Complex*16 N by (NEV+NP) array. (INPUT/OUTPUT)
c V Complex*16 N by (NEV+NP) array. (INPUT/OUTPUT)
c The Arnoldi basis vectors are returned in the first NEV
c columns of V.
c
@@ -47,21 +47,21 @@ c LDV Integer. (INPUT)
c Leading dimension of V exactly as declared in the calling
c program.
c
c H Complex*16 (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H Complex*16 (NEV+NP) by (NEV+NP) array. (OUTPUT)
c H is used to store the generated upper Hessenberg matrix
c
c LDH Integer. (INPUT)
c Leading dimension of H exactly as declared in the calling
c program.
c
c RITZ Complex*16 array of length NEV+NP. (OUTPUT)
c RITZ Complex*16 array of length NEV+NP. (OUTPUT)
c RITZ(1:NEV) contains the computed Ritz values of OP.
c
c BOUNDS Complex*16 array of length NEV+NP. (OUTPUT)
c BOUNDS Complex*16 array of length NEV+NP. (OUTPUT)
c BOUNDS(1:NEV) contain the error bounds corresponding to
c the computed Ritz values.
c
c Q Complex*16 (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Q Complex*16 (NEV+NP) by (NEV+NP) array. (WORKSPACE)
c Private (replicated) work array used to accumulate the
c rotation in the shift application step.
c
@@ -69,7 +69,7 @@ c LDQ Integer. (INPUT)
c Leading dimension of Q exactly as declared in the calling
c program.
c
c WORKL Complex*16 work array of length at least
c WORKL Complex*16 work array of length at least
c (NEV+NP)**2 + 3*(NEV+NP). (WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end. It is used in shifts calculation, shifts
@@ -86,13 +86,13 @@ c IPNTR(3): pointer to the vector B * X when used in the
c shift-and-invert mode. X is the current operand.
c -------------------------------------------------------------
c
c WORKD Complex*16 work array of length 3*N. (WORKSPACE)
c WORKD Complex*16 work array of length 3*N. (WORKSPACE)
c Distributed array to be used in the basic Arnoldi iteration
c for reverse communication. The user should not use WORKD
c as temporary workspace during the iteration !!!!!!!!!!
c See Data Distribution Note in PZNAUPD .
c See Data Distribution Note in PZNAUPD.
c
c RWORK Double precision work array of length NEV+NP ( WORKSPACE)
c RWORK Double precision work array of length NEV+NP ( WORKSPACE)
c Private (replicated) array on each PE or array allocated on
c the front end.
c
@@ -119,7 +119,7 @@ c
c\BeginLib
c
c\Local variables:
c xxxxxx Complex*16
c xxxxxx Complex*16
c
c\References:
c 1. D.C. Sorensen, "Implicit Application of Polynomial Filters in
@@ -130,23 +130,23 @@ c Restarted Arnoldi Iteration", Rice University Technical Report
c TR95-13, Department of Computational and Applied Mathematics.
c
c\Routines called:
c pzgetv0 Parallel ARPACK initial vector generation routine.
c pznaitr Parallel ARPACK Arnoldi factorization routine.
c pznapps Parallel ARPACK application of implicit shifts routine.
c pzneigh Parallel ARPACK compute Ritz values and error bounds routine.
c pzngets Parallel ARPACK reorder Ritz values and error bounds routine.
c zsortc ARPACK sorting routine.
c pzgetv0 Parallel ARPACK initial vector generation routine.
c pznaitr Parallel ARPACK Arnoldi factorization routine.
c pznapps Parallel ARPACK application of implicit shifts routine.
c pzneigh Parallel ARPACK compute Ritz values and error bounds routine.
c pzngets Parallel ARPACK reorder Ritz values and error bounds routine.
c zsortc ARPACK sorting routine.
c pivout Parallel ARPACK utility routine that prints integers.
c second ARPACK utility routine for timing.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c pdvout ARPACK utility routine that prints vectors.
c pdlamch ScaLAPACK routine that determines machine constants.
c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c zcopy Level 1 BLAS that copies one vector to another .
c zdotc Level 1 BLAS that computes the scalar product of two vectors.
c zswap Level 1 BLAS that swaps two vectors.
c pdznorm2 Parallel version of Level 1 BLAS that computes the norm of a vector.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c pdvout ARPACK utility routine that prints vectors.
c pdlamch ScaLAPACK routine that determines machine constants.
c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c zcopy Level 1 BLAS that copies one vector to another .
c zdotc Level 1 BLAS that computes the scalar product of two vectors.
c zswap Level 1 BLAS that swaps two vectors.
c pdznorm2 Parallel version of Level 1 BLAS that computes the norm of a vector.
c
c\Author
c Danny Sorensen Phuong Vu
@@ -156,7 +156,7 @@ c Applied Mathematics
c Rice University
c Houston, Texas
c
c FILE: naup2.F SID: 1.6 DATE OF SID: 06/01/00 RELEASE: 1
c FILE: naup2.F SID: 1.7 DATE OF SID: 10/25/03 RELEASE: 1
c
c\Remarks
c 1. None
@@ -165,7 +165,7 @@ c\EndLib
c
c-----------------------------------------------------------------------
c
subroutine pznaup2
subroutine pznaup2
& ( comm, ido, bmat, n, which, nev, np, tol, resid, mode, iupd,
& ishift, mxiter, v, ldv, h, ldh, ritz, bounds,
& q, ldq, workl, ipntr, workd, rwork, info )
@@ -192,7 +192,7 @@ c
character bmat*1, which*2
integer ido, info, ishift, iupd, mode, ldh, ldq, ldv, mxiter,
& n, nev, np
Double precision
Double precision
& tol
c
c %-----------------%
@@ -200,23 +200,23 @@ c | Array Arguments |
c %-----------------%
c
integer ipntr(13)
Complex*16
Complex*16
& bounds(nev+np), h(ldh,nev+np), q(ldq,nev+np),
& resid(n), ritz(nev+np), v(ldv,nev+np),
& workd(3*n), workl( (nev+np)*(nev+np+3) )
Double precision
Double precision
& rwork(nev+np)
c
c %------------%
c | Parameters |
c %------------%
c
Complex*16
Complex*16
& one, zero
Double precision
Double precision
& rzero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) ,
& rzero = 0.0 )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0),
& rzero = 0.0)
c
c %---------------%
c | Local Scalars |
@@ -226,9 +226,9 @@ c
integer ierr , iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0 , nptemp, i ,
& j
Complex*16
Complex*16
& cmpnorm
Double precision
Double precision
& rnorm, eps23, rtemp
character wprime*2
c
@@ -236,8 +236,7 @@ c
& rnorm, iter , kplusp, msglvl, nconv,
& nevbef, nev0 , np0, eps23
c
Double precision
Double precision
& cmpnorm_buf
c
c %-----------------------%
@@ -250,24 +249,24 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external zcopy , pzgetv0 , pznaitr , pzneigh , pzngets , pznapps ,
& zsortc , zswap , pzmout , pzvout , pivout, second
external zcopy, pzgetv0, pznaitr, pzneigh, pzngets, pznapps,
& zsortc, zswap, pzmout, pzvout, pivout, second
c
c %--------------------%
c | External functions |
c %--------------------%
c
Complex*16
& zdotc
Double precision
& pdznorm2 , pdlamch , dlapy2
external zdotc , pdznorm2 , pdlamch , dlapy2
Complex*16
& zdotc
Double precision
& pdznorm2, pdlamch, dlapy2
external zdotc, pdznorm2, pdlamch, dlapy2
c
c %---------------------%
c | Intrinsic Functions |
c %---------------------%
c
intrinsic dimag , dble , min, max, sqrt
intrinsic dimag, dble, min, max, sqrt
c
c %-----------------------%
c | Executable Statements |
@@ -299,8 +298,8 @@ c %---------------------------------%
c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %---------------------------------------%
c | Set flags for computing the first NEV |
@@ -333,7 +332,7 @@ c
10 continue
c
if (getv0) then
call pzgetv0 (comm, ido, bmat, 1, initv, n, 1, v, ldv,
call pzgetv0 (comm, ido, bmat, 1, initv, n, 1, v, ldv,
& resid, rnorm, ipntr, workd, workl, info)
c
if (ido .ne. 99) go to 9000
@@ -375,7 +374,7 @@ c %----------------------------------------------------------%
c | Compute the first NEV steps of the Arnoldi factorization |
c %----------------------------------------------------------%
c
call pznaitr (comm, ido, bmat, n, 0, nev, mode,
call pznaitr (comm, ido, bmat, n, 0, nev, mode,
& resid, rnorm, v, ldv,
& h, ldh, ipntr, workd, workl, info)
c
@@ -409,7 +408,7 @@ c
c %-----------------------------------------------------------%
c | Compute NP additional steps of the Arnoldi factorization. |
c | Adjust NP since NEV might have been updated by last call |
c | to the shift application routine pznapps . |
c | to the shift application routine pznapps. |
c %-----------------------------------------------------------%
c
np = kplusp - nev
@@ -429,7 +428,7 @@ c
20 continue
update = .true.
c
call pznaitr (comm, ido, bmat, n, nev, np, mode,
call pznaitr (comm, ido, bmat, n, nev, np, mode,
& resid, rnorm, v, ldv,
& h, ldh, ipntr, workd, workl, info)
c
@@ -444,7 +443,7 @@ c
update = .false.
c
if (msglvl .gt. 1) then
call pdvout (comm, logfil, 1, rnorm, ndigit,
call pdvout (comm, logfil, 1, rnorm, ndigit,
& '_naup2: Corresponding B-norm of the residual')
end if
c
@@ -453,7 +452,7 @@ c | Compute the eigenvalues and corresponding error bounds |
c | of the current upper Hessenberg matrix. |
c %--------------------------------------------------------%
c
call pzneigh ( comm, rnorm, kplusp, h, ldh, ritz, bounds,
call pzneigh ( comm, rnorm, kplusp, h, ldh, ritz, bounds,
& q, ldq, workl, rwork, ierr)
c
if (ierr .ne. 0) then
@@ -474,11 +473,11 @@ c
c
c %--------------------------------------------------%
c | Make a copy of Ritz values and the corresponding |
c | Ritz estimates obtained from pzneigh . |
c | Ritz estimates obtained from pzneigh. |
c %--------------------------------------------------%
c
call zcopy (kplusp,ritz,1,workl(kplusp**2+1),1)
call zcopy (kplusp,bounds,1,workl(kplusp**2+kplusp+1),1)
call zcopy(kplusp,ritz,1,workl(kplusp**2+1),1)
call zcopy(kplusp,bounds,1,workl(kplusp**2+kplusp+1),1)
c
c %---------------------------------------------------%
c | Select the wanted Ritz values and their bounds |
@@ -488,7 +487,7 @@ c | bounds are in the last NEV loc. of RITZ |
c | BOUNDS respectively. |
c %---------------------------------------------------%
c
call pzngets ( comm, ishift, which, nev, np, ritz,
call pzngets ( comm, ishift, which, nev, np, ritz,
& bounds)
c
c %------------------------------------------------------------%
@@ -503,9 +502,9 @@ c
nconv = 0
c
do 25 i = 1, nev
rtemp = max( eps23, dlapy2 ( dble (ritz(np+i)),
& dimag (ritz(np+i)) ) )
if ( dlapy2 (dble (bounds(np+i)),dimag (bounds(np+i)))
rtemp = max( eps23, dlapy2( dble(ritz(np+i)),
& dimag(ritz(np+i)) ) )
if ( dlapy2(dble(bounds(np+i)),dimag(bounds(np+i)))
& .le. tol*rtemp ) then
nconv = nconv + 1
end if
@@ -517,9 +516,9 @@ c
kp(3) = nconv
call pivout (comm, logfil, 3, kp, ndigit,
& '_naup2: NEV, NP, NCONV are')
call pzvout (comm, logfil, kplusp, ritz, ndigit,
call pzvout (comm, logfil, kplusp, ritz, ndigit,
& '_naup2: The eigenvalues of H')
call pzvout (comm, logfil, kplusp, bounds, ndigit,
call pzvout (comm, logfil, kplusp, bounds, ndigit,
& '_naup2: Ritz estimates of the current NCV Ritz values')
end if
c
@@ -546,10 +545,10 @@ c
& (np .eq. 0) ) then
c
if (msglvl .gt. 4) then
call pzvout (comm, logfil, kplusp,
call pzvout(comm, logfil, kplusp,
& workl(kplusp**2+1), ndigit,
& '_naup2: Eigenvalues computed by _neigh:')
call pzvout (comm, logfil, kplusp,
call pzvout(comm, logfil, kplusp,
& workl(kplusp**2+kplusp+1), ndigit,
& '_naup2: Ritz eistmates computed by _neigh:')
end if
@@ -563,10 +562,10 @@ c %------------------------------------------------%
c
c %------------------------------------------%
c | Use h( 3,1 ) as storage to communicate |
c | rnorm to pzneupd if needed |
c | rnorm to pzneupd if needed |
c %------------------------------------------%
c
h(3,1) = dcmplx (rnorm,rzero)
h(3,1) = dcmplx(rnorm,rzero)
c
c %----------------------------------------------%
c | Sort Ritz values so that converged Ritz |
@@ -582,7 +581,7 @@ c
if (which .eq. 'LI') wprime = 'SI'
if (which .eq. 'SI') wprime = 'LI'
c
call zsortc (wprime, .true., kplusp, ritz, bounds)
call zsortc(wprime, .true., kplusp, ritz, bounds)
c
c %--------------------------------------------------%
c | Scale the Ritz estimate of each Ritz value |
@@ -590,8 +589,8 @@ c | by 1 / max(eps23, magnitude of the Ritz value). |
c %--------------------------------------------------%
c
do 35 j = 1, nev0
rtemp = max( eps23, dlapy2 ( dble (ritz(j)),
& dimag (ritz(j)) ) )
rtemp = max( eps23, dlapy2( dble(ritz(j)),
& dimag(ritz(j)) ) )
bounds(j) = bounds(j)/rtemp
35 continue
c
@@ -603,7 +602,7 @@ c | when NCONV < NEV.) |
c %---------------------------------------------------%
c
wprime = 'LM'
call zsortc (wprime, .true., nev0, bounds, ritz)
call zsortc(wprime, .true., nev0, bounds, ritz)
c
c %----------------------------------------------%
c | Scale the Ritz estimate back to its original |
@@ -611,8 +610,8 @@ c | value. |
c %----------------------------------------------%
c
do 40 j = 1, nev0
rtemp = max( eps23, dlapy2 ( dble (ritz(j)),
& dimag (ritz(j)) ) )
rtemp = max( eps23, dlapy2( dble(ritz(j)),
& dimag(ritz(j)) ) )
bounds(j) = bounds(j)*rtemp
40 continue
c
@@ -622,12 +621,12 @@ c | the "threshold" value appears at the front of |
c | ritz and bound. |
c %-----------------------------------------------%
c
call zsortc (which, .true., nconv, ritz, bounds)
call zsortc(which, .true., nconv, ritz, bounds)
c
if (msglvl .gt. 1) then
call pzvout (comm, logfil, kplusp, ritz, ndigit,
call pzvout (comm, logfil, kplusp, ritz, ndigit,
& '_naup2: Sorted eigenvalues')
call pzvout (comm, logfil, kplusp, bounds, ndigit,
call pzvout (comm, logfil, kplusp, bounds, ndigit,
& '_naup2: Sorted ritz estimates.')
end if
c
@@ -669,7 +668,7 @@ c | resort the eigenvalues. |
c %---------------------------------------%
c
if (nevbef .lt. nev)
& call pzngets (comm, ishift, which, nev, np, ritz,
& call pzngets (comm, ishift, which, nev, np, ritz,
& bounds)
c
end if
@@ -682,9 +681,9 @@ c
kp(2) = np
call pivout (comm, logfil, 2, kp, ndigit,
& '_naup2: NEV and NP are')
call pzvout (comm, logfil, nev, ritz(np+1), ndigit,
call pzvout (comm, logfil, nev, ritz(np+1), ndigit,
& '_naup2: "wanted" Ritz values ')
call pzvout (comm, logfil, nev, bounds(np+1), ndigit,
call pzvout (comm, logfil, nev, bounds(np+1), ndigit,
& '_naup2: Ritz estimates of the "wanted" values ')
end if
end if
@@ -711,16 +710,16 @@ c | RITZ, to free up WORKL |
c | for non-exact shift case. |
c %----------------------------------%
c
call zcopy (np, workl, 1, ritz, 1)
call zcopy (np, workl, 1, ritz, 1)
end if
c
if (msglvl .gt. 2) then
call pivout (comm, logfil, 1, np, ndigit,
& '_naup2: The number of shifts to apply ')
call pzvout (comm, logfil, np, ritz, ndigit,
call pzvout (comm, logfil, np, ritz, ndigit,
& '_naup2: values of the shifts')
if ( ishift .eq. 1 )
& call pzvout (comm, logfil, np, bounds, ndigit,
& call pzvout (comm, logfil, np, bounds, ndigit,
& '_naup2: Ritz estimates of the shifts')
end if
c
@@ -731,20 +730,20 @@ c | matrix H. |
c | The first 2*N locations of WORKD are used as workspace. |
c %---------------------------------------------------------%
c
call pznapps (comm, n, nev, np, ritz, v, ldv,
call pznapps(comm, n, nev, np, ritz, v, ldv,
& h, ldh, resid, q, ldq, workl, workd)
c
c %---------------------------------------------%
c | Compute the B-norm of the updated residual. |
c | Keep B*RESID in WORKD(1:N) to be used in |
c | the first step of the next call to pznaitr . |
c | the first step of the next call to pznaitr. |
c %---------------------------------------------%
c
cnorm = .true.
call second (t2)
if (bmat .eq. 'G') then
nbx = nbx + 1
call zcopy (n, resid, 1, workd(n+1), 1)
call zcopy (n, resid, 1, workd(n+1), 1)
ipntr(1) = n + 1
ipntr(2) = 1
ido = 2
@@ -755,7 +754,7 @@ c %----------------------------------%
c
go to 9000
else if (bmat .eq. 'I') then
call zcopy (n, resid, 1, workd, 1)
call zcopy (n, resid, 1, workd, 1)
end if
c
100 continue
@@ -771,19 +770,19 @@ c
end if
c
if (bmat .eq. 'G') then
cmpnorm_buf = zdotc (n, resid, 1, workd, 1)
cmpnorm_buf = zdotc (n, resid, 1, workd, 1)
call MPI_ALLREDUCE( cmpnorm_buf, cmpnorm, 1,
& MPI_DOUBLE_COMPLEX , MPI_SUM, comm, ierr )
rnorm = sqrt(dlapy2 (dble (cmpnorm),dimag (cmpnorm)))
& MPI_DOUBLE_COMPLEX, MPI_SUM, comm, ierr )
rnorm = sqrt(dlapy2(dble(cmpnorm),dimag(cmpnorm)))
else if (bmat .eq. 'I') then
rnorm = pdznorm2 (comm, n, resid, 1)
rnorm = pdznorm2(comm, n, resid, 1)
end if
cnorm = .false.
c
if (msglvl .gt. 2) then
call pdvout (comm, logfil, 1, rnorm, ndigit,
call pdvout (comm, logfil, 1, rnorm, ndigit,
& '_naup2: B-norm of residual for compressed factorization')
call pzmout (comm, logfil, nev, nev, h, ldh, ndigit,
call pzmout (comm, logfil, nev, nev, h, ldh, ndigit,
& '_naup2: Compressed upper Hessenberg matrix H')
end if
c
@@ -813,7 +812,7 @@ c
9000 continue
c
c %----------------%
c | End of pznaup2 |
c | End of pznaup2 |
c %----------------%
c
return
+126 -126
View File
@@ -1,8 +1,8 @@
c\BeginDoc
c
c\Name: pzneupd
c\Name: pzneupd
c
c Message Passing Layer: MPI
c Message Passing Layer: MPI
c
c\Description:
c This subroutine returns the converged approximations to eigenvalues
@@ -22,7 +22,7 @@ c
c The approximate eigenvalues and eigenvectors of A*z = lambda*B*z
c are derived from approximate eigenvalues and eigenvectors of
c of the linear operator OP prescribed by the MODE selection in the
c call to PZNAUPD . PZNAUPD must be called before this routine is called.
c call to PZNAUPD. PZNAUPD must be called before this routine is called.
c These approximate eigenvalues and vectors are commonly called Ritz
c values and Ritz vectors respectively. They are referred to as such
c in the comments that follow. The computed orthonormal basis for the
@@ -31,18 +31,18 @@ c Schur basis.
c
c The definition of OP as well as other terms and the relation of computed
c Ritz values and vectors of OP with respect to the given problem
c A*z = lambda*B*z may be found in the header of PZNAUPD . For a brief
c A*z = lambda*B*z may be found in the header of PZNAUPD. For a brief
c description, see definitions of IPARAM(7), MODE and WHICH in the
c documentation of PZNAUPD .
c documentation of PZNAUPD.
c
c\Usage:
c call pzneupd
c call pzneupd
c ( COMM, RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, WORKEV, BMAT,
c N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD,
c WORKL, LWORKL, RWORK, INFO )
c
c\Arguments
c COMM MPI Communicator for the processor grid. (INPUT)
c COMM MPI Communicator for the processor grid. (INPUT)
c
c RVEC LOGICAL (INPUT)
c Specifies whether a basis for the invariant subspace corresponding
@@ -70,11 +70,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex*16 N by NEV array (OUTPUT)
c Z Complex*16 N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -84,7 +84,7 @@ c If RVEC = .FALSE. or HOWMNY = 'P', then Z is NOT REFERENCED.
c
c NOTE: If if RVEC = .TRUE. and a Schur basis is not required,
c the array Z may be set equal to first NEV+1 columns of the Arnoldi
c basis array V computed by PZNAUPD . In this case the Arnoldi basis
c basis array V computed by PZNAUPD. In this case the Arnoldi basis
c will be destroyed and overwritten with the eigenvector basis.
c
c LDZ Integer. (INPUT)
@@ -92,30 +92,30 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex*16 (INPUT)
c SIGMA Complex*16 (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to PZNAUPD that was just completed. ****
c **** call to PZNAUPD that was just completed. ****
c
c NOTE: The remaining arguments
c
c BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR,
c WORKD, WORKL, LWORKL, RWORK, INFO
c
c must be passed directly to ZNEUPD following the last call
c to PZNAUPD . These arguments MUST NOT BE MODIFIED between
c the the last call to PZNAUPD and the call to ZNEUPD .
c must be passed directly to ZNEUPD following the last call
c to PZNAUPD. These arguments MUST NOT BE MODIFIED between
c the the last call to PZNAUPD and the call to ZNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by PZNAUPD .
c vectors for OP as constructed by PZNAUPD .
c
c Upon OUTPUT: If RVEC = .TRUE. the first NCONV=IPARAM(5) columns
c contain approximate Schur vectors that span the
@@ -128,16 +128,16 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c PZNAUPD . They are not changed by PZNEUPD .
c PZNAUPD. They are not changed by PZNEUPD.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
c untransformed Ritz values, the untransformed error estimates of
c the Ritz values, the upper triangular matrix for H, and the
c associated matrix representation of the invariant subspace for H.
c
c Note: IPNTR(9:13) contains the pointer into WORKL for addresses
c of the above information computed by PZNEUPD .
c of the above information computed by PZNEUPD.
c -------------------------------------------------------------
c IPNTR(9): pointer to the NCV RITZ values of the
c original system.
@@ -147,7 +147,7 @@ c IPNTR(12): pointer to the NCV by NCV upper triangular
c Schur matrix for H.
c IPNTR(13): pointer to the NCV by NCV matrix of eigenvectors
c of the upper Hessenberg matrix H. Only referenced by
c PZNEUPD if RVEC = .TRUE. See Remark 2 below.
c PZNEUPD if RVEC = .TRUE. See Remark 2 below.
c -------------------------------------------------------------
c
c INFO Integer. (OUTPUT)
@@ -155,8 +155,8 @@ c Error flag on output.
c = 0: Normal exit.
c
c = 1: The Schur form computed by LAPACK routine csheqr
c could not be reordered by LAPACK routine ztrsen .
c Re-enter subroutine pzneupd with IPARAM(5)=NCV and
c could not be reordered by LAPACK routine ztrsen.
c Re-enter subroutine pzneupd with IPARAM(5)=NCV and
c increase the size of the array D to have
c dimension at least dimension NCV and allocate at least NCV
c columns for Z. NOTE: Not necessary if Z and V share
@@ -172,18 +172,18 @@ c = -7: Length of private work WORKL array is not sufficient.
c = -8: Error return from LAPACK eigenvalue calculation.
c This should never happened.
c = -9: Error return from calculation of eigenvectors.
c Informational error from LAPACK routine ztrevc .
c Informational error from LAPACK routine ztrevc.
c = -10: IPARAM(7) must be 1,2,3
c = -11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.
c = -12: HOWMNY = 'S' not yet implemented
c = -13: HOWMNY must be one of 'A' or 'P' if RVEC = .true.
c = -14: PZNAUPD did not find any eigenvalues to sufficient
c = -14: PZNAUPD did not find any eigenvalues to sufficient
c accuracy.
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD .
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD.
c
c\BeginLib
c
@@ -200,26 +200,26 @@ c Vol. 48, No. 178, April, 1987 pp. 664-673.
c
c\Routines called:
c pivout Parallel ARPACK utility routine that prints integers.
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c pzmout Parallel ARPACK utility routine that prints matrices
c pzvout Parallel ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c a matrix.
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c upper Hessenberg matrix.
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c in upper triangular form.
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c factored form.
c pdlamch ScaLAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c pdlamch ScaLAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c
c\Remarks
c
@@ -249,12 +249,12 @@ c\Revision history:
c Starting Point: Complex Serial Code FILE: neupd.F SID: 2.2
c
c\SCCS Information:
c FILE: neupd.F SID: 1.6 DATE OF SID: 04/10/01
c FILE: neupd.F SID: 1.9 DATE OF SID: 10/25/03
c
c\EndLib
c
c-----------------------------------------------------------------------
subroutine pzneupd
subroutine pzneupd
& ( comm , rvec , howmny, select, d ,
& z , ldz , sigma , workev, bmat ,
& n , which , nev , tol , resid,
@@ -262,7 +262,7 @@ c-----------------------------------------------------------------------
& workd, workl , lworkl, rwork , info )
c
c %--------------------%
c | MPI Communicator |
c | MPI Communicator |
c %--------------------%
c
integer comm
@@ -281,9 +281,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex*16
Complex*16
& sigma
Double precision
Double precision
& tol
c
c %-----------------%
@@ -292,9 +292,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Double precision
Double precision
& rwork(ncv)
Complex*16
Complex*16
& d(nev) , resid(n) , v(ldv,ncv) ,
& z(ldz, nev), workd(3*n), workl(lworkl),
& workev(2*ncv)
@@ -303,9 +303,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex*16
Complex*16
& one, zero
parameter (one = (1.0, 0.0) , zero = (0.0, 0.0) )
parameter (one = (1.0, 0.0), zero = (0.0, 0.0))
c
c %---------------%
c | Local Scalars |
@@ -317,9 +317,9 @@ c
& mode , msglvl, ritz , wr , k , irz ,
& ibd , outncv, iq , np , numcnv, jj ,
& ishift
Complex*16
Complex*16
& rnorm, temp, vl(1)
Double precision
Double precision
& conds, sep, rtemp, eps23
logical reord
c
@@ -327,21 +327,21 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external zcopy ,zgeru ,zgeqr2 ,zlacpy ,pzmout ,
& zunm2r ,ztrmm ,pzvout ,pivout,
& zlahqr
external zcopy ,zgeru,zgeqr2,zlacpy,pzmout,
& zunm2r,ztrmm,pzvout,pivout,
& zlahqr
c
c %--------------------%
c | External Functions |
c %--------------------%
c
Double precision
& dznrm2 ,pdlamch ,dlapy2
external dznrm2 ,pdlamch ,dlapy2
Double precision
& dznrm2,pdlamch,dlapy2
external dznrm2,pdlamch,dlapy2
c
Complex*16
& zdotc
external zdotc
Complex*16
& zdotc
external zdotc
c
c %---------------------%
c | Intrinsic Functions |
@@ -367,8 +367,8 @@ c %---------------------------------%
c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = pdlamch (comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0 )
eps23 = pdlamch(comm, 'Epsilon-Machine')
eps23 = eps23**(2.0 / 3.0)
c
c %-------------------------------%
c | Quick return |
@@ -433,7 +433,7 @@ c | workl(ncv*ncv+ncv+1:ncv*ncv+2*ncv) := error bounds |
c %--------------------------------------------------------%
c
c %-----------------------------------------------------------%
c | The following is used and set by ZNEUPD . |
c | The following is used and set by ZNEUPD. |
c | workl(ncv*ncv+2*ncv+1:ncv*ncv+3*ncv) := The untransformed |
c | Ritz values. |
c | workl(ncv*ncv+3*ncv+1:ncv*ncv+4*ncv) := The untransformed |
@@ -486,9 +486,9 @@ c
workl(ih+2) = zero
c
if (msglvl .gt. 2) then
call pzvout (comm, logfil, ncv, workl(irz), ndigit,
call pzvout(comm, logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values passed in from _NAUPD.')
call pzvout (comm, logfil, ncv, workl(ibd), ndigit,
call pzvout(comm, logfil, ncv, workl(ibd), ndigit,
& '_neupd: Ritz estimates passed in from _NAUPD.')
end if
c
@@ -518,14 +518,14 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call zngets (comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
call pzngets(comm, ishift, which ,
& nev , np , workl(irz),
& workl(bounds))
c
if (msglvl .gt. 2) then
call pzvout (comm,logfil, ncv, workl(irz), ndigit,
call pzvout(comm,logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values after calling _NGETS.')
call pzvout (comm,logfil, ncv, workl(bounds), ndigit,
call pzvout(comm,logfil, ncv, workl(bounds), ndigit,
& '_neupd: Ritz value indices after calling _NGETS.')
end if
c
@@ -537,12 +537,12 @@ c
numcnv = 0
do 11 j = 1,ncv
rtemp = max(eps23,
& dlapy2 ( real (workl(irz+ncv-j)),
& dimag (workl(irz+ncv-j)) ))
& dlapy2 ( dble (workl(irz+ncv-j)),
& dimag(workl(irz+ncv-j)) ))
jj = workl(bounds + ncv - j)
if (numcnv .lt. nconv .and.
& dlapy2 ( real (workl(ibd+jj-1)),
& dimag (workl(ibd+jj-1)) )
& dlapy2( dble (workl(ibd+jj-1)),
& dimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
select(jj) = .true.
numcnv = numcnv + 1
@@ -570,20 +570,20 @@ c
end if
c
c %-------------------------------------------------------%
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by PZNAUPD . |
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by PZNAUPD. |
c | Make a copy of the upper Hessenberg matrix. |
c | Initialize the Schur vector matrix Q to the identity. |
c %-------------------------------------------------------%
c
call zcopy (ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset ('All', ncv, ncv, zero, one, workl(invsub), ldq)
call zlahqr (.true. , .true. , ncv ,
call zcopy(ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset('All', ncv, ncv, zero, one, workl(invsub), ldq)
call zlahqr(.true. , .true. , ncv ,
& 1 , ncv , workl(iuptri),
& ldh , workl(iheig) , 1 ,
& ncv , workl(invsub), ldq ,
& ierr )
call zcopy (ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
call zcopy(ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
c
if (ierr .ne. 0) then
info = -8
@@ -591,12 +591,12 @@ c
end if
c
if (msglvl .gt. 1) then
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
call pzvout(comm, logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H')
call pzvout (comm, logfil, ncv, workl(ihbds), ndigit,
call pzvout(comm, logfil, ncv, workl(ihbds), ndigit,
& '_neupd: Last row of the Schur vector matrix')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, ncv, ncv,
call pzmout(comm, logfil, ncv, ncv,
& workl(iuptri), ldh, ndigit,
& '_neupd: The upper triangular matrix ')
end if
@@ -607,7 +607,7 @@ c %-----------------------------------------------%
c | Reorder the computed upper triangular matrix. |
c %-----------------------------------------------%
c
call ztrsen ('None' , 'V' , select ,
call ztrsen('None' , 'V' , select ,
& ncv , workl(iuptri), ldh ,
& workl(invsub), ldq , workl(iheig),
& nconv , conds , sep ,
@@ -619,10 +619,10 @@ c
end if
c
if (msglvl .gt. 2) then
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
call pzvout (comm, logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H--reordered')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, ncv, ncv,
call pzmout (comm, logfil, ncv, ncv,
& workl(iuptri), ldq, ndigit,
& '_neupd: Triangular matrix after re-ordering')
end if
@@ -636,7 +636,7 @@ c | to compute the Ritz estimates of converged |
c | Ritz values. |
c %---------------------------------------------%
c
call zcopy (ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
call zcopy(ncv, workl(invsub+ncv-1), ldq, workl(ihbds), 1)
c
c %--------------------------------------------%
c | Place the computed eigenvalues of H into D |
@@ -644,7 +644,7 @@ c | if a spectral transformation was not used. |
c %--------------------------------------------%
c
if (type .eq. 'REGULR') then
call zcopy (nconv, workl(iheig), 1, d, 1)
call zcopy(nconv, workl(iheig), 1, d, 1)
end if
c
c %----------------------------------------------------------%
@@ -653,12 +653,12 @@ c | the wanted invariant subspace located in the first NCONV |
c | columns of workl(invsub,ldq). |
c %----------------------------------------------------------%
c
call zgeqr2 (ncv, nconv , workl(invsub),
call zgeqr2(ncv, nconv , workl(invsub),
& ldq, workev, workev(ncv+1),
& ierr)
c
c %--------------------------------------------------------%
c | * Postmultiply V by Q using zunm2r . |
c | * Postmultiply V by Q using zunm2r. |
c | * Copy the first NCONV columns of VQ into Z. |
c | * Postmultiply Z by R. |
c | The N by NCONV matrix Z is now a matrix representation |
@@ -669,11 +669,11 @@ c | associated with the upper triangular matrix of order |
c | NCONV in workl(iuptri). |
c %--------------------------------------------------------%
c
call zunm2r ('Right', 'Notranspose', n ,
call zunm2r('Right', 'Notranspose', n ,
& ncv , nconv , workl(invsub),
& ldq , workev , v ,
& ldv , workd(n+1) , ierr )
call zlacpy ('All', n, nconv, v, ldv, z, ldz)
call zlacpy('All', n, nconv, v, ldv, z, ldz)
c
do 20 j=1, nconv
c
@@ -686,10 +686,10 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( dble ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble (zero) ) then
call zscal (nconv, -one, workl(iuptri+j-1), ldq)
call zscal (nconv, -one, workl(iuptri+(j-1)*ldq), 1)
if ( dble( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble(zero) ) then
call zscal(nconv, -one, workl(iuptri+j-1), ldq)
call zscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
c
20 continue
@@ -709,7 +709,7 @@ c
end if
30 continue
c
call ztrevc ('Right', 'Select' , select ,
call ztrevc('Right', 'Select' , select ,
& ncv , workl(iuptri), ldq ,
& vl , 1 , workl(invsub),
& ldq , ncv , outncv ,
@@ -723,15 +723,15 @@ c
c %------------------------------------------------%
c | Scale the returning eigenvectors so that their |
c | Euclidean norms are all one. LAPACK subroutine |
c | ztrevc returns each eigenvector normalized so |
c | ztrevc returns each eigenvector normalized so |
c | that the element of largest magnitude has |
c | magnitude 1. |
c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = dznrm2 (ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble (one) / rtemp
call zdscal ( ncv, rtemp,
rtemp = dznrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble(one) / rtemp
call zdscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
c %------------------------------------------%
@@ -743,17 +743,17 @@ c | upper triangular, thus the length of the |
c | inner product can be set to j. |
c %------------------------------------------%
c
workev(j) = zdotc (j, workl(ihbds), 1,
workev(j) = zdotc(j, workl(ihbds), 1,
& workl(invsub+(j-1)*ldq), 1)
40 continue
c
if (msglvl .gt. 2) then
call zcopy (nconv, workl(invsub+ncv-1), ldq,
call zcopy(nconv, workl(invsub+ncv-1), ldq,
& workl(ihbds), 1)
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout(comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Last row of the eigenvector matrix for T')
if (msglvl .gt. 3) then
call pzmout (comm, logfil, nconv, ncv,
call pzmout(comm, logfil, nconv, ncv,
& workl(invsub), ldq, ndigit,
& '_neupd: The eigenvector matrix for T')
end if
@@ -763,14 +763,14 @@ c %---------------------------------------%
c | Copy Ritz estimates into workl(ihbds) |
c %---------------------------------------%
c
call zcopy (nconv, workev, 1, workl(ihbds), 1)
call zcopy(nconv, workev, 1, workl(ihbds), 1)
c
c %----------------------------------------------%
c | The eigenvector matrix Q of T is triangular. |
c | Form Z*Q. |
c %----------------------------------------------%
c
call ztrmm ('Right' , 'Upper' , 'No transpose',
call ztrmm('Right' , 'Upper' , 'No transpose',
& 'Non-unit', n , nconv ,
& one , workl(invsub), ldq ,
& z , ldz)
@@ -781,12 +781,12 @@ c
c
c %--------------------------------------------------%
c | An approximate invariant subspace is not needed. |
c | Place the Ritz values computed PZNAUPD into D. |
c | Place the Ritz values computed PZNAUPD into D. |
c %--------------------------------------------------%
c
call zcopy (nconv, workl(ritz), 1, d, 1)
call zcopy (nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy (nconv, workl(bounds), 1, workl(ihbds), 1)
call zcopy(nconv, workl(ritz), 1, d, 1)
call zcopy(nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy(nconv, workl(bounds), 1, workl(ihbds), 1)
c
end if
c
@@ -799,7 +799,7 @@ c
if (type .eq. 'REGULR') then
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
else
c
@@ -810,7 +810,7 @@ c | Ritz values in the original system. |
c %---------------------------------------%
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
do 50 k=1, ncv
temp = workl(iheig+k-1)
@@ -834,14 +834,14 @@ c
end if
c
if (type .ne. 'REGULR' .and. msglvl .gt. 1) then
call pzvout (comm, logfil, nconv, d, ndigit,
call pzvout (comm, logfil, nconv, d, ndigit,
& '_neupd: Untransformed Ritz values.')
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Ritz estimates of the untransformed Ritz values.')
else if ( msglvl .gt. 1) then
call pzvout (comm, logfil, nconv, d, ndigit,
call pzvout (comm, logfil, nconv, d, ndigit,
& '_neupd: Converged Ritz values.')
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
call pzvout (comm, logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Associated Ritz estimates.')
end if
c
@@ -873,7 +873,7 @@ c | Perform a rank one update to Z and |
c | purify all the Ritz vectors together. |
c %---------------------------------------%
c
call zgeru (n, nconv, one, resid, 1, workev, 1, z, ldz)
call zgeru(n, nconv, one, resid, 1, workev, 1, z, ldz)
c
end if
c
@@ -882,7 +882,7 @@ c
return
c
c %----------------%
c | End of pzneupd |
c | End of pzneupd |
c %----------------%
c
end
-1
View File
@@ -1,2 +1 @@
SUBDIRS = MPI
+16 -11
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -132,10 +132,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -215,7 +215,7 @@ SUBDIRS = MPI
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -240,9 +240,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -460,10 +460,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-1
View File
@@ -3,4 +3,3 @@ noinst_LTLIBRARIES = libparpackutilmpi.la
libparpackutilmpi_la_SOURCES = \
pivout.f psvout.f psmout.f pdvout.f \
pdmout.f pcvout.f pcmout.f pzvout.f pzmout.f
+17 -12
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -108,10 +108,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -196,7 +196,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -221,9 +221,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -235,7 +235,7 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libparpackutilmpi.la: $(libparpackutilmpi_la_OBJECTS) $(libparpackutilmpi_la_DEPENDENCIES)
libparpackutilmpi.la: $(libparpackutilmpi_la_OBJECTS) $(libparpackutilmpi_la_DEPENDENCIES) $(EXTRA_libparpackutilmpi_la_DEPENDENCIES)
$(F77LINK) $(libparpackutilmpi_la_OBJECTS) $(libparpackutilmpi_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -355,10 +355,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-130
View File
@@ -1,130 +0,0 @@
C/*
C *
C * (C) 1993 by Argonne National Laboratory and Mississipi State University.
C * All rights reserved. See COPYRIGHT in top-level directory.
C */
C
C/* user include file for MPI programs, with no dependencies */
C
C/* return codes */
integer MPI_SUCCESS,MPI_ERR_EXHAUSTED,MPI_ERR_TAG,
$ MPI_ERR_COMM_NULL,MPI_ERR_COMM_INTER,MPI_ERR_COMM_INTRA,
$ MPI_ERR_ARG,MPI_ERR_BUFFER,MPI_ERR_COUNT,MPI_ERR_TYPE,
$ MPI_ERR_ROOT,MPI_ERR_OP,MPI_ERR_ERRORCODE,
$ MPI_ERR_GROUP,MPI_ERR_RANK,MPI_ERR_TOPOLOGY,
$ MPI_ERR_DIMS,MPI_ERR_NULL,MPI_ERR_UNKNOWN,
$ MPI_ERR_REQUEST,MPI_ERR_LIMIT,MPI_ERR_INTERN,
$ MPI_ERR_NOMATCH,MPI_ERR_TRUNCATE,MPI_ERR_BAD_ARGS,
$ MPI_ERR_INIT,MPI_ERR_PERM_KEY,MPI_ERR_BUFFER_EXISTS,
$ MPI_ERR_COMM,MPI_ERR_PERM_TYPE,MPI_ERR_IN_STATUS,
$ MPI_ERR_OTHER,MPI_ERR_LASTCODE
parameter (MPI_SUCCESS=0,MPI_ERR_EXHAUSTED=1,MPI_ERR_TAG=2,
$ MPI_ERR_COMM_NULL=3,MPI_ERR_COMM_INTER=4,MPI_ERR_COMM_INTRA=5,
$ MPI_ERR_ARG=6,MPI_ERR_BUFFER=7,MPI_ERR_COUNT=8,MPI_ERR_TYPE=9,
$ MPI_ERR_ROOT=10,MPI_ERR_OP=11,MPI_ERR_ERRORCODE=12,
$ MPI_ERR_GROUP=13,MPI_ERR_RANK=14,MPI_ERR_TOPOLOGY=15,
$ MPI_ERR_DIMS=16,MPI_ERR_NULL=17,MPI_ERR_UNKNOWN=18,
$ MPI_ERR_REQUEST=19,MPI_ERR_LIMIT=20,MPI_ERR_INTERN=21,
$ MPI_ERR_NOMATCH=22,MPI_ERR_TRUNCATE=23,MPI_ERR_BAD_ARGS=24,
$ MPI_ERR_INIT=25,MPI_ERR_PERM_KEY=26,MPI_ERR_BUFFER_EXISTS=27,
$ MPI_ERR_COMM=28,MPI_ERR_PERM_TYPE=29,MPI_ERR_IN_STATUS=30,
$ MPI_ERR_OTHER=31,
$ MPI_ERR_LASTCODE=32)
C
integer MPI_UNDEFINED
parameter (MPI_UNDEFINED = (-32766))
C
INTEGER MPI_GRAPH, MPI_CART
PARAMETER (MPI_GRAPH = 1, MPI_CART = 2)
INTEGER MPI_PROC_NULL
PARAMETER ( MPI_PROC_NULL = (-1) )
C
INTEGER MPI_BSEND_OVERHEAD
PARAMETER ( MPI_BSEND_OVERHEAD = 512 )
INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
PARAMETER(MPI_SOURCE=2, MPI_TAG=3, MPI_ERROR=4)
INTEGER MPI_STATUS_SIZE
PARAMETER (MPI_STATUS_SIZE=4)
INTEGER MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING
PARAMETER (MPI_MAX_PROCESSOR_NAME=256,
$ MPI_MAX_ERROR_STRING=256)
C
INTEGER MPI_COMM_NULL
PARAMETER (MPI_COMM_NULL=0)
c
INTEGER MPI_DATATYPE_NULL
PARAMETER (MPI_DATATYPE_NULL = 0)
INTEGER MPI_ERRHANDLER_NULL
PARAMETER (MPI_ERRHANDLER_NULL = 0)
INTEGER MPI_GROUP_NULL
PARAMETER (MPI_GROUP_NULL = 0)
INTEGER MPI_KEYVAL_INVALID
PARAMETER (MPI_KEYVAL_INVALID = 0)
INTEGER MPI_REQUEST_NULL
PARAMETER (MPI_REQUEST_NULL = 0)
C
INTEGER MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL
PARAMETER (MPI_IDENT=0, MPI_CONGRUENT=1, MPI_SIMILAR=2,
$ MPI_UNEQUAL=3)
C
C We handle datatypes by putting the variables that hold them into
C common. This way, a Fortran program can directly use the various
C datatypes and can even give them to C programs.
C
C MPI_BOTTOM needs to be a known address; here we put it at the
C beginning of the common block. The point-to-point and collective
C routines know about MPI_BOTTOM, but MPI_TYPE_STRUCT as yet does not.
C
C The types MPI_INTEGER1,2,4 and MPI_REAL4,8 are OPTIONAL.
C Their values are zero if they are not available. Note that
C using these reduces the portability of code (though may enhance
C portability between Crays and other systems)
C
integer MPI_TAG_UB, MPI_HOST, MPI_IO
integer MPI_BOTTOM, MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8, MPI_UB, MPI_LB,
$ MPI_PACKED
integer MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY
integer MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL
integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
common /mpipriv/ MPI_BOTTOM, MPI_INTEGER, MPI_REAL,
$ MPI_DOUBLE_PRECISION,
$ MPI_COMPLEX, MPI_DOUBLE_COMPLEX,
$ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE,
$ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION,
$ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX,
$ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4,
$ MPI_REAL2, MPI_REAL4, MPI_REAL8,
$ MPI_UB, MPI_LB,
$ MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY,
$ MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND,
$ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC,
$ MPI_OP_NULL,
$ MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_ERRORS_ARE_FATAL,
$ MPI_ERRORS_RETURN, MPI_PACKED
C
integer MPI_ANY_SOURCE
parameter (MPI_ANY_SOURCE = (-2))
integer MPI_ANY_TAG
parameter (MPI_ANY_TAG = (-1))
C
C All other MPI routines are subroutines
double precision MPI_WTIME, MPI_WTICK
external MPI_WTIME, MPI_WTICK
C
C The attribute copy/delete functions are symbols that can be passed
C to MPI routines
external MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN, MPI_DUP_FN
+16 -11
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -132,10 +132,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -215,7 +215,7 @@ SUBDIRS = MPI
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -240,9 +240,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -460,10 +460,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
+334
View File
@@ -0,0 +1,334 @@
This file describes list of changes done by Chao Yang on parpack.
This fixes many issues in parpack libs.
Theses changes were released under the "ppatch.tar.gz" filename.
---------------------------------------------------------------------
1. 01/27/97:
[s,d]sapps.f: Loop 50 (line 375) has an incorrect upper bound:
replace
do 50 j = 1, min( j+jj, kplusp )
^^^
with
do 50 j = 1, min( i+jj, kplusp )
^^^
[s,d]napps.f: Loop 70 (line 433) has an incorrect upper bound:
replace
do 70 j = 1, min( j+jj, kplusp )
^^^
with
do 70 j = 1, min( i+jj, kplusp )
^^^
[c,z]napps.f: Loop 70 (line 365) has an incorrect upper bound:
replace
do 70 j = 1, min( j+jj, kplusp )
^^^
with
do 70 j = 1, min( i+jj, kplusp )
^^^
Without the change the code will not compile on NEC.
The parallel version of these routine needs to be modified
as well.
2. 03/28/97:
In [s,d]ndrv4.f [s,d]ndrv5.f [s,d]ndrv6.f, the array SELECT
is delecared as
select(maxnev)
It should be changed to
select(maxncv)
3. 03/28/97:
There are two empty files [s,d]naupe.f in the SRC directory.
They are not part of the ARPACK. The user should ignore
them.
4. 03/28/97:
In [s,d]seupd.f, select(ncv) is declared before ncv is declared.
Should move the declaration of select(ncv) after
c %-----------------%
c | Array Arguments |
c %-----------------%
5. 03/28/97:
all banded drivers in EXAMPLES/BAND directory have not been
checked in. Although these are the current version, the SCCS
infomartion do not show the correct version number and dates.
6. 03/28/97:
In [s,d]naupd.f the following check:
else if (mode .lt. 1 .or. mode .gt. 5) then
^^
ierr = -10
should be changed to
else if (mode .lt. 1 .or. mode .gt. 4) then
^^
ierr = -10
In [c,z]naupd.f the following check:
else if (mode .lt. 1 .or. mode .gt. 5) then
^^
ierr = -10
should be changed to
else if (mode .lt. 1 .or. mode .gt. 3) then
^^
ierr = -10
7. 04/02/97:
The mass matrix in the drivers
[s,d]ndrv4.f (NONSYM)
[s,d]nbdr4.f (BAND)
[c,z]ndrv4.f (COMPLEX)
[c,z]nbdr4.f (BAND)
needs to be scaled by 1/6 to match the piecewise
linear finite element discretization of the 1-d
convection-diffusion operator as explained in the
documentation.
8. 04/03/97:
The documentation for the SELECT array in [s,d]seupd.f should
say:
c SELECT Logical array of dimension NCV. (INPUT/WORKSPACE)
^^^^ ^^^^^^^^^^
9. 06/04/98:
p[s,d,c,z]larnv.f The integer arguement IDIST is not declared.
10. 06/04/98:
In p[s,d]neupd.f, the declaration of p[s,d]norm2 is missing.
The declaration of [s,d]nrm2 is not necessary since it is not
used.
11. 08/03/98:
In [c,z]nband.f, the documentation:
c call znband
c ( RVEC, HOWMNY, SELECT, D , Z, LDZ, SIGMA, WORKEV, N, AB,
c MB, LDA, FAC, KL, LU, WHICH, BMAT, NEV, TOL, RESID, NCV,
^^^^
c V, LDV, IPARAM, WORKD, WORKL, LWORKL, RWORK, IWORK, INFO )
should read
c call znband
c ( RVEC, HOWMNY, SELECT, D , Z, LDZ, SIGMA, WORKEV, N, AB,
c MB, LDA, FAC, KL, KU, WHICH, BMAT, NEV, TOL, RESID, NCV,
^^^^
c V, LDV, IPARAM, WORKD, WORKL, LWORKL, RWORK, IWORK, INFO )
12. 03/18/99
_getv0.f failed to generate a starting vector after 2 steps of classical
Gram Schmidt correction step. Fixed by increasing the maximum Gram-Schmidt
correction steps to 5.
13. 04/16/99
A print statement (*mout) in p*neupd.f went over the 72nd column.
14. 04/17/99
Modified p*larnv.f and p*getv0.f in PARPACK to fix a bug in
generating a random starting vector in parallel. Now each processor
generates its portion of the starting vector using a different seed.
15. 11/05/99
The do 10 loop in [c,z]neupd.f and p[c,z]neupd.f had incorrect index
to workl(irz). Since the loop count j starts from 0, the reference to
workl(irz) should be expressed by workl(irz+j) instead of workl(irz+j-1).
16. 06/01/2000
Variables 'rnorm' and 'eps23' are missing from the save statement list
in all __naup2 routines (both serial and parallel).
17. 07/20/2000 (all eupd, both serial and parallel)
Changed the code segment used to determine whether
reordering is necessary to move the desired and converged
Ritz values into the leading portion of the Schur form.
The previous versions used the technique to mark Ritz values that
must be put in the leading portion of the Schur form:
1. Determine which eigenvalues returned by dense eigenvalue
calculation routine are desired. This is done in two steps:
a) find a threshold value from the sorted Ritz value array
b) compare all eigenvalues returned directly from dense eigenvalue
calculation routine against this threshold value.
2. For each desired Ritz value, check the Ritz estimate.
Mark the j-th element of the select array if the j-th eigenvalue
satisfies the convergence criteria.
18. 08/08/2000
In _saitr.f and _naitr.f, add a check for NP = 0 at the very begining of
this routine
19. 09/21/2000
In [c,z]neupd.f, the IF statement:
if (numcnv .lt. nev .and.
^^^
& slapy2( m_real(workl(ibd+jj-1)),
& aimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
is changed to
if (numcnv .lt. nconv .and.
^^^^^
& slapy2( m_real(workl(ibd+jj-1)),
& aimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
NEV is the number of eigenvalues requested;
NCONV is the number of converged eigenvalues;
NUMCNV counts the number of converged eigenvalues;
The original IF statement will cause NUMCNV to be
inconsistent with NCONV, when fewer than NEV wanted
eigenvalues have converged but there are many converged
but unwanted Ritz values.
20. In [s,d][s,n]eupd.f, the IF statement
if (numcnv .lt. nev .and.
^^^
& workl(ibd+jj-1) .le. tol*temp1) then
is changed to
if (numcnv .lt. nconv .and.
^^^^^
& workl(ibd+jj-1) .le. tol*temp1) then
NEV is the number of eigenvalues requested;
NCONV is the number of converged eigenvalues;
NUMCNV counts the number of converged eigenvalues;
The original IF statement will cause NUMCNV to be
inconsistent with NCONV, when fewer than NEV wanted
eigenvalues have converged but there are many converged
but unwanted Ritz values.
21. 10/16/2000
Line 238 of [s,d]naup2.f went past the 72nd column. This
was caused by the extra space inserted by new Solaris cpp
when ARPACK single and double precision source codes are generate
from the naup2.F code. This line is fixed by wrapping it around
the next line.
22. 10/20/2000
Updated SCCS information for drivers in BAND, SIMPLE.
Fixed miscellaneous minor problems caused by cpp.
23. 04/10/2001
Problems reported in items 19 & 20 above exist in the
parallel codes also. The same changes have been made
in p[s,d,c,n][s,n]eupd.f
24. 04/10/2001 (reported by David Day, SNL)
There was a mistake in the orthogonalization step in
the MPI version of p[c,z]getv0.f. The original code had
call zgemv ('N', n, j-1, -one, v, ldv, workd(n+1), 1,
^^^^^^^^^^
& one, resid, 1)
It has been changed to
call zgemv ('N', n, j-1, -one, v, ldv, workl, 1, one, resid, 1)
^^^^^
Also, p[c,z]vout() was used to print out `rnorm', which
is potential problematic. The following code has been
added to correct that.
cnorm2 = cmplx(rnorm,rzero)
call pcvout (comm, logfil, 1, cnorm2, ndigit,
& '_getv0: B-norm of initial / restarted starting vector')
25. 04/10/2001
In all _aupd.f codes, iparam(2) and/or iparam(4) are used to
define NB or LEVEC. Since NB=1 is the only block size and since
LEVEC is no longer used, the statements
levec = iparam(2)
nb = iparam(4)
have been commented out. NB=1 has been added to avoid potential
confusion.
26. 04/10/2001
In all _seupd codes (both serial and parallel) the call to
_sgets had an extra arguement:
call dsgets (ishift, which , nev ,
& np , workl(irz) , workl(bounds),
& workl , workl(np+1))
^^^^^^^^^^^
they have been changed to
call dsgets (ishift, which , nev ,
& np , workl(irz) , workl(bounds),
& workl)
27. 07/21/2002
In pzneupd.f, loop 11, the intrinsic precision conversion
function 'real' should be changed to 'dble'
28. 07/21/2002
modified the comments in [c,z]neupd regarding the size of
NCV. NCV is only required to be at least NEV+1 (instead of
NEV+2) in the complex version. Changed the error testing
from
else if (ncv .le. nev+1 .or. ncv .gt. n) then
ierr = -3
to
else if (ncv .le. nev .or. ncv .gt. n) then
ierr = -3
29. 07/21/2002
modified the comment in [c,z]naupd regarding the size of
NCV. NCV is only required to be at least NEV+1 (instead of
NEV+2) in the complex version.
30. 07/21/2002
In [s,d]sbdr2.f, lworkl is incorrectly set to ncv*ncv+6*ncv.
Changed it to ncv*ncv+8*ncv.
31. 10/24/2003
There was a typo in p[c,z]neupd. The call to '[c,z]ngets' is
replaced by a call to 'p[c,z]ngets' instead.
32. 10/24/2003 fixing lines that go beyond the 72nd column in p[c,z]naup2.f.
33. 10/24/2003 replace 'slamch' with 'pslamch' in p[c,z]napps.f
34. 10/24/2003 removed an extra arguement to the p[s,d]sgets() call.
35. 10/24/2003 p[c,z]naup2.f contain some lines that were incorrectly
generated by cpp. These lines have been removed in the new patch.
+39 -62
View File
@@ -1,32 +1,34 @@
1. You have successfully unbundled ARPACK and are now in the ARPACK
ARPACK-NG is a collection of Fortran77 subroutines designed to solve large scale
eigenvalue problems.
Important Features:
* Reverse Communication Interface.
* Single and Double Precision Real Arithmetic Versions for Symmetric,
Non-symmetric, Standard or Generalized Problems.
* Single and Double Precision Complex Arithmetic Versions for Standard or
Generalized Problems.
* Routines for Banded Matrices - Standard or Generalized Problems.
* Routines for The Singular Value Decomposition.
* Example driver routines that may be used as templates to implement numerous
Shift-Invert strategies for all problem types, data types and precision.
This project is a joint project between Debian, Octave and Scilab in order to
provide a common and maintained version of arpack.
Indeed, no single release has been published by Rice university for the last
few years and since many software (Octave, Scilab, R, Matlab...) forked it and
implemented their own modifications, arpack-ng aims to tackle this by providing
a common repository and maintained versions.
arpack-ng is replacing arpack in Debian & Ubuntu. Fink, Fedora and Redhat are
currently doing the same move.
1. You have successfully unbundled ARPACK-NG and are now in the ARPACK-NG
directory that was created for you.
2. Recent bug fixes are included in patch.tar.gz and ppatch.tar.gz
If you have not retrieved these files, please do so and place them in
the directory right above the current directory. (They should
be in the same directory where arpack96.tar and parpack96.tar reside).
Use uncompress or gunzip to unzip the tar files, and use 'tar -xvf '
to unbundle these patches. The source codes in these patches will
overwrite those contained in arpack96.tar and parpack96.tar.
3. Upon executing the 'ls | more ' command you should see
BLAS
DOCUMENTS
EXAMPLES
LAPACK
README
SRC
UTIL
Makefile
ARmake.inc
ARMAKES
PARPACK
The following entries are directories:
ARMAKES, BLAS, DOCUMENTS, EXAMPLES, LAPACK, SRC, UTIL, PARPACK
2.
The directory SRC contains the top level routines including
the highest level reverse communication interface routines
@@ -42,7 +44,7 @@
3. Example driver programs that illustrate all the computational modes,
data types and precisions may be found in the EXAMPLES directory.
Upon executing the 'ls EXAMPLES | more ' command you should see
Upon executing the 'ls EXAMPLES' command you should see
BAND
COMPLEX
@@ -66,41 +68,14 @@
The following instructions explain how to make the ARPACK library.
4. Before you can compile anything, you must first edit and correct the file
ARmake.inc. Sample ARmake.inc's can be found in the ARMAKES directory.
If you plan on using Parallel ARPACK you will need to use those sample
files which contain either BLACS or MPI in their name. For example,
ARmake.MPI-$(PLAT) or ARmake.BLACS-$(PLAT).
Edit "ARmake.inc" and change the definition "home" to the root of the
source tree (Top level of ARPACK directory)
4. Unlike ARPACK, ARPACK-NG is providing autotools based build system.
Therefor, the classical:
$ ./configure
$ make
$ make install
should work as expected.
The makefile is set up to build a self-contained library which includes
the needed BLAS 1/2/3 and LAPACK routines. If you already have the
BLAS and LAPACK libraries installed on your system you might want to
change the definition of DIRS as indicated in the ARmake.inc file.
*** NOTE *** The LAPACK library on your system MUST be the public release.
The current release is version 2.0. If you are not certain if the public
release has been installed, we strongly recommend that you compile and link
to the subset of LAPACK included here.
5. You will also need to change the file "second.f" in the UTIL directory
to whatever is appropriate for timing on your system. The "second" routine
provided works on most workstations. If you are running on a Cray,
copy the file "second.f.CRAYT3D" to "second.f" to use the rtf system
function.
6. Do "make lib" in the current directory to build the standard library
"libarpack_$(PLAT).a" (serial code)
To build the the parallel library, "parpack_$(COMMLIB)-$(PLAT).a",
type "make plib". When using the parallel routines you must link to
both the serial library and the parallel library.
7. Within DOCUMENTS directory there are three files
5. Within DOCUMENTS directory there are three files
ex-sym.doc
ex-nonsym.doc and
@@ -115,6 +90,8 @@
Richard Lehoucq at rblehou@sandia.gov
Chao Yang at cyang@lbl.gov
Kristi Maschhoff at kristyn@tera.com
Sylvestre Ledru at sylvestre.ledru@scilab-enterprises.com
Allan Cornet at allan.cornet@scilab.org
Good luck and enjoy.
+2
View File
@@ -12,3 +12,5 @@ libarpacksrc_la_SOURCES = \
cgetv0.f csortc.f cstatn.f \
znaitr.f znapps.f znaup2.f znaupd.f zneigh.f zneupd.f zngets.f \
zgetv0.f zsortc.f zstatn.f
EXTRA_DIST = debug.h stat.h version.h
+18 -12
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -118,10 +118,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -212,11 +212,12 @@ libarpacksrc_la_SOURCES = \
znaitr.f znapps.f znaup2.f znaupd.f zneigh.f zneupd.f zngets.f \
zgetv0.f zsortc.f zstatn.f
EXTRA_DIST = debug.h stat.h version.h
all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -241,9 +242,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -255,7 +256,7 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libarpacksrc.la: $(libarpacksrc_la_OBJECTS) $(libarpacksrc_la_DEPENDENCIES)
libarpacksrc.la: $(libarpacksrc_la_OBJECTS) $(libarpacksrc_la_DEPENDENCIES) $(EXTRA_libarpacksrc_la_DEPENDENCIES)
$(F77LINK) $(libarpacksrc_la_OBJECTS) $(libarpacksrc_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -375,10 +376,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
+22 -22
View File
@@ -66,11 +66,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex array of dimension NEV+1. (OUTPUT)
c D Complex array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex N by NEV array (OUTPUT)
c Z Complex N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -88,11 +88,11 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex (INPUT)
c SIGMA Complex (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to CNAUPD that was just completed. ****
@@ -108,7 +108,7 @@ c the the last call to CNAUPD and the call to CNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex N by NCV array. (INPUT/OUTPUT)
c V Complex N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by CNAUPD .
@@ -124,7 +124,7 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Real work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c cnaupd. They are not changed by cneupd.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
@@ -266,9 +266,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex
Complex
& sigma
Real
Real
& tol
c
c %-----------------%
@@ -277,9 +277,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Real
Real
& rwork(ncv)
Complex
Complex
& d(nev) , resid(n) , v(ldv,ncv),
& z(ldz, nev),
& workd(3*n) , workl(lworkl), workev(2*ncv)
@@ -288,9 +288,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex
Complex
& one, zero
parameter (one = (1.0E+0, 0.0E+0) , zero = (0.0E+0, 0.0E+0) )
parameter (one = (1.0E+0, 0.0E+0), zero = (0.0E+0, 0.0E+0))
c
c %---------------%
c | Local Scalars |
@@ -304,7 +304,7 @@ c
& ishift, nconv2
Complex
& rnorm, temp, vl(1)
Real
Real
& conds, sep, rtemp, eps23
logical reord
c
@@ -320,11 +320,11 @@ c %--------------------%
c | External Functions |
c %--------------------%
c
Real
Real
& scnrm2, slamch, slapy2
external scnrm2, slamch, slapy2
c
Complex
Complex
& cdotc
external cdotc
c
@@ -347,7 +347,7 @@ c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = slamch('Epsilon-Machine')
eps23 = eps23**(2.0E+0 / 3.0E+0 )
eps23 = eps23**(2.0E+0 / 3.0E+0)
c
c %-------------------------------%
c | Quick return |
@@ -515,16 +515,16 @@ c
numcnv = 0
do 11 j = 1,ncv
rtemp = max(eps23,
& slapy2 ( real (workl(irz+ncv-j)),
& slapy2 ( real(workl(irz+ncv-j)),
& aimag(workl(irz+ncv-j)) ))
jj = workl(bounds + ncv - j)
if (numcnv .lt. nconv .and.
& slapy2( real (workl(ibd+jj-1)),
& slapy2( real(workl(ibd+jj-1)),
& aimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
@@ -674,8 +674,8 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( real ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real (zero) ) then
if ( real( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& real(zero) ) then
call cscal(nconv, -one, workl(iuptri+j-1), ldq)
call cscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
@@ -718,7 +718,7 @@ c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = scnrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = real (one) / rtemp
rtemp = real(one) / rtemp
call csscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
+11
View File
@@ -664,6 +664,17 @@ c
else if (nev .eq. 1 .and. kplusp .gt. 3) then
nev = 2
end if
c %---- Scipy fix ------------------------------------------------
c | We must keep nev below this value, as otherwise we can get
c | np == 0 (note that dngets below can bump nev by 1). If np == 0,
c | the next call to `dnaitr` will write out-of-bounds.
c |
if (nev .gt. kplusp - 2) then
nev = kplusp - 2
end if
c |
c %---- Scipy fix end --------------------------------------------
c
np = kplusp - nev
c
c %---------------------------------------%
+1 -1
View File
@@ -113,7 +113,7 @@ c
c NEV Integer. (INPUT)
c Number of eigenvalues of OP to be computed. 0 < NEV < N-1.
c
c TOL Double precision scalar. (INPUT)
c TOL Double precision scalar. (INPUT/OUTPUT)
c Stopping criterion: the relative accuracy of the Ritz value
c is considered acceptable if BOUNDS(I) .LE. TOL*ABS(RITZ(I))
c where ABS(RITZ(I)) is the magnitude when RITZ(I) is complex.
+1 -1
View File
@@ -589,7 +589,7 @@ c
& workl(ibd+jj-1) .le. tol*temp1) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
+1 -1
View File
@@ -501,7 +501,7 @@ c
& workl(ibd+jj-1) .le. tol*temp1) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
+12
View File
@@ -664,6 +664,18 @@ c
else if (nev .eq. 1 .and. kplusp .gt. 3) then
nev = 2
end if
c %---- Scipy fix ------------------------------------------------
c | We must keep nev below this value, as otherwise we can get
c | np == 0 (note that sngets below can bump nev by 1). If np == 0,
c | the next call to `snaitr` will write out-of-bounds.
c |
if (nev .gt. kplusp - 2) then
nev = kplusp - 2
end if
c |
c %---- Scipy fix end --------------------------------------------
c
np = kplusp - nev
c
c %---------------------------------------%
+1 -1
View File
@@ -589,7 +589,7 @@ c
& workl(ibd+jj-1) .le. tol*temp1) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
+1 -1
View File
@@ -501,7 +501,7 @@ c
& workl(ibd+jj-1) .le. tol*temp1) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
+122 -122
View File
@@ -1,6 +1,6 @@
c\BeginDoc
c
c\Name: zneupd
c\Name: zneupd
c
c\Description:
c This subroutine returns the converged approximations to eigenvalues
@@ -20,7 +20,7 @@ c
c The approximate eigenvalues and eigenvectors of A*z = lambda*B*z
c are derived from approximate eigenvalues and eigenvectors of
c of the linear operator OP prescribed by the MODE selection in the
c call to ZNAUPD . ZNAUPD must be called before this routine is called.
c call to ZNAUPD. ZNAUPD must be called before this routine is called.
c These approximate eigenvalues and vectors are commonly called Ritz
c values and Ritz vectors respectively. They are referred to as such
c in the comments that follow. The computed orthonormal basis for the
@@ -29,12 +29,12 @@ c Schur basis.
c
c The definition of OP as well as other terms and the relation of computed
c Ritz values and vectors of OP with respect to the given problem
c A*z = lambda*B*z may be found in the header of ZNAUPD . For a brief
c A*z = lambda*B*z may be found in the header of ZNAUPD. For a brief
c description, see definitions of IPARAM(7), MODE and WHICH in the
c documentation of ZNAUPD .
c documentation of ZNAUPD.
c
c\Usage:
c call zneupd
c call zneupd
c ( RVEC, HOWMNY, SELECT, D, Z, LDZ, SIGMA, WORKEV, BMAT,
c N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR, WORKD,
c WORKL, LWORKL, RWORK, INFO )
@@ -66,11 +66,11 @@ c Ritz value D(j), SELECT(j) must be set to .TRUE..
c If HOWMNY = 'A' or 'P', SELECT need not be initialized
c but it is used as internal workspace.
c
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c D Complex*16 array of dimension NEV+1. (OUTPUT)
c On exit, D contains the Ritz approximations
c to the eigenvalues lambda for A*z = lambda*B*z.
c
c Z Complex*16 N by NEV array (OUTPUT)
c Z Complex*16 N by NEV array (OUTPUT)
c On exit, if RVEC = .TRUE. and HOWMNY = 'A', then the columns of
c Z represents approximate eigenvectors (Ritz vectors) corresponding
c to the NCONV=IPARAM(5) Ritz values for eigensystem
@@ -80,7 +80,7 @@ c If RVEC = .FALSE. or HOWMNY = 'P', then Z is NOT REFERENCED.
c
c NOTE: If if RVEC = .TRUE. and a Schur basis is not required,
c the array Z may be set equal to first NEV+1 columns of the Arnoldi
c basis array V computed by ZNAUPD . In this case the Arnoldi basis
c basis array V computed by ZNAUPD. In this case the Arnoldi basis
c will be destroyed and overwritten with the eigenvector basis.
c
c LDZ Integer. (INPUT)
@@ -88,30 +88,30 @@ c The leading dimension of the array Z. If Ritz vectors are
c desired, then LDZ .ge. max( 1, N ) is required.
c In any case, LDZ .ge. 1 is required.
c
c SIGMA Complex*16 (INPUT)
c SIGMA Complex*16 (INPUT)
c If IPARAM(7) = 3 then SIGMA represents the shift.
c Not referenced if IPARAM(7) = 1 or 2.
c
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c WORKEV Complex*16 work array of dimension 2*NCV. (WORKSPACE)
c
c **** The remaining arguments MUST be the same as for the ****
c **** call to ZNAUPD that was just completed. ****
c **** call to ZNAUPD that was just completed. ****
c
c NOTE: The remaining arguments
c
c BMAT, N, WHICH, NEV, TOL, RESID, NCV, V, LDV, IPARAM, IPNTR,
c WORKD, WORKL, LWORKL, RWORK, INFO
c
c must be passed directly to ZNEUPD following the last call
c to ZNAUPD . These arguments MUST NOT BE MODIFIED between
c the the last call to ZNAUPD and the call to ZNEUPD .
c must be passed directly to ZNEUPD following the last call
c to ZNAUPD. These arguments MUST NOT BE MODIFIED between
c the the last call to ZNAUPD and the call to ZNEUPD.
c
c Three of these parameters (V, WORKL and INFO) are also output parameters:
c
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c V Complex*16 N by NCV array. (INPUT/OUTPUT)
c
c Upon INPUT: the NCV columns of V contain the Arnoldi basis
c vectors for OP as constructed by ZNAUPD .
c vectors for OP as constructed by ZNAUPD .
c
c Upon OUTPUT: If RVEC = .TRUE. the first NCONV=IPARAM(5) columns
c contain approximate Schur vectors that span the
@@ -124,16 +124,16 @@ c Ritz vectors. If a separate array Z has been passed then
c the first NCONV=IPARAM(5) columns of V will contain approximate
c Schur vectors that span the desired invariant subspace.
c
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL Double precision work array of length LWORKL. (OUTPUT/WORKSPACE)
c WORKL(1:ncv*ncv+2*ncv) contains information obtained in
c znaupd . They are not changed by zneupd .
c znaupd. They are not changed by zneupd.
c WORKL(ncv*ncv+2*ncv+1:3*ncv*ncv+4*ncv) holds the
c untransformed Ritz values, the untransformed error estimates of
c the Ritz values, the upper triangular matrix for H, and the
c associated matrix representation of the invariant subspace for H.
c
c Note: IPNTR(9:13) contains the pointer into WORKL for addresses
c of the above information computed by zneupd .
c of the above information computed by zneupd.
c -------------------------------------------------------------
c IPNTR(9): pointer to the NCV RITZ values of the
c original system.
@@ -143,7 +143,7 @@ c IPNTR(12): pointer to the NCV by NCV upper triangular
c Schur matrix for H.
c IPNTR(13): pointer to the NCV by NCV matrix of eigenvectors
c of the upper Hessenberg matrix H. Only referenced by
c zneupd if RVEC = .TRUE. See Remark 2 below.
c zneupd if RVEC = .TRUE. See Remark 2 below.
c -------------------------------------------------------------
c
c INFO Integer. (OUTPUT)
@@ -151,8 +151,8 @@ c Error flag on output.
c = 0: Normal exit.
c
c = 1: The Schur form computed by LAPACK routine csheqr
c could not be reordered by LAPACK routine ztrsen .
c Re-enter subroutine zneupd with IPARAM(5)=NCV and
c could not be reordered by LAPACK routine ztrsen.
c Re-enter subroutine zneupd with IPARAM(5)=NCV and
c increase the size of the array D to have
c dimension at least dimension NCV and allocate at least NCV
c columns for Z. NOTE: Not necessary if Z and V share
@@ -161,25 +161,25 @@ c occurs.
c
c = -1: N must be positive.
c = -2: NEV must be positive.
c = -3: NCV-NEV >= 2 and less than or equal to N.
c = -3: NCV-NEV >= 1 and less than or equal to N.
c = -5: WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI', 'SI'
c = -6: BMAT must be one of 'I' or 'G'.
c = -7: Length of private work WORKL array is not sufficient.
c = -8: Error return from LAPACK eigenvalue calculation.
c This should never happened.
c = -9: Error return from calculation of eigenvectors.
c Informational error from LAPACK routine ztrevc .
c Informational error from LAPACK routine ztrevc.
c = -10: IPARAM(7) must be 1,2,3
c = -11: IPARAM(7) = 1 and BMAT = 'G' are incompatible.
c = -12: HOWMNY = 'S' not yet implemented
c = -13: HOWMNY must be one of 'A' or 'P' if RVEC = .true.
c = -14: ZNAUPD did not find any eigenvalues to sufficient
c = -14: ZNAUPD did not find any eigenvalues to sufficient
c accuracy.
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD
c = -15: ZNEUPD got a different count of the number of converged
c Ritz values than ZNAUPD got. This indicates the user
c probably made an error in passing data from ZNAUPD to
c ZNEUPD or that the data was modified before entering
c ZNEUPD
c
c\BeginLib
c
@@ -196,26 +196,26 @@ c Vol. 48, No. 178, April, 1987 pp. 664-673.
c
c\Routines called:
c ivout ARPACK utility routine that prints integers.
c zmout ARPACK utility routine that prints matrices
c zvout ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c zmout ARPACK utility routine that prints matrices
c zvout ARPACK utility routine that prints vectors.
c zgeqr2 LAPACK routine that computes the QR factorization of
c a matrix.
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c zlacpy LAPACK matrix copy routine.
c zlahqr LAPACK routine that computes the Schur form of a
c upper Hessenberg matrix.
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c zlaset LAPACK matrix initialization routine.
c ztrevc LAPACK routine to compute the eigenvectors of a matrix
c in upper triangular form.
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c ztrsen LAPACK routine that re-orders the Schur form.
c zunm2r LAPACK routine that applies an orthogonal matrix in
c factored form.
c dlamch LAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c dlamch LAPACK routine that determines machine constants.
c ztrmm Level 3 BLAS matrix times an upper triangular matrix.
c zgeru Level 2 BLAS rank one update to a matrix.
c zcopy Level 1 BLAS that copies one vector to another .
c zscal Level 1 BLAS that scales a vector.
c zdscal Level 1 BLAS that scales a complex vector by a real number.
c dznrm2 Level 1 BLAS that computes the norm of a complex vector.
c
c\Remarks
c
@@ -240,12 +240,12 @@ c Rice University
c Houston, Texas
c
c\SCCS Information: @(#)
c FILE: neupd.F SID: 2.7 DATE OF SID: 09/20/00 RELEASE: 2
c FILE: neupd.F SID: 2.8 DATE OF SID: 07/21/02 RELEASE: 2
c
c\EndLib
c
c-----------------------------------------------------------------------
subroutine zneupd (rvec , howmny, select, d ,
subroutine zneupd(rvec , howmny, select, d ,
& z , ldz , sigma , workev,
& bmat , n , which , nev ,
& tol , resid , ncv , v ,
@@ -266,9 +266,9 @@ c
character bmat, howmny, which*2
logical rvec
integer info, ldz, ldv, lworkl, n, ncv, nev
Complex*16
Complex*16
& sigma
Double precision
Double precision
& tol
c
c %-----------------%
@@ -277,9 +277,9 @@ c %-----------------%
c
integer iparam(11), ipntr(14)
logical select(ncv)
Double precision
Double precision
& rwork(ncv)
Complex*16
Complex*16
& d(nev) , resid(n) , v(ldv,ncv),
& z(ldz, nev),
& workd(3*n) , workl(lworkl), workev(2*ncv)
@@ -288,9 +288,9 @@ c %------------%
c | Parameters |
c %------------%
c
Complex*16
Complex*16
& one, zero
parameter (one = (1.0D+0, 0.0D+0) , zero = (0.0D+0, 0.0D+0) )
parameter (one = (1.0D+0, 0.0D+0), zero = (0.0D+0, 0.0D+0))
c
c %---------------%
c | Local Scalars |
@@ -304,7 +304,7 @@ c
& ishift, nconv2
Complex*16
& rnorm, temp, vl(1)
Double precision
Double precision
& conds, sep, rtemp, eps23
logical reord
c
@@ -312,21 +312,21 @@ c %----------------------%
c | External Subroutines |
c %----------------------%
c
external zcopy , zgeru , zgeqr2 , zlacpy , zmout ,
& zunm2r , ztrmm , zvout , ivout,
& zlahqr
external zcopy , zgeru, zgeqr2, zlacpy, zmout,
& zunm2r, ztrmm, zvout, ivout,
& zlahqr
c
c %--------------------%
c | External Functions |
c %--------------------%
c
Double precision
& dznrm2 , dlamch , dlapy2
external dznrm2 , dlamch , dlapy2
Double precision
& dznrm2, dlamch, dlapy2
external dznrm2, dlamch, dlapy2
c
Complex*16
& zdotc
external zdotc
Complex*16
& zdotc
external zdotc
c
c %-----------------------%
c | Executable Statements |
@@ -346,8 +346,8 @@ c %---------------------------------%
c | Get machine dependent constant. |
c %---------------------------------%
c
eps23 = dlamch ('Epsilon-Machine')
eps23 = eps23**(2.0D+0 / 3.0D+0 )
eps23 = dlamch('Epsilon-Machine')
eps23 = eps23**(2.0D+0 / 3.0D+0)
c
c %-------------------------------%
c | Quick return |
@@ -412,7 +412,7 @@ c | workl(ncv*ncv+ncv+1:ncv*ncv+2*ncv) := error bounds |
c %--------------------------------------------------------%
c
c %-----------------------------------------------------------%
c | The following is used and set by ZNEUPD . |
c | The following is used and set by ZNEUPD. |
c | workl(ncv*ncv+2*ncv+1:ncv*ncv+3*ncv) := The untransformed |
c | Ritz values. |
c | workl(ncv*ncv+3*ncv+1:ncv*ncv+4*ncv) := The untransformed |
@@ -465,9 +465,9 @@ c
workl(ih+2) = zero
c
if (msglvl .gt. 2) then
call zvout (logfil, ncv, workl(irz), ndigit,
call zvout(logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values passed in from _NAUPD.')
call zvout (logfil, ncv, workl(ibd), ndigit,
call zvout(logfil, ncv, workl(ibd), ndigit,
& '_neupd: Ritz estimates passed in from _NAUPD.')
end if
c
@@ -497,13 +497,13 @@ c %-------------------------------------%
c
np = ncv - nev
ishift = 0
call zngets (ishift, which , nev ,
call zngets(ishift, which , nev ,
& np , workl(irz), workl(bounds))
c
if (msglvl .gt. 2) then
call zvout (logfil, ncv, workl(irz), ndigit,
call zvout (logfil, ncv, workl(irz), ndigit,
& '_neupd: Ritz values after calling _NGETS.')
call zvout (logfil, ncv, workl(bounds), ndigit,
call zvout (logfil, ncv, workl(bounds), ndigit,
& '_neupd: Ritz value indices after calling _NGETS.')
end if
c
@@ -515,16 +515,16 @@ c
numcnv = 0
do 11 j = 1,ncv
rtemp = max(eps23,
& dlapy2 ( dble (workl(irz+ncv-j)),
& dimag (workl(irz+ncv-j)) ))
& dlapy2 ( dble(workl(irz+ncv-j)),
& dimag(workl(irz+ncv-j)) ))
jj = workl(bounds + ncv - j)
if (numcnv .lt. nconv .and.
& dlapy2 ( dble (workl(ibd+jj-1)),
& dimag (workl(ibd+jj-1)) )
& dlapy2( dble(workl(ibd+jj-1)),
& dimag(workl(ibd+jj-1)) )
& .le. tol*rtemp) then
select(jj) = .true.
numcnv = numcnv + 1
if (jj .gt. nev) reord = .true.
if (jj .gt. nconv) reord = .true.
endif
11 continue
c
@@ -548,22 +548,22 @@ c
end if
c
c %-------------------------------------------------------%
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by ZNAUPD . |
c | Call LAPACK routine zlahqr to compute the Schur form |
c | of the upper Hessenberg matrix returned by ZNAUPD. |
c | Make a copy of the upper Hessenberg matrix. |
c | Initialize the Schur vector matrix Q to the identity. |
c %-------------------------------------------------------%
c
call zcopy (ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset ('All', ncv, ncv ,
call zcopy(ldh*ncv, workl(ih), 1, workl(iuptri), 1)
call zlaset('All', ncv, ncv ,
& zero , one, workl(invsub),
& ldq)
call zlahqr (.true., .true. , ncv ,
call zlahqr(.true., .true. , ncv ,
& 1 , ncv , workl(iuptri),
& ldh , workl(iheig) , 1 ,
& ncv , workl(invsub), ldq ,
& ierr)
call zcopy (ncv , workl(invsub+ncv-1), ldq,
call zcopy(ncv , workl(invsub+ncv-1), ldq,
& workl(ihbds), 1)
c
if (ierr .ne. 0) then
@@ -572,12 +572,12 @@ c
end if
c
if (msglvl .gt. 1) then
call zvout (logfil, ncv, workl(iheig), ndigit,
call zvout (logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H')
call zvout (logfil, ncv, workl(ihbds), ndigit,
call zvout (logfil, ncv, workl(ihbds), ndigit,
& '_neupd: Last row of the Schur vector matrix')
if (msglvl .gt. 3) then
call zmout (logfil , ncv, ncv ,
call zmout (logfil , ncv, ncv ,
& workl(iuptri), ldh, ndigit,
& '_neupd: The upper triangular matrix ')
end if
@@ -589,7 +589,7 @@ c %-----------------------------------------------%
c | Reorder the computed upper triangular matrix. |
c %-----------------------------------------------%
c
call ztrsen ('None' , 'V' , select ,
call ztrsen('None' , 'V' , select ,
& ncv , workl(iuptri), ldh ,
& workl(invsub), ldq , workl(iheig),
& nconv2 , conds , sep ,
@@ -605,10 +605,10 @@ c
end if
c
if (msglvl .gt. 2) then
call zvout (logfil, ncv, workl(iheig), ndigit,
call zvout (logfil, ncv, workl(iheig), ndigit,
& '_neupd: Eigenvalues of H--reordered')
if (msglvl .gt. 3) then
call zmout (logfil , ncv, ncv ,
call zmout(logfil , ncv, ncv ,
& workl(iuptri), ldq, ndigit,
& '_neupd: Triangular matrix after re-ordering')
end if
@@ -623,7 +623,7 @@ c | to compute the Ritz estimates of converged |
c | Ritz values. |
c %---------------------------------------------%
c
call zcopy (ncv , workl(invsub+ncv-1), ldq,
call zcopy(ncv , workl(invsub+ncv-1), ldq,
& workl(ihbds), 1)
c
c %--------------------------------------------%
@@ -632,7 +632,7 @@ c | if a spectral transformation was not used. |
c %--------------------------------------------%
c
if (type .eq. 'REGULR') then
call zcopy (nconv, workl(iheig), 1, d, 1)
call zcopy(nconv, workl(iheig), 1, d, 1)
end if
c
c %----------------------------------------------------------%
@@ -641,12 +641,12 @@ c | the wanted invariant subspace located in the first NCONV |
c | columns of workl(invsub,ldq). |
c %----------------------------------------------------------%
c
call zgeqr2 (ncv , nconv , workl(invsub),
call zgeqr2(ncv , nconv , workl(invsub),
& ldq , workev, workev(ncv+1),
& ierr)
c
c %--------------------------------------------------------%
c | * Postmultiply V by Q using zunm2r . |
c | * Postmultiply V by Q using zunm2r. |
c | * Copy the first NCONV columns of VQ into Z. |
c | * Postmultiply Z by R. |
c | The N by NCONV matrix Z is now a matrix representation |
@@ -657,11 +657,11 @@ c | associated with the upper triangular matrix of order |
c | NCONV in workl(iuptri). |
c %--------------------------------------------------------%
c
call zunm2r ('Right', 'Notranspose', n ,
call zunm2r('Right', 'Notranspose', n ,
& ncv , nconv , workl(invsub),
& ldq , workev , v ,
& ldv , workd(n+1) , ierr)
call zlacpy ('All', n, nconv, v, ldv, z, ldz)
call zlacpy('All', n, nconv, v, ldv, z, ldz)
c
do 20 j=1, nconv
c
@@ -674,10 +674,10 @@ c | Note that since Q is orthogonal, R is a diagonal |
c | matrix consisting of plus or minus ones. |
c %---------------------------------------------------%
c
if ( dble ( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble (zero) ) then
call zscal (nconv, -one, workl(iuptri+j-1), ldq)
call zscal (nconv, -one, workl(iuptri+(j-1)*ldq), 1)
if ( dble( workl(invsub+(j-1)*ldq+j-1) ) .lt.
& dble(zero) ) then
call zscal(nconv, -one, workl(iuptri+j-1), ldq)
call zscal(nconv, -one, workl(iuptri+(j-1)*ldq), 1)
end if
c
20 continue
@@ -697,7 +697,7 @@ c
end if
30 continue
c
call ztrevc ('Right', 'Select' , select ,
call ztrevc('Right', 'Select' , select ,
& ncv , workl(iuptri), ldq ,
& vl , 1 , workl(invsub),
& ldq , ncv , outncv ,
@@ -711,15 +711,15 @@ c
c %------------------------------------------------%
c | Scale the returning eigenvectors so that their |
c | Euclidean norms are all one. LAPACK subroutine |
c | ztrevc returns each eigenvector normalized so |
c | ztrevc returns each eigenvector normalized so |
c | that the element of largest magnitude has |
c | magnitude 1. |
c %------------------------------------------------%
c
do 40 j=1, nconv
rtemp = dznrm2 (ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble (one) / rtemp
call zdscal ( ncv, rtemp,
rtemp = dznrm2(ncv, workl(invsub+(j-1)*ldq), 1)
rtemp = dble(one) / rtemp
call zdscal ( ncv, rtemp,
& workl(invsub+(j-1)*ldq), 1 )
c
c %------------------------------------------%
@@ -731,17 +731,17 @@ c | upper triangular, thus the length of the |
c | inner product can be set to j. |
c %------------------------------------------%
c
workev(j) = zdotc (j, workl(ihbds), 1,
workev(j) = zdotc(j, workl(ihbds), 1,
& workl(invsub+(j-1)*ldq), 1)
40 continue
c
if (msglvl .gt. 2) then
call zcopy (nconv, workl(invsub+ncv-1), ldq,
call zcopy(nconv, workl(invsub+ncv-1), ldq,
& workl(ihbds), 1)
call zvout (logfil, nconv, workl(ihbds), ndigit,
call zvout (logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Last row of the eigenvector matrix for T')
if (msglvl .gt. 3) then
call zmout (logfil , ncv, ncv ,
call zmout(logfil , ncv, ncv ,
& workl(invsub), ldq, ndigit,
& '_neupd: The eigenvector matrix for T')
end if
@@ -751,14 +751,14 @@ c %---------------------------------------%
c | Copy Ritz estimates into workl(ihbds) |
c %---------------------------------------%
c
call zcopy (nconv, workev, 1, workl(ihbds), 1)
call zcopy(nconv, workev, 1, workl(ihbds), 1)
c
c %----------------------------------------------%
c | The eigenvector matrix Q of T is triangular. |
c | Form Z*Q. |
c %----------------------------------------------%
c
call ztrmm ('Right' , 'Upper' , 'No transpose',
call ztrmm('Right' , 'Upper' , 'No transpose',
& 'Non-unit', n , nconv ,
& one , workl(invsub), ldq ,
& z , ldz)
@@ -768,12 +768,12 @@ c
c
c %--------------------------------------------------%
c | An approximate invariant subspace is not needed. |
c | Place the Ritz values computed ZNAUPD into D. |
c | Place the Ritz values computed ZNAUPD into D. |
c %--------------------------------------------------%
c
call zcopy (nconv, workl(ritz), 1, d, 1)
call zcopy (nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy (nconv, workl(bounds), 1, workl(ihbds), 1)
call zcopy(nconv, workl(ritz), 1, d, 1)
call zcopy(nconv, workl(ritz), 1, workl(iheig), 1)
call zcopy(nconv, workl(bounds), 1, workl(ihbds), 1)
c
end if
c
@@ -786,7 +786,7 @@ c
if (type .eq. 'REGULR') then
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
else
c
@@ -797,7 +797,7 @@ c | Ritz values in the original system. |
c %---------------------------------------%
c
if (rvec)
& call zscal (ncv, rnorm, workl(ihbds), 1)
& call zscal(ncv, rnorm, workl(ihbds), 1)
c
do 50 k=1, ncv
temp = workl(iheig+k-1)
@@ -821,14 +821,14 @@ c
end if
c
if (type .ne. 'REGULR' .and. msglvl .gt. 1) then
call zvout (logfil, nconv, d, ndigit,
call zvout (logfil, nconv, d, ndigit,
& '_neupd: Untransformed Ritz values.')
call zvout (logfil, nconv, workl(ihbds), ndigit,
call zvout (logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Ritz estimates of the untransformed Ritz values.')
else if ( msglvl .gt. 1) then
call zvout (logfil, nconv, d, ndigit,
call zvout (logfil, nconv, d, ndigit,
& '_neupd: Converged Ritz values.')
call zvout (logfil, nconv, workl(ihbds), ndigit,
call zvout (logfil, nconv, workl(ihbds), ndigit,
& '_neupd: Associated Ritz estimates.')
end if
c
@@ -861,7 +861,7 @@ c | Perform a rank one update to Z and |
c | purify all the Ritz vectors together. |
c %---------------------------------------%
c
call zgeru (n, nconv, one, resid, 1, workev, 1, z, ldz)
call zgeru (n, nconv, one, resid, 1, workev, 1, z, ldz)
c
end if
c
@@ -870,7 +870,7 @@ c
return
c
c %---------------%
c | End of zneupd |
c | End of zneupd|
c %---------------%
c
end
+5
View File
@@ -0,0 +1,5 @@
bin_PROGRAMS = dnsimp
dnsimp_SOURCES = dnsimp.f mmio.f
dnsimp_LDADD=../libarpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
+503
View File
@@ -0,0 +1,503 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = dnsimp$(EXEEXT)
subdir = TESTS
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_blas.m4 \
$(top_srcdir)/m4/ax_lapack.m4 $(top_srcdir)/m4/ax_mpi.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_dnsimp_OBJECTS = dnsimp.$(OBJEXT) mmio.$(OBJEXT)
dnsimp_OBJECTS = $(am_dnsimp_OBJECTS)
am__DEPENDENCIES_1 =
dnsimp_DEPENDENCIES = ../libarpack.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@
F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
F77LD = $(F77)
F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(dnsimp_SOURCES)
DIST_SOURCES = $(dnsimp_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BLAS_LIBS = @BLAS_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FLIBS = @FLIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LAPACK_LIBS = @LAPACK_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
dnsimp_SOURCES = dnsimp.f mmio.f
dnsimp_LDADD = ../libarpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign TESTS/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign TESTS/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
dnsimp$(EXEEXT): $(dnsimp_OBJECTS) $(dnsimp_DEPENDENCIES) $(EXTRA_dnsimp_DEPENDENCIES)
@rm -f dnsimp$(EXEEXT)
$(F77LINK) $(dnsimp_OBJECTS) $(dnsimp_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.f.o:
$(F77COMPILE) -c -o $@ $<
.f.obj:
$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.f.lo:
$(LTF77COMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+16
View File
@@ -0,0 +1,16 @@
c
c\SCCS Information: @(#)
c FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2
c
c %---------------------------------%
c | See debug.doc for documentation |
c %---------------------------------%
integer logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
common /debug/
& logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
+540
View File
@@ -0,0 +1,540 @@
program dnsimp
c
c
c This example program is intended to illustrate the
c simplest case of using ARPACK in considerable detail.
c This code may be used to understand basic usage of ARPACK
c and as a template for creating an interface to ARPACK.
c
c This code shows how to use ARPACK to find a few eigenvalues
c (lambda) and corresponding eigenvectors (x) for the standard
c eigenvalue problem:
c
c A*x = lambda*x
c
c where A is a n by n real nonsymmetric matrix.
c
c The main points illustrated here are
c
c 1) How to declare sufficient memory to find NEV
c eigenvalues of largest magnitude. Other options
c are available.
c
c 2) Illustration of the reverse communication interface
c needed to utilize the top level ARPACK routine DNAUPD
c that computes the quantities needed to construct
c the desired eigenvalues and eigenvectors(if requested).
c
c 3) How to extract the desired eigenvalues and eigenvectors
c using the ARPACK routine DNEUPD.
c
c The only thing that must be supplied in order to use this
c routine on your problem is to change the array dimensions
c appropriately, to specify WHICH eigenvalues you want to compute
c and to supply a matrix-vector product
c
c w <- Av
c
c in place of the call to AV( ) below.
c
c Once usage of this routine is understood, you may wish to explore
c the other available options to improve convergence, to solve generalized
c problems, etc. Look at the file ex-nonsym.doc in DOCUMENTS directory.
c This codes implements
c
c\Example-1
c ... Suppose we want to solve A*x = lambda*x in regular mode,
c where A is obtained from the standard central difference
c discretization of the convection-diffusion operator
c (Laplacian u) + rho*(du / dx)
c on the unit square, with zero Dirichlet boundary condition.
c
c ... OP = A and B = I.
c ... Assume "call av (nx,x,y)" computes y = A*x
c ... Use mode 1 of DNAUPD.
c
c\BeginLib
c
c\Routines called:
c dnaupd ARPACK reverse communication interface routine.
c dneupd ARPACK routine that returns Ritz values and (optionally)
c Ritz vectors.
c dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
c daxpy Level 1 BLAS that computes y <- alpha*x+y.
c dnrm2 Level 1 BLAS that computes the norm of a vector.
c av Matrix vector multiplication routine that computes A*x.
c tv Matrix vector multiplication routine that computes T*x,
c where T is a tridiagonal matrix. It is used in routine
c av.
c
c\Author
c Richard Lehoucq
c Danny Sorensen
c Chao Yang
c Dept. of Computational &
c Applied Mathematics
c Rice University
c Houston, Texas
c
c\SCCS Information: @(#)
c FILE: nsimp.F SID: 2.5 DATE OF SID: 10/17/00 RELEASE: 2
c
c\Remarks
c 1. None
c
c\EndLib
c---------------------------------------------------------------------------
c
c %------------------------------------------------------%
c | Storage Declarations: |
c | |
c | The maximum dimensions for all arrays are |
c | set here to accommodate a problem size of |
c | N .le. MAXN |
c | |
c | NEV is the number of eigenvalues requested. |
c | See specifications for ARPACK usage below. |
c | |
c | NCV is the largest number of basis vectors that will |
c | be used in the Implicitly Restarted Arnoldi |
c | Process. Work per major iteration is |
c | proportional to N*NCV*NCV. |
c | |
c | You must set: |
c | |
c | MAXN: Maximum dimension of the A allowed. |
c | MAXNEV: Maximum NEV allowed. |
c | MAXNCV: Maximum NCV allowed. |
c %------------------------------------------------------%
c
integer maxn, maxnev, maxncv, ldv
parameter (maxn=2500, maxnev=12, maxncv=30, ldv=maxn)
c
c %--------------%
c | Local Arrays |
c %--------------%
c
integer iparam(11), ipntr(14)
logical select(maxncv)
Double precision
& ax(maxn), d(maxncv,3), resid(maxn),
& v(ldv,maxncv), workd(3*maxn),
& workev(3*maxncv),
& workl(3*maxncv*maxncv+6*maxncv)
c
c %---------------%
c | Local Scalars |
c %---------------%
c
character bmat*1, which*2
integer ido, n, nx, nev, ncv, lworkl, info, ierr,
& j, ishfts, maxitr, mode1, nconv
Double precision
& tol, sigmar, sigmai
logical first, rvec
c
c %------------%
c | Parameters |
c %------------%
c
Double precision
& zero
parameter (zero = 0.0D+0)
c
c %-----------------------------%
c | BLAS & LAPACK routines used |
c %-----------------------------%
c
Double precision
& dlapy2, dnrm2
external dlapy2, dnrm2, daxpy
c
c %--------------------%
c | Intrinsic function |
c %--------------------%
c
intrinsic abs
c
c Storage and variables for getting matrix from disk
c
integer dimA, sizeA
parameter (dimA = 50)
parameter (sizeA = dimA*dimA)
character rep*10
character field*7
character symm*19
double precision A(sizeA)
c
c %-----------------------%
c | Executable Statements |
c %-----------------------%
c
c %-------------------------------------------------%
c | The following include statement and assignments |
c | initiate trace output from the internal |
c | actions of ARPACK. See debug.doc in the |
c | DOCUMENTS directory for usage. Initially, the |
c | most useful information will be a breakdown of |
c | time spent in the various stages of computation |
c | given by setting mnaupd = 1. |
c %-------------------------------------------------%
c
include 'debug.h'
ndigit = -3
logfil = 6
mnaitr = 0
mnapps = 0
mnaupd = 1
mnaup2 = 0
mneigh = 0
mneupd = 0
c
c Read in A matrix from disk, Matrix Market format
c
open(10, FILE='testA.mtx',STATUS='OLD')
call mmread(10,rep,field,symm,nrows,ncols,nnz,sizeA,
* temp,temp,temp,A,temp)
close(10)
c
c %-------------------------------------------------%
c | The following sets dimensions for this problem. |
c %-------------------------------------------------%
c
nx = dimA
n = nx*nx
c
c %-----------------------------------------------%
c | |
c | Specifications for ARPACK usage are set |
c | below: |
c | |
c | 1) NEV = 4 asks for 4 eigenvalues to be |
c | computed. |
c | |
c | 2) NCV = 20 sets the length of the Arnoldi |
c | factorization. |
c | |
c | 3) This is a standard problem. |
c | (indicated by bmat = 'I') |
c | |
c | 4) Ask for the NEV eigenvalues of |
c | largest magnitude. |
c | (indicated by which = 'LM') |
c | See documentation in DNAUPD for the |
c | other options SM, LR, SR, LI, SI. |
c | |
c | Note: NEV and NCV must satisfy the following |
c | conditions: |
c | NEV <= MAXNEV |
c | NEV + 2 <= NCV <= MAXNCV |
c | |
c %-----------------------------------------------%
c
nev = 10
ncv = 20
bmat = 'I'
which = 'SR'
c
if ( n .gt. maxn ) then
print *, ' ERROR with _NSIMP: N is greater than MAXN '
go to 9000
else if ( nev .gt. maxnev ) then
print *, ' ERROR with _NSIMP: NEV is greater than MAXNEV '
go to 9000
else if ( ncv .gt. maxncv ) then
print *, ' ERROR with _NSIMP: NCV is greater than MAXNCV '
go to 9000
end if
c
c %-----------------------------------------------------%
c | |
c | Specification of stopping rules and initial |
c | conditions before calling DNAUPD |
c | |
c | TOL determines the stopping criterion. |
c | |
c | Expect |
c | abs(lambdaC - lambdaT) < TOL*abs(lambdaC) |
c | computed true |
c | |
c | If TOL .le. 0, then TOL <- macheps |
c | (machine precision) is used. |
c | |
c | IDO is the REVERSE COMMUNICATION parameter |
c | used to specify actions to be taken on return |
c | from DNAUPD. (see usage below) |
c | |
c | It MUST initially be set to 0 before the first |
c | call to DNAUPD. |
c | |
c | INFO on entry specifies starting vector information |
c | and on return indicates error codes |
c | |
c | Initially, setting INFO=0 indicates that a |
c | random starting vector is requested to |
c | start the ARNOLDI iteration. Setting INFO to |
c | a nonzero value on the initial call is used |
c | if you want to specify your own starting |
c | vector (This vector must be placed in RESID). |
c | |
c | The work array WORKL is used in DNAUPD as |
c | workspace. Its dimension LWORKL is set as |
c | illustrated below. |
c | |
c %-----------------------------------------------------%
c
lworkl = 3*ncv**2+6*ncv
tol = zero
ido = 0
info = 0
c
c %---------------------------------------------------%
c | Specification of Algorithm Mode: |
c | |
c | This program uses the exact shift strategy |
c | (indicated by setting IPARAM(1) = 1). |
c | IPARAM(3) specifies the maximum number of Arnoldi |
c | iterations allowed. Mode 1 of DNAUPD is used |
c | (IPARAM(7) = 1). All these options can be changed |
c | by the user. For details see the documentation in |
c | DNAUPD. |
c %---------------------------------------------------%
c
ishfts = 1
maxitr = 30
mode1 = 1
c
iparam(1) = ishfts
c
iparam(3) = maxitr
c
iparam(7) = mode1
c
c %-------------------------------------------%
c | M A I N L O O P (Reverse communication) |
c %-------------------------------------------%
c
10 continue
c
c %---------------------------------------------%
c | Repeatedly call the routine DNAUPD and take |
c | actions indicated by parameter IDO until |
c | either convergence is indicated or maxitr |
c | has been exceeded. |
c %---------------------------------------------%
c
call dnaupd ( ido, bmat, n, which, nev, tol, resid, ncv,
& v, ldv, iparam, ipntr, workd, workl, lworkl,
& info )
c
if (ido .eq. -1 .or. ido .eq. 1) then
c
c %-------------------------------------------%
c | Perform matrix vector multiplication |
c | y <--- Op*x |
c | The user should supply his/her own |
c | matrix vector multiplication routine here |
c | that takes workd(ipntr(1)) as the input |
c | vector, and return the matrix vector |
c | product to workd(ipntr(2)). |
c %-------------------------------------------%
c
call av (nx, A, workd(ipntr(1)), workd(ipntr(2)))
c
c %-----------------------------------------%
c | L O O P B A C K to call DNAUPD again. |
c %-----------------------------------------%
c
go to 10
c
endif
c
c %----------------------------------------%
c | Either we have convergence or there is |
c | an error. |
c %----------------------------------------%
c
if ( info .lt. 0 ) then
c
c %--------------------------%
c | Error message, check the |
c | documentation in DNAUPD. |
c %--------------------------%
c
print *, ' '
print *, ' Error with _naupd, info = ',info
print *, ' Check the documentation of _naupd'
print *, ' '
c
else
c
c %-------------------------------------------%
c | No fatal errors occurred. |
c | Post-Process using DNEUPD. |
c | |
c | Computed eigenvalues may be extracted. |
c | |
c | Eigenvectors may be also computed now if |
c | desired. (indicated by rvec = .true.) |
c | |
c | The routine DNEUPD now called to do this |
c | post processing (Other modes may require |
c | more complicated post processing than |
c | mode1,) |
c | |
c %-------------------------------------------%
c
c change to .true. to invoke bug with latest ARPACK
rvec = .true.
c
call dneupd ( rvec, 'A', select, d, d(1,2), v, ldv,
& sigmar, sigmai, workev, bmat, n, which, nev, tol,
& resid, ncv, v, ldv, iparam, ipntr, workd, workl,
& lworkl, ierr )
c
c %------------------------------------------------%
c | The real parts of the eigenvalues are returned |
c | in the first column of the two dimensional |
c | array D, and the IMAGINARY part are returned |
c | in the second column of D. The corresponding |
c | eigenvectors are returned in the first |
c | NCONV (= IPARAM(5)) columns of the two |
c | dimensional array V if requested. Otherwise, |
c | an orthogonal basis for the invariant subspace |
c | corresponding to the eigenvalues in D is |
c | returned in V. |
c %------------------------------------------------%
c
if ( ierr .ne. 0) then
c
c %------------------------------------%
c | Error condition: |
c | Check the documentation of DNEUPD. |
c %------------------------------------%
c
print *, ' '
print *, ' Error with _neupd, info = ', ierr
print *, ' Check the documentation of _neupd. '
print *, ' '
c
else
c
first = .true.
nconv = iparam(5)
do 20 j=1, nconv
c
c %---------------------------%
c | Compute the residual norm |
c | |
c | || A*x - lambda*x || |
c | |
c | for the NCONV accurately |
c | computed eigenvalues and |
c | eigenvectors. (IPARAM(5) |
c | indicates how many are |
c | accurate to the requested |
c | tolerance) |
c %---------------------------%
c
if (d(j,2) .eq. zero) then
c
c %--------------------%
c | Ritz value is real |
c %--------------------%
c
call av(nx, A, v(1,j), ax)
call daxpy(n, -d(j,1), v(1,j), 1, ax, 1)
d(j,3) = dnrm2(n, ax, 1)
d(j,3) = d(j,3) / abs(d(j,1))
c
else if (first) then
c
c %------------------------%
c | Ritz value is complex. |
c | Residual of one Ritz |
c | value of the conjugate |
c | pair is computed. |
c %------------------------%
c
call av(nx, A, v(1,j), ax)
call daxpy(n, -d(j,1), v(1,j), 1, ax, 1)
call daxpy(n, d(j,2), v(1,j+1), 1, ax, 1)
d(j,3) = dnrm2(n, ax, 1)
call av(nx, A, v(1,j+1), ax)
call daxpy(n, -d(j,2), v(1,j), 1, ax, 1)
call daxpy(n, -d(j,1), v(1,j+1), 1, ax, 1)
d(j,3) = dlapy2( d(j,3), dnrm2(n, ax, 1) )
d(j,3) = d(j,3) / dlapy2(d(j,1),d(j,2))
d(j+1,3) = d(j,3)
first = .false.
else
first = .true.
end if
c
20 continue
c
c %-----------------------------%
c | Display computed residuals. |
c %-----------------------------%
c
call dmout(6, nconv, 3, d, maxncv, -6,
& 'Ritz values (Real, Imag) and residual residuals')
end if
c
c %-------------------------------------------%
c | Print additional convergence information. |
c %-------------------------------------------%
c
if ( info .eq. 1) then
print *, ' '
print *, ' Maximum number of iterations reached.'
print *, ' '
else if ( info .eq. 3) then
print *, ' '
print *, ' No shifts could be applied during implicit',
& ' Arnoldi update, try increasing NCV.'
print *, ' '
end if
c
print *, ' '
print *, ' _NSIMP '
print *, ' ====== '
print *, ' '
print *, ' Size of the matrix is ', n
print *, ' The number of Ritz values requested is ', nev
print *, ' The number of Arnoldi vectors generated',
& ' (NCV) is ', ncv
print *, ' What portion of the spectrum: ', which
print *, ' The number of converged Ritz values is ',
& nconv
print *, ' The number of Implicit Arnoldi update',
& ' iterations taken is ', iparam(3)
print *, ' The number of OP*x is ', iparam(9)
print *, ' The convergence criterion is ', tol
print *, ' '
c
end if
c
c %---------------------------%
c | Done with program dnsimp. |
c %---------------------------%
c
9000 continue
c
end
c
c==========================================================================
c
c matrix vector subroutine for Matrix Market format
c
subroutine av (nx, A, v, w)
integer nx
double precision A(nx*nx)
double precision v(nx)
double precision w(nx)
CALL DGEMV('N', nx, nx, 1.D0, A, nx, v, 1, 0.D0, w, 1)
return
end
c==========================================================================
+824
View File
@@ -0,0 +1,824 @@
subroutine mmread(iunit,rep,field,symm,rows,cols,nnz,nnzmax,
* indx,jndx,ival,rval,cval)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c This routine will read data from a matrix market formatted file.
c The data may be either sparse coordinate format, or dense array format.
c
c The unit iunit must be open, and the file will be rewound on return.
c
c 20-Sept-96 Karin A. Remington, NIST ACMD (karin@cam.nist.gov)
c 18-Oct-96 Change in routine name to match C and Matlab routines.
c 30-Oct-96 Bug fixes in mmio.f:
c -looping for comment lines
c -fixed non-ansi zero stringlength
c -incorrect size calculation for skew-symmetric arrays
c Other changes in mmio.f:
c -added integer value parameter to calling sequences
c -enforced proper count in size info line
c -added routine to count words in string (countwd)
c (Thanks to G.P.Leendetse and H.Oudshoom for their review
c of the initial version and suggested fixes.)
c 15-Oct-08 fixed illegal attempt of mimicking "do while" construct
c by redifing limits inside loop. (lines 443-450)
c (Thanks to Geraldo Veiga for his comments.)
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Arguments:
c
c name type in/out description
c ---------------------------------------------------------------
c
c iunit integer in Unit identifier for the file
c containing the data to be read.
c Must be open prior to call.
c Will be rewound on return.
c
c rep character*10 out Matrix Market 'representation'
c indicator. On return:
c
c coordinate (for sparse data)
c array (for dense data)
c elemental (to be added)
c
c field character*7 out Matrix Market 'field'. On return:
c
c real
c complex
c integer
c pattern
c
c symm character*19 out Matrix Market 'field'. On return:
c
c symmetric
c hermitian
c skew-symmetric
c general
c
c rows integer out Number of rows in matrix.
c
c cols integer out Number of columns in matrix.
c
c nnz integer out Number of nonzero entries required to
c store matrix.
c
c nnzmax integer in Maximum dimension of data arrays.
c
c indx integer(nnz)out Row indices for coordinate format.
c Undefined for array format.
c
c jndx integer(nnz)out Column indices for coordinate format.
c Undefined for array format.
c
c ival integer(nnz) out Integer data (if applicable, see 'field')
c
c rval double(nnz) out Real data (if applicable, see 'field')
c
c cval complex(nnz)out Complex data (if applicable, see 'field')
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Declarations:
c
integer ival(*)
double precision rval(*)
complex cval(*)
double precision rpart,ipart
integer indx(*)
integer jndx(*)
integer i, rows, cols, nnz, nnzreq, nnzmax, iunit
integer count
character mmhead*15
character mmtype*6
character rep*10
character field*7
character symm*19
character tmp1*1024
character tmp2*2
c
c Read header line and check validity:
c
read (iunit,end=1000,fmt=5) tmp1
5 format(1024A)
call getwd(mmhead,tmp1,1024,1,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(mmtype,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(rep,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(field,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(symm,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
if ( mmhead .ne. '%%MatrixMarket' ) go to 5000
c
c Convert type code to lower case for easier comparisons:
c
call lowerc(mmtype,1,6)
if ( mmtype .ne. 'matrix' ) then
print *,'Invalid matrix type: ',mmtype
print *,'This reader only understands type ''matrix''.'
stop
else
call lowerc(rep,1,10)
call lowerc(field,1,7)
call lowerc(symm,1,19)
endif
c
c Test input qualifiers:
c
if (rep .ne. 'coordinate' .and. rep .ne. 'array' )
* go to 6000
if (rep .eq. 'coordinate' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' .and.
* field .ne. 'pattern') go to 7000
if (rep .eq. 'array' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' ) go to 8000
if (symm .ne. 'general' .and. symm .ne. 'symmetric' .and.
* symm .ne. 'hermitian' .and. symm .ne. 'skew-symmetric')
* go to 9000
c
c Read through comment lines, ignoring content:
c
read (iunit,end=2000,fmt=200) tmp2
200 format(1a)
10 continue
if ( tmp2(1:1) .ne. '%' ) then
go to 20
endif
read (iunit,end=2000,fmt=200) tmp2
go to 10
20 continue
c
c Just read a non-comment.
c Now, back up a line, and read for first int, and back up
c again. This will set pointer to just before apparent size
c info line.
c Before continuing with free form input, count the number of
c words on the size info line to ensure there is the right amount
c of info (2 words for array matrices, 3 for coordinate matrices).
c
backspace (iunit)
read (iunit,end=1000,fmt=5) tmp1
call countwd(tmp1,1024,1,count)
if ( rep .eq. 'array' .and. count .ne. 2 ) go to 3000
if ( rep .eq. 'coordinate' .and. count .ne. 3 ) go to 3500
c
c Correct number of words are present, now back up and read them.
c
backspace (iunit)
c
if ( rep .eq. 'coordinate' ) then
c
c Read matrix in sparse coordinate format
c
read (iunit,fmt=*) rows,cols,nnz
c
c Check to ensure adequate storage is available
c
if ( nnz .gt. nnzmax ) then
print *,'insufficent array lengths for matrix of ',nnz,
* ' nonzeros.'
print *,'resize nnzmax to at least ',nnz,'. (currently ',
* nnzmax,')'
stop
endif
c
c Read data according to data type (real,integer,complex, or pattern)
c
if ( field .eq. 'integer' ) then
do 30 i=1,nnz
read (iunit,fmt=*,end=4000) indx(i),jndx(i),ival(i)
30 continue
elseif ( field .eq. 'real' ) then
do 35 i=1,nnz
read (iunit,fmt=*,end=4000) indx(i),jndx(i),rval(i)
35 continue
elseif ( field .eq. 'complex' ) then
do 40 i=1,nnz
read (iunit,fmt=*,end=4000) indx(i),jndx(i),rpart,ipart
cval(i) = cmplx(rpart,ipart)
40 continue
elseif ( field .eq. 'pattern' ) then
do 50 i=1,nnz
read (iunit,fmt=*,end=4000) indx(i),jndx(i)
50 continue
else
print *,'''',field,''' data type not recognized.'
stop
endif
rewind(iunit)
return
c
elseif ( rep .eq. 'array' ) then
c
c Read matrix in dense column-oriented array format
c
read (iunit,fmt=*) rows,cols
c
c Check to ensure adequate storage is available
c
if ( symm .eq. 'symmetric' .or. symm .eq. 'hermitian' ) then
nnzreq = (rows*cols - rows)/2 + rows
nnz = nnzreq
elseif ( symm .eq. 'skew-symmetric' ) then
nnzreq = (rows*cols - rows)/2
nnz = nnzreq
else
nnzreq = rows*cols
nnz = nnzreq
endif
if ( nnzreq .gt. nnzmax ) then
print *,'insufficent array length for ',rows, ' by ',
* cols,' dense ',symm,' matrix.'
print *,'resize nnzmax to at least ',nnzreq,'. (currently ',
* nnzmax,')'
stop
endif
c
c Read data according to data type (real,integer,complex, or pattern)
c
if ( field .eq. 'integer' ) then
do 60 i=1,nnzreq
read (iunit,fmt=*,end=4000) ival(i)
60 continue
elseif ( field .eq. 'real' ) then
do 65 i=1,nnzreq
read (iunit,fmt=*,end=4000) rval(i)
65 continue
elseif ( field .eq. 'complex' ) then
do 70 i=1,nnzreq
read (iunit,fmt=*,end=4000) rpart,ipart
cval(i) = cmplx(rpart,ipart)
70 continue
else
print *,'''pattern'' data not consistant with type ''array'''
stop
endif
rewind(iunit)
return
else
print *,'''',rep,''' representation not recognized.'
print *, 'Recognized representations:'
print *, ' array'
print *, ' coordinate'
stop
endif
c
c Various error conditions:
c
1000 print *,'Premature end-of-file.'
print *,'No lines found.'
stop
2000 print *,'Premature end-of-file.'
print *,'No data lines found.'
stop
3000 print *,'Size info inconsistant with representation.'
print *,'Array matrices need exactly 2 size descriptors.'
print *, count,' were found.'
stop
3500 print *,'Size info inconsistant with representation.'
print *,'Coordinate matrices need exactly 3 size descriptors.'
print *, count,' were found.'
stop
4000 print *,'Premature end-of-file.'
print *,'Check that the data file contains ',nnz,
* ' lines of i,j,[val] data.'
print *,'(it appears there are only ',i,' such lines.)'
stop
5000 print *,'Invalid matrix header: ',tmp1
print *,'Correct header format:'
print *,'%%MatrixMarket type representation field symmetry'
print *
print *,'Check specification and try again.'
6000 print *,'''',rep,''' representation not recognized.'
print *, 'Recognized representations:'
print *, ' array'
print *, ' coordinate'
stop
7000 print *,'''',field,''' field is not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
print *, ' pattern'
stop
8000 print *,'''',field,''' arrays are not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
stop
9000 print *,'''',symm,''' symmetry is not recognized.'
print *, 'Recognized symmetries:'
print *, ' general'
print *, ' symmetric'
print *, ' hermitian'
print *, ' skew-symmetric'
stop
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c End of subroutine mmread
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine mminfo(iunit,rep,field,symm,rows,cols,nnz)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c This routine will read header information from a Matrix Market
c formatted file.
c
c The unit iunit must be open, and the file will be rewound on return.
c
c 20-Sept-96 Karin A. Remington, NIST ACMD (karin@cam.nist.gov)
c 18-Oct-96 Change in routine name to match C and Matlab routines.
c 30-Oct-96 Bug fixes in mmio.f:
c -looping for comment lines
c -fixed non-ansi zero stringlength
c -incorrect size calculation for skew-symmetric arrays
c Other changes in mmio.f:
c -added integer value parameter to calling sequences
c -enforced proper count in size info line
c -added routine to count words in string (countwd)
c (Thanks to G.P.Leendetse and H.Oudshoom for their review
c of the initial version and suggested fixes.)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Arguments:
c
c name type in/out description
c ---------------------------------------------------------------
c
c iunit integer in Unit identifier for the open file
c containing the data to be read.
c
c rep character*10 out Matrix Market 'representation'
c indicator. On return:
c
c coordinate (for sparse data)
c array (for dense data)
c elemental (to be added)
c
c field character*7 out Matrix Market 'field'. On return:
c
c real
c complex
c integer
c pattern
c
c symm character*19 out Matrix Market 'field'. On return:
c
c symmetric
c hermitian
c skew-symmetric
c general
c
c rows integer out Number of rows in matrix.
c
c cols integer out Number of columns in matrix.
c
c nnz integer out Number of nonzero entries required to store
c the matrix.
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Declarations:
c
integer i, rows, cols, nnz, iunit
integer count
character mmhead*14
character mmtype*6
character rep*10
character field*7
character symm*19
character tmp1*1024
character tmp2*2
c
c Read header line and check validity:
c
read (iunit,end=1000,fmt=5) tmp1
5 format(1024A)
c
c Parse words from header line:
c
call getwd(mmhead,tmp1,1024,1,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(mmtype,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(rep,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(field,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
call getwd(symm,tmp1,1024,next,next,count)
if ( count .eq. 0 ) go to 5000
if ( mmhead .ne. '%%MatrixMarket' ) go to 5000
c
c Convert type code to upper case for easier comparisons:
c
call lowerc(mmtype,1,6)
if ( mmtype .ne. 'matrix' ) then
print *,'Invalid matrix type: ',mmtype
print *,'This reader only understands type ''matrix''.'
stop
else
call lowerc(rep,1,10)
call lowerc(field,1,7)
call lowerc(symm,1,19)
endif
c
c Test input qualifiers:
c
if (rep .ne. 'coordinate' .and. rep .ne. 'array' )
* go to 6000
if (rep .eq. 'coordinate' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' .and.
* field .ne. 'pattern') go to 7000
if (rep .eq. 'array' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' ) go to 8000
if (symm .ne. 'general' .and. symm .ne. 'symmetric' .and.
* symm .ne. 'hermitian' .and. symm .ne. 'skew-symmetric')
* go to 9000
c
c Read through comment lines, ignoring content:
c
read (iunit,end=2000,fmt=200) tmp2
200 format(1a)
10 continue
if ( tmp2(1:1) .ne. '%' ) then
go to 20
endif
read (iunit,end=2000,fmt=200) tmp2
go to 10
20 continue
c
c Just read a non-comment.
c Now, back up a line, and read for first int, and back up
c again. This will set pointer to just before apparent size
c info line.
c Before continuing with free form input, count the number of
c words on the size info line to ensure there is the right amount
c of info (2 words for array matrices, 3 for coordinate matrices).
c
backspace (iunit)
read (iunit,end=1000,fmt=5) tmp1
call countwd(tmp1,1024,1,count)
if ( rep .eq. 'array' .and. count .ne. 2 ) go to 3000
if ( rep .eq. 'coordinate' .and. count .ne. 3 ) go to 3500
c
c Correct number of words are present, now back up and read them.
c
backspace (iunit)
c
if ( rep .eq. 'coordinate' ) then
c
c Read matrix in sparse coordinate format
c
read (iunit,fmt=*) rows,cols,nnz
c
c Rewind before returning
c
rewind(iunit)
return
c
elseif ( rep .eq. 'array' ) then
c
c Read matrix in dense column-oriented array format
c
read (iunit,fmt=*) rows,cols
if ( symm .eq. 'symmetric' .or. symm .eq. 'hermitian' ) then
nnz = (rows*cols - rows)/2 + rows
elseif ( symm .eq. 'skew-symmetric' ) then
nnz = (rows*cols - rows)/2
else
nnz = rows*cols
endif
c
c Rewind before returning
c
rewind(iunit)
return
else
print *,'''',rep,''' representation not recognized.'
print *, 'Recognized representations:'
print *, ' array'
print *, ' coordinate'
stop
endif
c
c Various error conditions:
c
1000 print *,'Premature end-of-file.'
print *,'No lines found.'
stop
2000 print *,'Premature end-of-file.'
print *,'No data found.'
stop
3000 print *,'Size info inconsistant with representation.'
print *,'Array matrices need exactly 2 size descriptors.'
print *, count,' were found.'
stop
3500 print *,'Size info inconsistant with representation.'
print *,'Coordinate matrices need exactly 3 size descriptors.'
print *, count,' were found.'
stop
5000 print *,'Invalid matrix header: ',tmp1
print *,'Correct header format:'
print *,'%%MatrixMarket type representation field symmetry'
print *
print *,'Check specification and try again.'
stop
6000 print *,'''',rep,''' representation not recognized.'
print *, 'Recognized representations:'
print *, ' array'
print *, ' coordinate'
stop
7000 print *,'''',field,''' field is not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
print *, ' pattern'
stop
8000 print *,'''',field,''' arrays are not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
stop
9000 print *,'''',symm,''' symmetry is not recognized.'
print *, 'Recognized symmetries:'
print *, ' general'
print *, ' symmetric'
print *, ' hermitian'
print *, ' skew-symmetric'
stop
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c End of subroutine mmread
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine mmwrite(ounit,rep,field,symm,rows,cols,nnz,
* indx,jndx,ival,rval,cval)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c This routine will write data to a matrix market formatted file.
c The data may be either sparse coordinate format, or dense array format.
c
c The unit ounit must be open.
c
c 20-Sept-96 Karin A. Remington, NIST ACMD (karin@cam.nist.gov)
c 18-Oct-96 Change in routine name to match C and Matlab routines.
c 30-Oct-96 Bug fixes in mmio.f:
c -looping for comment lines
c -fixed non-ansi zero stringlength
c -incorrect size calculation for skew-symmetric arrays
c Other changes in mmio.f:
c -added integer value parameter to calling sequences
c -enforced proper count in size info line
c -added routine to count words in string (countwd)
c (Thanks to G.P.Leendetse and H.Oudshoom for their review
c of the initial version and suggested fixes.)
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Arguments:
c
c name type in/out description
c ---------------------------------------------------------------
c
c ounit integer in Unit identifier for the file
c to which the data will be written.
c Must be open prior to call.
c
c rep character* in Matrix Market 'representation'
c indicator. Valid inputs:
c
c coordinate (for sparse data)
c array (for dense data)
c *elemental* (to be added)
c
c field character* in Matrix Market 'field'. Valid inputs:
c
c real
c complex
c integer
c pattern (not valid for dense arrays)
c
c symm character* in Matrix Market 'field'. Valid inputs:
c
c symmetric
c hermitian
c skew-symmetric
c general
c
c rows integer in Number of rows in matrix.
c
c cols integer in Number of columns in matrix.
c
c nnz integer in Number of nonzero entries in matrix.
c (rows*cols for array matrices)
c
c indx integer(nnz)in Row indices for coordinate format.
c Undefined for array format.
c
c jndx integer(nnz)in Column indices for coordinate format.
c Undefined for array format.
c
c ival integer(nnz) in Integer data (if applicable, see 'field')
c
c rval double(nnz) in Real data (if applicable, see 'field')
c
c cval complex(nnz)in Complex data (if applicable, see 'field')
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c Declarations:
c
integer ival(*)
double precision rval(*)
complex cval(*)
integer indx(*)
integer jndx(*)
integer i, rows, cols, nnz, nnzreq, ounit
character*(*)rep,field,symm
c
c Test input qualifiers:
c
if (rep .ne. 'coordinate' .and. rep .ne. 'array' )
* go to 1000
if (rep .eq. 'coordinate' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' .and.
* field .ne. 'pattern') go to 2000
if (rep .eq. 'array' .and. field .ne. 'integer' .and.
* field .ne. 'real' .and. field .ne. 'complex' ) go to 3000
if (symm .ne. 'general' .and. symm .ne. 'symmetric' .and.
* symm .ne. 'hermitian' .and. symm .ne. 'skew-symmetric')
* go to 4000
c
c Write header line:
c
write(unit=ounit,fmt=5)rep,' ',field,' ',symm
5 format('%%MatrixMarket matrix ',11A,1A,8A,1A,20A)
c
c Write size information:
c
if ( rep .eq. 'coordinate' ) then
nnzreq=nnz
write(unit=ounit,fmt=*) rows,cols,nnz
if ( field .eq. 'integer' ) then
do 10 i=1,nnzreq
write(unit=ounit,fmt=*)indx(i),jndx(i),ival(i)
10 continue
elseif ( field .eq. 'real' ) then
do 20 i=1,nnzreq
write(unit=ounit,fmt=*)indx(i),jndx(i),rval(i)
20 continue
elseif ( field .eq. 'complex' ) then
do 30 i=1,nnzreq
write(unit=ounit,fmt=*)indx(i),jndx(i),
* real(cval(i)),aimag(cval(i))
30 continue
else
c field .eq. 'pattern'
do 40 i=1,nnzreq
write(unit=ounit,fmt=*)indx(i),jndx(i)
40 continue
endif
else
c rep .eq. 'array'
if ( symm .eq. 'general' ) then
nnzreq = rows*cols
elseif ( symm .eq. 'symmetric' .or.
* symm .eq. 'hermitian' ) then
nnzreq = (rows*cols - rows)/2 + rows
else
c symm .eq. 'skew-symmetric'
nnzreq = (rows*cols - rows)/2
endif
write(unit=ounit,fmt=*)rows,cols
if ( field .eq. 'integer' ) then
do 50 i=1,nnzreq
write(unit=ounit,fmt=*)ival(i)
50 continue
elseif ( field .eq. 'real' ) then
do 60 i=1,nnzreq
write(unit=ounit,fmt=*)rval(i)
60 continue
else
c field .eq. 'complex'
do 70 i=1,nnzreq
write(unit=ounit,fmt=*)real(cval(i)),aimag(cval(i))
70 continue
endif
endif
return
c
c Various errors
c
1000 print *,'''',rep,''' representation not recognized.'
print *, 'Recognized representations:'
print *, ' array'
print *, ' coordinate'
stop
2000 print *,'''',field,''' field is not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
print *, ' pattern'
stop
3000 print *,'''',field,''' arrays are not recognized.'
print *, 'Recognized fields:'
print *, ' real'
print *, ' complex'
print *, ' integer'
stop
4000 print *,'''',symm,''' symmetry is not recognized.'
print *, 'Recognized symmetries:'
print *, ' general'
print *, ' symmetric'
print *, ' hermitian'
print *, ' skew-symmetric'
stop
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c End of subroutine mmwrite
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine lowerc(string,pos,len)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c Convert uppercase letters to lowercase letters in string with
c starting postion pos and length len.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
integer pos, len
character*(*) string
character*26 lcase, ucase
save lcase,ucase
data lcase/'abcdefghijklmnopqrstuvwxyz'/
data ucase/'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
do 10 i=pos,len
k = index(ucase,string(i:i))
if (k.ne.0) string(i:i) = lcase(k:k)
10 continue
return
end
subroutine getwd(word,string,slen,start,next,wlen)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c Getwd extracts the first word from string starting
c at position start. On return, next is the position
c of the blank which terminates the word in string.
c If the found word is longer than the allocated space
c for the word in the calling program, the word will be
c truncated to fit.
c Count is set to the length of the word found.
c
c 30-Oct-96 Bug fix: fixed non-ansi zero stringlength
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
integer slen, start, next, begin, space, wlen
character*(*) word
character*(*) string
begin = start
do 5 i=start,slen
space = index(string(i:slen),' ')
if ( space .gt. 1) then
next = i+space-1
go to 100
endif
begin=begin+1
5 continue
100 continue
wlen=next-begin
if ( wlen .le. 0 ) then
wlen = 0
word = ' '
return
endif
word=string(begin:begin+wlen)
return
end
subroutine countwd(string,slen,start,count)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c Countwd counts the number of words in string starting
c at position start. On return, count is the number of words.
c 30-Oct-96 Routine added
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
character*(*) string
integer slen, start, next, wordlength, count
character tmp2*2
count = 0
next = 1
10 call getwd(tmp2,string,1024,next,next,wordlength)
if ( wordlength .gt. 0 ) then
count = count + 1
go to 10
endif
return
end
+2502
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
* add a version somewhere to allow configure to detect it
+17 -12
View File
@@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -109,10 +109,10 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPIDIR = @MPIDIR@
MPIF77 = @MPIF77@
MPILIBS = @MPILIBS@
NM = @NM@
@@ -198,7 +198,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .f .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -223,9 +223,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
@@ -237,7 +237,7 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libarpackutil.la: $(libarpackutil_la_OBJECTS) $(libarpackutil_la_DEPENDENCIES)
libarpackutil.la: $(libarpackutil_la_OBJECTS) $(libarpackutil_la_DEPENDENCIES) $(EXTRA_libarpackutil_la_DEPENDENCIES)
$(F77LINK) $(libarpackutil_la_OBJECTS) $(libarpackutil_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -357,10 +357,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
+1 -1
View File
@@ -10,7 +10,7 @@
* Purpose
* =======
*
* SECOND returns the user time for a process in arscnds.
* SECOND returns the user time for a process in seconds.
* This version gets the time from the system function ETIME.
*
* .. Local Scalars ..
Vendored
+84 -24
View File
@@ -1,7 +1,8 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -19,12 +20,15 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.1], [],
m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.1])dnl
[AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
msvisualcpp | msvcmsys)
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -545,12 +555,15 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -587,6 +600,46 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless `enable' is passed literally.
# For symmetry, `disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
@@ -682,12 +735,15 @@ else
fi
])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@@ -710,13 +766,14 @@ esac
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -724,13 +781,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -806,12 +863,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@@ -834,13 +893,13 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@@ -849,13 +908,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -877,10 +936,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
+9
View File
@@ -0,0 +1,9 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
Name: arpack
Description: ARPACK-NG
Version: 3.0.2
Libs: -L${libdir} -larpack -lblas
Cflags:
Vendored
+113 -35
View File
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for arpack 96.
# Generated by GNU Autoconf 2.68 for arpack-ng 3.1.0.
#
# Report bugs to <arpack@caam.rice.edu>.
# Report bugs to <http://forge.scilab.org/index.php/p/arpack-ng/issues/>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -247,10 +247,11 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: arpack@caam.rice.edu about your system, including any
$0: error possibly output before this message. Then install
$0: a modern shell, or manually run the script under such a
$0: shell if you do have one."
$0: http://forge.scilab.org/index.php/p/arpack-ng/issues/
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
$0: have one."
fi
exit 1
fi
@@ -568,11 +569,11 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='arpack'
PACKAGE_TARNAME='arpack'
PACKAGE_VERSION='96'
PACKAGE_STRING='arpack 96'
PACKAGE_BUGREPORT='arpack@caam.rice.edu'
PACKAGE_NAME='arpack-ng'
PACKAGE_TARNAME='arpack-ng'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='arpack-ng 3.1.0'
PACKAGE_BUGREPORT='http://forge.scilab.org/index.php/p/arpack-ng/issues/'
PACKAGE_URL=''
# Factoring default headers for most tests.
@@ -615,7 +616,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
MPIDIR
MPI_FALSE
MPI_TRUE
MPILIBS
MPIF77
LAPACK_LIBS
@@ -645,6 +647,7 @@ SED
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -670,6 +673,9 @@ ac_ct_F77
LDFLAGS
FFLAGS
F77
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
am__untar
am__tar
AMTAR
@@ -734,6 +740,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_shared
enable_static
with_pic
@@ -1300,7 +1307,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures arpack 96 to adapt to many kinds of systems.
\`configure' configures arpack-ng 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1348,7 +1355,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/arpack]
--docdir=DIR documentation root [DATAROOTDIR/doc/arpack-ng]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1370,7 +1377,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of arpack 96:";;
short | recursive ) echo "Configuration of arpack-ng 3.1.0:";;
esac
cat <<\_ACEOF
@@ -1378,6 +1385,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1414,7 +1423,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <arpack@caam.rice.edu>.
Report bugs to <http://forge.scilab.org/index.php/p/arpack-ng/issues/>.
_ACEOF
ac_status=$?
fi
@@ -1477,7 +1486,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
arpack configure 96
arpack-ng configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1839,7 +1848,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by arpack $as_me 96, which was
It was created by arpack-ng $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2653,8 +2662,8 @@ fi
# Define the identity of the package.
PACKAGE='arpack'
VERSION='96'
PACKAGE='arpack-ng'
VERSION='3.1.0'
cat >>confdefs.h <<_ACEOF
@@ -2684,17 +2693,40 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
$as_echo "$USE_MAINTAINER_MODE" >&6; }
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
ac_ext=f
@@ -3357,6 +3389,7 @@ fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -3920,6 +3953,7 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -3979,7 +4013,7 @@ else
break
fi
;;
msvisualcpp | msvcmsys)
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -15769,8 +15803,8 @@ else
fi
if test x"$BLAS_LIBS" = x; then
as_fn_error $? "Cannot find blas libraries" "$LINENO" 5
if test "$ax_blas_ok" = "no"; then
as_fn_error $? "Cannot find BLAS libraries" "$LINENO" 5
fi
@@ -15947,7 +15981,7 @@ else
fi
if test x"$LAPACK_LIBS" = x; then
if test "$ax_lapack_ok" = "no"; then
as_fn_error $? "Cannot find LAPACK libraries" "$LINENO" 5
fi
@@ -16028,7 +16062,7 @@ $as_echo_n "checking for MPI_Init... " >&6; }
end
_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :
MPILIBS=" "
MPILIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
@@ -16097,6 +16131,35 @@ if test "x$ac_cv_lib_fmpich_MPI_Init" = xyes; then :
fi
fi
if test x = x"$MPILIBS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpif77" >&5
$as_echo_n "checking for MPI_Init in -lmpif77... " >&6; }
if ${ac_cv_lib_mpif77_MPI_Init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmpif77 $LIBS"
cat > conftest.$ac_ext <<_ACEOF
program main
call MPI_Init
end
_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :
ac_cv_lib_mpif77_MPI_Init=yes
else
ac_cv_lib_mpif77_MPI_Init=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpif77_MPI_Init" >&5
$as_echo "$ac_cv_lib_mpif77_MPI_Init" >&6; }
if test "x$ac_cv_lib_mpif77_MPI_Init" = xyes; then :
MPILIBS="-lmpif77"
fi
fi
if test x = x"$MPILIBS"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
@@ -16199,14 +16262,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
if test x"$enable_mpi" = x"yes"; then
MPIDIR=PARPACK
if test x"$enable_mpi" = x"yes"; then
MPI_TRUE=
MPI_FALSE='#'
else
MPI_TRUE='#'
MPI_FALSE=
fi
# LAPACK/Makefile
ac_config_files="$ac_config_files Makefile SRC/Makefile UTIL/Makefile PARPACK/Makefile PARPACK/SRC/Makefile PARPACK/SRC/MPI/Makefile PARPACK/UTIL/Makefile PARPACK/UTIL/MPI/Makefile"
ac_config_files="$ac_config_files Makefile SRC/Makefile UTIL/Makefile TESTS/Makefile PARPACK/Makefile PARPACK/SRC/Makefile PARPACK/SRC/MPI/Makefile PARPACK/UTIL/Makefile PARPACK/UTIL/MPI/Makefile PARPACK/EXAMPLES/MPI/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16361,6 +16429,10 @@ else
am__EXEEXT_FALSE=
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16369,6 +16441,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MPI_TRUE}" && test -z "${MPI_FALSE}"; then
as_fn_error $? "conditional \"MPI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -16778,7 +16854,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by arpack $as_me 96, which was
This file was extended by arpack-ng $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16829,13 +16905,13 @@ $config_files
Configuration commands:
$config_commands
Report bugs to <arpack@caam.rice.edu>."
Report bugs to <http://forge.scilab.org/index.php/p/arpack-ng/issues/>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
arpack config.status 96
arpack-ng config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -17311,11 +17387,13 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"SRC/Makefile") CONFIG_FILES="$CONFIG_FILES SRC/Makefile" ;;
"UTIL/Makefile") CONFIG_FILES="$CONFIG_FILES UTIL/Makefile" ;;
"TESTS/Makefile") CONFIG_FILES="$CONFIG_FILES TESTS/Makefile" ;;
"PARPACK/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/Makefile" ;;
"PARPACK/SRC/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/SRC/Makefile" ;;
"PARPACK/SRC/MPI/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/SRC/MPI/Makefile" ;;
"PARPACK/UTIL/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/UTIL/Makefile" ;;
"PARPACK/UTIL/MPI/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/UTIL/MPI/Makefile" ;;
"PARPACK/EXAMPLES/MPI/Makefile") CONFIG_FILES="$CONFIG_FILES PARPACK/EXAMPLES/MPI/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
+11 -9
View File
@@ -1,6 +1,7 @@
AC_PREREQ(2.59)
AC_INIT([arpack], [96], [arpack@caam.rice.edu])
AC_INIT([arpack-ng], [3.1.0], [http://forge.scilab.org/index.php/p/arpack-ng/issues/])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4/])
@@ -11,14 +12,14 @@ AC_PROG_LIBTOOL
dnl Check for BLAS libraries
sinclude(ax_blas.m4)
AX_BLAS
if test x"$BLAS_LIBS" = x; then
AC_MSG_ERROR([Cannot find blas libraries])
if test "$ax_blas_ok" = "no"; then
AC_MSG_ERROR([Cannot find BLAS libraries])
fi
dnl Check for LAPACK libraries
sinclude(ax_lapack.m4)
AX_LAPACK
if test x"$LAPACK_LIBS" = x; then
if test "$ax_lapack_ok" = "no"; then
AC_MSG_ERROR([Cannot find LAPACK libraries])
fi
@@ -35,10 +36,8 @@ if test x"$enable_mpi" != x"no"; then
AC_LANG_POP([Fortran 77])
fi
if test x"$enable_mpi" = x"yes"; then
MPIDIR=PARPACK
fi
AC_SUBST(MPIDIR)
AM_CONDITIONAL(MPI, test x"$enable_mpi" = x"yes")
# LAPACK/Makefile
@@ -46,9 +45,12 @@ AC_CONFIG_FILES([
Makefile
SRC/Makefile
UTIL/Makefile
TESTS/Makefile
PARPACK/Makefile
PARPACK/SRC/Makefile
PARPACK/SRC/MPI/Makefile
PARPACK/UTIL/Makefile
PARPACK/UTIL/MPI/Makefile])
PARPACK/UTIL/MPI/Makefile
PARPACK/EXAMPLES/MPI/Makefile
])
AC_OUTPUT
Symlink
+1
View File
@@ -0,0 +1 @@
/usr/share/automake-1.11/depcomp
+158
View File
@@ -0,0 +1,158 @@
dnl
dnl Check whether ARPACK works (does not crash)
dnl
dnl Using a pure Fortran program doesn't seem to crash when linked
dnl with the buggy ARPACK library but the C++ program does. Maybe
dnl it is the memory allocation that exposes the bug and using statically
dnl allocated arrays in Fortran does not?
dnl
dnl This code is not used by arpack-ng itself.
dnl This is a macro for applications using arpack to detect that the version
dnl of arpack behave correcly (ie not arpack-ng)
dnl This is the work of Rik <rik@octave.org>
dnl
dnl This code is released under the same license as arpack
dnl
AC_DEFUN([CHECK_ARPACK_OK], [
AC_LANG_PUSH(C++)
AC_CACHE_CHECK([whether the arpack library works],
[cv_lib_arpack_ok], [
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
// External functions from ARPACK library
extern "C" int
F77_FUNC (dnaupd, DNAUPD) (int&, const char *, const int&, const char *,
int&, const double&, double*, const int&,
double*, const int&, int*, int*, double*,
double*, const int&, int&, long int, long int);
extern "C" int
F77_FUNC (dneupd, DNEUPD) (const int&, const char *, int*, double*,
double*, double*, const int&,
const double&, const double&, double*,
const char*, const int&, const char *,
int&, const double&, double*, const int&,
double*, const int&, int*, int*, double*,
double*, const int&, int&, long int,
long int, long int);
extern "C" int
F77_FUNC (dgemv, DGEMV) (const char *, const int&, const int&,
const double&, const double*, const int&,
const double*, const int&, const double&,
double*, const int&, long int);
#include <cfloat>
void
doit (void)
{
// Based on the octave function EigsRealNonSymmetricMatrix from
// liboctave/eigs-base.cc.
// Problem matrix. See bug #31479
int n = 4;
double *m = new double [n * n];
m[0] = 1, m[4] = 0, m[8] = 0, m[12] = -1;
m[1] = 0, m[5] = 1, m[9] = 0, m[13] = 0;
m[2] = 0, m[6] = 0, m[10] = 1, m[14] = 0;
m[3] = 0, m[7] = 0, m[11] = 2, m[15] = 1;
double *resid = new double [4];
resid[0] = 0.960966;
resid[1] = 0.741195;
resid[2] = 0.150143;
resid[3] = 0.868067;
int *ip = new int [11];
ip[0] = 1; // ishift
ip[1] = 0; // ip[1] not referenced
ip[2] = 300; // mxiter, maximum number of iterations
ip[3] = 1; // NB blocksize in recurrence
ip[4] = 0; // nconv, number of Ritz values that satisfy convergence
ip[5] = 0; // ip[5] not referenced
ip[6] = 1; // mode
ip[7] = 0; // ip[7] to ip[10] are return values
ip[8] = 0;
ip[9] = 0;
ip[10] = 0;
int *ipntr = new int [14];
int k = 1;
int p = 3;
int lwork = 3 * p * (p + 2);
double *v = new double [n * (p + 1)];
double *workl = new double [lwork + 1];
double *workd = new double [3 * n + 1];
int ido = 0;
int info = 0;
double tol = DBL_EPSILON;
do
{
F77_FUNC (dnaupd, DNAUPD) (ido, "I", n, "LM", k, tol, resid, p,
v, n, ip, ipntr, workd, workl, lwork,
info, 1L, 2L);
if (ido == -1 || ido == 1 || ido == 2)
{
double *x = workd + ipntr[0] - 1;
double *y = workd + ipntr[1] - 1;
F77_FUNC (dgemv, DGEMV) ("N", n, n, 1.0, m, n, x, 1, 0.0,
y, 1, 1L);
}
else
{
if (info < 0)
{
return; // Error
}
break;
}
}
while (1);
int *sel = new int [p];
// In Octave, the dimensions of dr and di are k+1, but k+2 avoids segfault
double *dr = new double [k + 1];
double *di = new double [k + 1];
double *workev = new double [3 * p];
for (int i = 0; i < k + 1; i++)
dr[i] = di[i] = 0.;
int rvec = 1;
double sigmar = 0.0;
double sigmai = 0.0;
// In Octave, this is n*(k+1), but k+2 avoids segfault
double *z = new double [n * (k + 1)];
F77_FUNC (dneupd, DNEUPD) (rvec, "A", sel, dr, di, z, n, sigmar,
sigmai, workev, "I", n, "LM", k, tol,
resid, p, v, n, ip, ipntr, workd,
workl, lwork, info, 1L, 1L, 2L);
}
]], [[
for (int i = 0; i < 10; i++)
doit ();
]])],
[cv_lib_arpack_ok=yes],
[cv_lib_arpack_ok=no],
[cv_lib_arpack_ok=yes])])
AC_LANG_POP(C++)
if test "$cv_lib_arpack_ok" = "yes"; then
$1
else
$2
fi
])
-1
View File
@@ -1 +0,0 @@
/usr/share/libtool/config/ltmain.sh
+9661
View File
File diff suppressed because it is too large Load Diff
-9398
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -119,7 +119,7 @@ if test x = x"$MPILIBS"; then
AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
[C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
[Fortran 77], [AC_MSG_CHECKING([for MPI_Init])
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" "
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=""
AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])],
[Fortran], [AC_MSG_CHECKING([for MPI_Init])
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" "
@@ -132,6 +132,9 @@ AC_LANG_CASE([Fortran 77], [
if test x = x"$MPILIBS"; then
AC_CHECK_LIB(fmpich, MPI_Init, [MPILIBS="-lfmpich"])
fi
if test x = x"$MPILIBS"; then
AC_CHECK_LIB(mpif77, MPI_Init, [MPILIBS="-lmpif77"])
fi
],
[Fortran], [
if test x = x"$MPILIBS"; then
-1
View File
@@ -1 +0,0 @@
/usr/share/aclocal/ltversion.m4
+23
View File
@@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# @configure_input@
# serial 3337 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2'
macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])