ILP64 support. (#165)
The idea is:
- cmake generates arpackdef.h from arpackdef.cmake.h.in
- autoheader generates arpackdef.h from arpackdef.autotools.h[.in]
- arpack includes arpackdef.h when/where needed:
- #define provide c_int/a_int according to architecture.
- all f90 who need to include "arpackdef.h" must be moved to F90.
Note: by convention, F90 are preprocessed (f90 are not).
- MPI does not support ILP64: integer*4 must be imposed in all
calls involving MPI (f90 example/test code).
To enable ILP64 users to compile/link, arpackdef.h is added in
the arpack installation (make install).
This commit is contained in:
committed by
Sylvestre Ledru
parent
2c1f6ebb5b
commit
aa970cefa6
@@ -16,6 +16,7 @@ config.status
|
||||
libtool
|
||||
.deps/
|
||||
arpack.pc
|
||||
arpackdef*.h*
|
||||
|
||||
# Generated by `make`
|
||||
*.o
|
||||
|
||||
+43
-1
@@ -1,4 +1,4 @@
|
||||
sudo: false
|
||||
sudo: true
|
||||
|
||||
language: c
|
||||
|
||||
@@ -22,12 +22,16 @@ addons:
|
||||
- findutils
|
||||
- libeigen3-dev
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
stages:
|
||||
# order stages
|
||||
- name: precise
|
||||
- name: trusty
|
||||
- name: xenial
|
||||
- name: coverage
|
||||
- name: interface64
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@@ -86,6 +90,44 @@ jobs:
|
||||
- stage: coverage
|
||||
dist: xenial
|
||||
script: mkdir -p build && cd build && cmake -DEXAMPLES=ON -DMPI=ON -DICBEXMM=ON -DCOVERALLS=ON .. && make VERBOSE=1 && make test;
|
||||
# xenial <=> interface64: "recent" systems with ICB + MKL + ILP64 (need debian/testing to get MKL-ILP64)
|
||||
- stage: interface64
|
||||
allow_failure:
|
||||
dist: xenial
|
||||
script: |
|
||||
sudo docker pull debian \
|
||||
&& \
|
||||
sudo docker run debian /bin/bash -c \
|
||||
"cat /etc/os-release && \
|
||||
more /etc/apt/sources.list && \
|
||||
sed -e 's/stretch/testing/' -i /etc/apt/sources.list && \
|
||||
sed -e 's/main/main non-free contrib/' -i /etc/apt/sources.list && \
|
||||
more /etc/apt/sources.list && \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get -y update && \
|
||||
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef upgrade && \
|
||||
apt-get -y --allow-unauthenticated -o Dpkg::Options::=--force-confdef dist-upgrade && \
|
||||
cat /etc/os-release && \
|
||||
apt-get -y install dialog apt-utils && \
|
||||
echo yes | apt-get -y install intel-mkl libmkl-dev && \
|
||||
apt-get -y install build-essential && \
|
||||
apt-get -y install git gfortran gcc g++ openmpi-bin libopenmpi-dev automake autoconf libeigen3-dev && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/fghoussen/arpack-ng && \
|
||||
cd arpack-ng && \
|
||||
git checkout ilp64 && \
|
||||
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/EXAMPLES/MPI/Makefile.am && \
|
||||
sed -e 's/LOG_FLAGS = /LOG_FLAGS = --allow-run-as-root --oversubscribe /' -i PARPACK/TESTS/MPI/Makefile.am && \
|
||||
./bootstrap && \
|
||||
export FFLAGS='-I/usr/include/mkl' && \
|
||||
export FCFLAGS='-I/usr/include/mkl' && \
|
||||
export LIBS='-Wl,--no-as-needed -lmkl_sequential -lmkl_core -lpthread -lm -ldl' && \
|
||||
export INTERFACE64=1 && \
|
||||
./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64 -enable-icb-exmm --enable-mpi \
|
||||
--disable-dependency-tracking && \
|
||||
export VERBOSE=1 && \
|
||||
make all && \
|
||||
make check"
|
||||
|
||||
after_failure:
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ arpack-ng - 3.6.4
|
||||
* [BUG FIX] ICB: missing workev for *[ds]neupd (real+not-sym) => API/ABI change for *[ds]neupd_c.
|
||||
* [BUG FIX] autotools - make distcheck: fix circular dependencies.
|
||||
* arpackmm: utility to test arpack with matrix market files.
|
||||
* ICB: add ILP64 support.
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 10 Nov 2018 09:28:08 +0100
|
||||
|
||||
|
||||
+8
-4
@@ -209,8 +209,8 @@ file(GLOB arpacksrc_STAT_SRCS dbgini.f staini.f ${arpack_SOURCE_DIR}/SRC/*.f)
|
||||
set(arpacksrc_ICB "")
|
||||
set(parpacksrc_ICB "")
|
||||
if(ICB)
|
||||
file(GLOB arpacksrc_ICB SRC/icba*.f90 ICB/debug_icb.f90 ICB/stat_icb.f90)
|
||||
file(GLOB parpacksrc_ICB PARPACK/SRC/MPI/icbp*.f90 ICB/debug_icb.f90 ICB/stat_icb.f90)
|
||||
file(GLOB arpacksrc_ICB SRC/icba*.F90 ICB/debug_icb.F90 ICB/stat_icb.F90)
|
||||
file(GLOB parpacksrc_ICB PARPACK/SRC/MPI/icbp*.F90 ICB/debug_icb.F90 ICB/stat_icb.F90)
|
||||
endif()
|
||||
|
||||
set(arpackutil_STAT_SRCS
|
||||
@@ -291,10 +291,13 @@ if (INTERFACE64)
|
||||
else ()
|
||||
message(WARNING "build script does not know how to make your Fortran compiler use 64-bit integers: set it manually via FFLAGS.")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBLASINT=int64_t")
|
||||
endif ()
|
||||
|
||||
message("-- Generating arpackdef.h")
|
||||
configure_file(arpackdef.cmake.h.in "${PROJECT_BINARY_DIR}/arpackdef.h")
|
||||
include_directories("${PROJECT_BINARY_DIR}") # Find arpackdef.h
|
||||
install(FILES "${PROJECT_BINARY_DIR}/arpackdef.h" DESTINATION include/arpack)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
############################
|
||||
@@ -658,6 +661,7 @@ message("-- Configuration summary for arpack-ng-${arpack_ng_VERSION}:")
|
||||
message(" -- prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(" -- MPI: ${MPI}")
|
||||
message(" -- ICB: ${ICB}")
|
||||
message(" -- INTERFACE64: ${INTERFACE64}")
|
||||
cprsummary("FC" "${CMAKE_Fortran_COMPILER}"
|
||||
"${CMAKE_Fortran_FLAGS_DEBUG}"
|
||||
"${CMAKE_Fortran_FLAGS_MINSIZEREL}"
|
||||
|
||||
@@ -213,8 +213,8 @@ class options {
|
||||
|
||||
string fileA;
|
||||
string fileB;
|
||||
int nbEV;
|
||||
int nbCV;
|
||||
a_int nbEV;
|
||||
a_int nbCV;
|
||||
bool stdPb; // Standard or generalized (= not standard).
|
||||
bool symPb;
|
||||
string mag; // Magnitude <=> "which" arpack parameter.
|
||||
@@ -249,8 +249,8 @@ int readMatrixMarket(string const & fileName, EigMatR & M, int const & verbose,
|
||||
ifstream inp(fileName);
|
||||
if (!inp) {cerr << "Error: can not open " << fileName << endl; return 1;}
|
||||
|
||||
unsigned int l = 0, n = 0, m = 0, nnz = 0;
|
||||
vector<unsigned int> i, j;
|
||||
a_uint l = 0, n = 0, m = 0, nnz = 0;
|
||||
vector<a_uint> i, j;
|
||||
vector<double> Mij;
|
||||
do {
|
||||
// Skip comments.
|
||||
@@ -276,7 +276,7 @@ int readMatrixMarket(string const & fileName, EigMatR & M, int const & verbose,
|
||||
}
|
||||
}
|
||||
else { // Body.
|
||||
unsigned int k = 0, l = 0;
|
||||
a_uint k = 0, l = 0;
|
||||
double Mkl = 0.;
|
||||
inpSS >> k >> l >> Mkl;
|
||||
if (!inpSS) {cerr << "Error: bad line (" << fileName << ", line " << l << ")" << endl; return 1;}
|
||||
@@ -329,40 +329,40 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
// dgetv0 rely on resid/v: resid/v should be initialized to 0.0 to avoid "bad" starting random vectors.
|
||||
|
||||
char const * which = opt.mag.c_str();
|
||||
int ido = 0; // First call to arpack.
|
||||
a_int ido = 0; // First call to arpack.
|
||||
char const * iMat = "I";
|
||||
char const * gMat = "G";
|
||||
char const * bMat = (mode == 1) ? iMat : gMat;
|
||||
int nbDim = A.rows();
|
||||
double * resid = new double[nbDim]; for (int n = 0; n < nbDim; n++) resid[n] = 0.; // Avoid "bad" starting vector.
|
||||
a_int nbDim = A.rows();
|
||||
double * resid = new double[nbDim]; for (a_int n = 0; n < nbDim; n++) resid[n] = 0.; // Avoid "bad" starting vector.
|
||||
if (opt.restart) {
|
||||
ifstream rfs("resid.out");
|
||||
if (rfs.is_open()) {
|
||||
for (int n = 0; n < nbDim; n++) rfs >> resid[n];
|
||||
for (a_int n = 0; n < nbDim; n++) rfs >> resid[n];
|
||||
if (opt.verbose >= 2) {
|
||||
cout << endl;
|
||||
cout << "resid:" << endl;
|
||||
for (int n = 0; n < nbDim; n++) cout << resid[n] << endl;
|
||||
for (a_int n = 0; n < nbDim; n++) cout << resid[n] << endl;
|
||||
cout << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
int ldv = nbDim;
|
||||
double * v = new double[ldv*opt.nbCV]; for (int n = 0; n < ldv*opt.nbCV; n++) v[n] = 0.; // Avoid "bad" starting vector.
|
||||
a_int ldv = nbDim;
|
||||
double * v = new double[ldv*opt.nbCV]; for (a_int n = 0; n < ldv*opt.nbCV; n++) v[n] = 0.; // Avoid "bad" starting vector.
|
||||
if (opt.restart) {
|
||||
ifstream vfs("v.out");
|
||||
if (vfs.is_open()) {
|
||||
int nbCV = 0; vfs >> nbCV; if (opt.nbCV < nbCV) nbCV = opt.nbCV;
|
||||
for (int n = 0; n < ldv*nbCV; n++) vfs >> v[n];
|
||||
a_int nbCV = 0; vfs >> nbCV; if (opt.nbCV < nbCV) nbCV = opt.nbCV;
|
||||
for (a_int n = 0; n < ldv*nbCV; n++) vfs >> v[n];
|
||||
if (opt.verbose >= 2) {
|
||||
cout << endl;
|
||||
cout << "v:" << endl;
|
||||
for (int n = 0; n < ldv*nbCV; n++) cout << v[n] << endl;
|
||||
for (a_int n = 0; n < ldv*nbCV; n++) cout << v[n] << endl;
|
||||
cout << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
int iparam[11];
|
||||
a_int iparam[11];
|
||||
iparam[0] = 1; // Use exact shifts (=> we'll never have ido == 3).
|
||||
iparam[2] = opt.maxIt; // Maximum number of iterations.
|
||||
iparam[3] = 1; // Block size.
|
||||
@@ -390,12 +390,12 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
if(solver.info() != Eigen::Success) {cerr << "Error: decomposition KO - check A and/or B are invertible" << endl; return 1;}
|
||||
}
|
||||
else {cerr << "Error: arpack mode must be 1, 2 or 3 - KO" << endl; return 1;}
|
||||
int ipntr[14];
|
||||
a_int ipntr[14];
|
||||
double * workd = new double[3*nbDim];
|
||||
int lworkl = opt.symPb ? opt.nbCV*opt.nbCV + 8*opt.nbCV : 3*opt.nbCV*opt.nbCV + 6*opt.nbCV;
|
||||
a_int lworkl = opt.symPb ? opt.nbCV*opt.nbCV + 8*opt.nbCV : 3*opt.nbCV*opt.nbCV + 6*opt.nbCV;
|
||||
lworkl++; // The documentation says "LWORKL must be at least ..."
|
||||
double * workl = new double[lworkl];
|
||||
int info = 0; // Use random initial residual vector.
|
||||
a_int info = 0; // Use random initial residual vector.
|
||||
if (opt.restart) info = 1;
|
||||
|
||||
// Arpack solve.
|
||||
@@ -422,8 +422,8 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
|
||||
auto start = chrono::high_resolution_clock::now();
|
||||
|
||||
int xIdx = ipntr[0] - 1; // 0-based (Fortran is 1-based).
|
||||
int yIdx = ipntr[1] - 1; // 0-based (Fortran is 1-based).
|
||||
a_int xIdx = ipntr[0] - 1; // 0-based (Fortran is 1-based).
|
||||
a_int yIdx = ipntr[1] - 1; // 0-based (Fortran is 1-based).
|
||||
|
||||
EigMpVR X(workd + xIdx, nbDim); // Arpack provides X.
|
||||
EigMpVR Y(workd + yIdx, nbDim); // Arpack provides Y.
|
||||
@@ -456,7 +456,7 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
if(solver.info() != Eigen::Success) {cerr << "Error: solve KO - increase --slvMaxIt and/or relax --slvTol, or, change --slv" << endl; return 1;}
|
||||
}
|
||||
else if (iparam[6] == 3) {
|
||||
int zIdx = ipntr[2] - 1; // 0-based (Fortran is 1-based).
|
||||
a_int zIdx = ipntr[2] - 1; // 0-based (Fortran is 1-based).
|
||||
EigMpVR Z(workd + zIdx, nbDim); // Arpack provides Z.
|
||||
Y = solver.solve(Z); // Y = (A - sigma * B)^-1 * B * X.
|
||||
if(solver.info() != Eigen::Success) {cerr << "Error: solve KO - increase --slvMaxIt and/or relax --slvTol, or, change --slv" << endl; return 1;}
|
||||
@@ -479,12 +479,12 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
out.nbIt = iparam[2]; // Actual number of iterations.
|
||||
bool rvec = true;
|
||||
char const * howmny = "A";
|
||||
int * select = new int[opt.nbCV]; for (int n = 0; n < opt.nbCV; n++) select[n] = 1;
|
||||
int const nbZ = nbDim*(opt.nbEV+1); // Caution: opt.nbEV+1 for dneupd.
|
||||
double * z = new double[nbZ]; for (int n = 0; n < nbZ; n++) z[n] = 0.;
|
||||
int ldz = nbDim;
|
||||
a_int * select = new a_int[opt.nbCV]; for (a_int n = 0; n < opt.nbCV; n++) select[n] = 1;
|
||||
a_int const nbZ = nbDim*(opt.nbEV+1); // Caution: opt.nbEV+1 for dneupd.
|
||||
double * z = new double[nbZ]; for (a_int n = 0; n < nbZ; n++) z[n] = 0.;
|
||||
a_int ldz = nbDim;
|
||||
if (opt.symPb) {
|
||||
double * d = new double[opt.nbEV]; for (int k = 0; k < opt.nbEV; k++) d[k] = 0.;
|
||||
double * d = new double[opt.nbEV]; for (a_int k = 0; k < opt.nbEV; k++) d[k] = 0.;
|
||||
|
||||
dseupd_c(rvec, howmny, select, d, z, ldz, opt.sigmaReal,
|
||||
bMat, nbDim, which, opt.nbEV, opt.tol, resid, opt.nbCV, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
@@ -493,16 +493,16 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
|
||||
// Arpack compute the whole spectrum.
|
||||
|
||||
int nbConv = iparam[4];
|
||||
a_int nbConv = iparam[4];
|
||||
out.val.reserve(nbConv);
|
||||
for (int i = 0; d && i < nbConv; i++) {
|
||||
for (a_int i = 0; d && i < nbConv; i++) {
|
||||
complex<double> lambda(d[i], 0.);
|
||||
out.val.push_back(lambda);
|
||||
if (out.val.size() == (size_t) opt.nbEV) break; // If more converged than requested, likely not accurate (check KO).
|
||||
}
|
||||
|
||||
out.vec.reserve(nbConv);
|
||||
for (int i = 0; z && i < nbConv; i++) {
|
||||
for (a_int i = 0; z && i < nbConv; i++) {
|
||||
EigVecR V = EigMpVR(z + i*nbDim, nbDim);
|
||||
out.vec.push_back(V.cast<complex<double>>());
|
||||
if (out.vec.size() == (size_t) opt.nbEV) break; // If more converged than requested, likely not accurate (check KO).
|
||||
@@ -511,8 +511,8 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
if (d) {delete [] d; d = NULL;}
|
||||
}
|
||||
else {
|
||||
double * dr = new double[opt.nbEV+1]; for (int k = 0; k < opt.nbEV+1; k++) dr[k] = 0.;
|
||||
double * di = new double[opt.nbEV+1]; for (int k = 0; k < opt.nbEV+1; k++) di[k] = 0.;
|
||||
double * dr = new double[opt.nbEV+1]; for (a_int k = 0; k < opt.nbEV+1; k++) dr[k] = 0.;
|
||||
double * di = new double[opt.nbEV+1]; for (a_int k = 0; k < opt.nbEV+1; k++) di[k] = 0.;
|
||||
double * workev = new double[3*opt.nbCV];
|
||||
|
||||
dneupd_c(rvec, howmny, select, dr, di, z, ldz, opt.sigmaReal, opt.sigmaImag, workev,
|
||||
@@ -522,9 +522,9 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
|
||||
// Arpack compute only half of the spectrum.
|
||||
|
||||
int nbConv = iparam[4];
|
||||
a_int nbConv = iparam[4];
|
||||
out.val.reserve(nbConv);
|
||||
for (int i = 0; dr && di && i <= nbConv/2; i++) { // Scan first half of the spectrum.
|
||||
for (a_int i = 0; dr && di && i <= nbConv/2; i++) { // Scan first half of the spectrum.
|
||||
// Get first half of the spectrum.
|
||||
|
||||
complex<double> lambda(dr[i], di[i]);
|
||||
@@ -538,7 +538,7 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
}
|
||||
|
||||
out.vec.reserve(nbConv);
|
||||
for (int i = 0; z && i <= nbConv/2; i++) { // Scan half spectrum.
|
||||
for (a_int i = 0; z && i <= nbConv/2; i++) { // Scan half spectrum.
|
||||
// Get first half of the spectrum.
|
||||
|
||||
EigVecR Vr = EigMpVR(z + (2*i+0)*nbDim, nbDim); // Real part.
|
||||
@@ -560,8 +560,8 @@ int arpackSolve(options const & opt, int const & mode,
|
||||
if (di) {delete [] di; di = NULL;}
|
||||
}
|
||||
|
||||
ofstream rfs("resid.out"); for (int n = 0; n < nbDim; n++) rfs << resid[n] << endl;
|
||||
ofstream vfs("v.out"); vfs << opt.nbCV << endl; for (int n = 0; n < ldv*opt.nbCV; n++) vfs << v[n] << endl;
|
||||
ofstream rfs("resid.out"); for (a_int n = 0; n < nbDim; n++) rfs << resid[n] << endl;
|
||||
ofstream vfs("v.out"); vfs << opt.nbCV << endl; for (a_int n = 0; n < ldv*opt.nbCV; n++) vfs << v[n] << endl;
|
||||
|
||||
// Clean.
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ endif
|
||||
endif
|
||||
|
||||
noinst_LTLIBRARIES = libdbgicb.la libstaicb.la
|
||||
libdbgicb_la_SOURCES = debug_icb.f90
|
||||
libdbgicb_la_SOURCES = debug_icb.F90
|
||||
libdbgicb_la_FCFLAGS = -I$(top_builddir)
|
||||
libstaicb_la_SOURCES = stat_icb.f90
|
||||
libstaicb_la_SOURCES = stat_icb.F90
|
||||
libstaicb_la_FCFLAGS = -I$(top_builddir)
|
||||
|
||||
+14
-12
@@ -1,3 +1,5 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#ifndef __ARPACK_H__
|
||||
#define __ARPACK_H__
|
||||
|
||||
@@ -5,18 +7,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void cnaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, float tol, float _Complex* resid, int ncv, float _Complex* v, int ldv, int* iparam, int* ipntr, float _Complex* workd, float _Complex* workl, int lworkl, float* rwork, int* info);
|
||||
void cneupd_c(bool rvec, char const* howmny, int const* select, float _Complex* d, float _Complex* z, int ldz, float _Complex sigma, float _Complex* workev, char const* bmat, int n, char const* which, int nev, float tol, float _Complex* resid, int ncv, float _Complex* v, int ldv, int* iparam, int* ipntr, float _Complex* workd, float _Complex* workl, int lworkl, float* rwork, int* info);
|
||||
void dnaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void dneupd_c(bool rvec, char const* howmny, int const* select, double* dr, double* di, double* z, int ldz, double sigmar, double sigmai, double * workev, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void dsaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void dseupd_c(bool rvec, char const* howmny, int const* select, double* d, double* z, int ldz, double sigma, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void snaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void sneupd_c(bool rvec, char const* howmny, int const* select, float* dr, float* di, float* z, int ldz, float sigmar, float sigmai, float * workev, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void ssaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void sseupd_c(bool rvec, char const* howmny, int const* select, float* d, float* z, int ldz, float sigma, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void znaupd_c(int* ido, char const* bmat, int n, char const* which, int nev, double tol, double _Complex* resid, int ncv, double _Complex* v, int ldv, int* iparam, int* ipntr, double _Complex* workd, double _Complex* workl, int lworkl, double* rwork, int* info);
|
||||
void zneupd_c(bool rvec, char const* howmny, int const* select, double _Complex* d, double _Complex* z, int ldz, double _Complex sigma, double _Complex* workev, char const* bmat, int n, char const* which, int nev, double tol, double _Complex* resid, int ncv, double _Complex* v, int ldv, int* iparam, int* ipntr, double _Complex* workd, double _Complex* workl, int lworkl, double* rwork, int* info);
|
||||
void cnaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float _Complex* resid, a_int ncv, float _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, float _Complex* workd, float _Complex* workl, a_int lworkl, float* rwork, a_int* info);
|
||||
void cneupd_c(bool rvec, char const* howmny, a_int const* select, float _Complex* d, float _Complex* z, a_int ldz, float _Complex sigma, float _Complex* workev, char const* bmat, a_int n, char const* which, a_int nev, float tol, float _Complex* resid, a_int ncv, float _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, float _Complex* workd, float _Complex* workl, a_int lworkl, float* rwork, a_int* info);
|
||||
void dnaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void dneupd_c(bool rvec, char const* howmny, a_int const* select, double* dr, double* di, double* z, a_int ldz, double sigmar, double sigmai, double * workev, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void dsaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void dseupd_c(bool rvec, char const* howmny, a_int const* select, double* d, double* z, a_int ldz, double sigma, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void snaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void sneupd_c(bool rvec, char const* howmny, a_int const* select, float* dr, float* di, float* z, a_int ldz, float sigmar, float sigmai, float * workev, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void ssaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void sseupd_c(bool rvec, char const* howmny, a_int const* select, float* d, float* z, a_int ldz, float sigma, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void znaupd_c(a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double _Complex* resid, a_int ncv, double _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, double _Complex* workd, double _Complex* workl, a_int lworkl, double* rwork, a_int* info);
|
||||
void zneupd_c(bool rvec, char const* howmny, a_int const* select, double _Complex* d, double _Complex* z, a_int ldz, double _Complex sigma, double _Complex* workev, char const* bmat, a_int n, char const* which, a_int nev, double tol, double _Complex* resid, a_int ncv, double _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, double _Complex* workd, double _Complex* workl, a_int lworkl, double* rwork, a_int* info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+65
-63
@@ -1,3 +1,5 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#ifndef __ARPACK_HPP__
|
||||
#define __ARPACK_HPP__
|
||||
|
||||
@@ -89,63 +91,63 @@ inline char const* convert_to_char(howmny const option) {
|
||||
}
|
||||
} // namespace internal
|
||||
|
||||
inline void saupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
inline void saupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::ssaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void seupd(bool rvec, howmny const howmny_option, int* select, float* d,
|
||||
float* z, int ldz, float sigma, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
inline void seupd(bool rvec, howmny const howmny_option, a_int* select, float* d,
|
||||
float* z, a_int ldz, float sigma, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::sseupd_c(rvec, internal::convert_to_char(howmny_option), select, d,
|
||||
z, ldz, sigma, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void saupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
inline void saupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::dsaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void seupd(bool rvec, howmny const howmny_option, int* select, double* d,
|
||||
double* z, int ldz, double sigma, bmat const bmat_option,
|
||||
int n, which const ritz_option, int nev, double tol,
|
||||
double* resid, int ncv, double* v, int ldv, int* iparam,
|
||||
int* ipntr, double* workd, double* workl, int lworkl,
|
||||
int& info) {
|
||||
inline void seupd(bool rvec, howmny const howmny_option, a_int* select, double* d,
|
||||
double* z, a_int ldz, double sigma, bmat const bmat_option,
|
||||
a_int n, which const ritz_option, a_int nev, double tol,
|
||||
double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam,
|
||||
a_int* ipntr, double* workd, double* workl, a_int lworkl,
|
||||
a_int& info) {
|
||||
internal::dseupd_c(rvec, internal::convert_to_char(howmny_option), select, d,
|
||||
z, ldz, sigma, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
inline void naupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::snaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void neupd(bool rvec, howmny const howmny_option, int* select, float* dr,
|
||||
float* di, float* z, int ldz,
|
||||
inline void neupd(bool rvec, howmny const howmny_option, a_int* select, float* dr,
|
||||
float* di, float* z, a_int ldz,
|
||||
float sigmar, float sigmai, float * workev,
|
||||
bmat const bmat_option, int n, which const ritz_option,
|
||||
int nev, float tol, float* resid, int ncv, float* v, int ldv,
|
||||
int* iparam, int* ipntr, float* workd, float* workl,
|
||||
int lworkl, int& info) {
|
||||
bmat const bmat_option, a_int n, which const ritz_option,
|
||||
a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv,
|
||||
a_int* iparam, a_int* ipntr, float* workd, float* workl,
|
||||
a_int lworkl, a_int& info) {
|
||||
internal::sneupd_c(rvec, internal::convert_to_char(howmny_option), select, dr,
|
||||
di, z, ldz, sigmar, sigmai, workev,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -153,22 +155,22 @@ inline void neupd(bool rvec, howmny const howmny_option, int* select, float* dr,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
inline void naupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::dnaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void neupd(bool rvec, howmny const howmny_option, int* select,
|
||||
double* dr, double* di, double* z, int ldz,
|
||||
inline void neupd(bool rvec, howmny const howmny_option, a_int* select,
|
||||
double* dr, double* di, double* z, a_int ldz,
|
||||
double sigmar, double sigmai, double * workev,
|
||||
bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::dneupd_c(rvec, internal::convert_to_char(howmny_option), select, dr,
|
||||
di, z, ldz, sigmar, sigmai, workev,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -176,12 +178,12 @@ inline void neupd(bool rvec, howmny const howmny_option, int* select,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, float tol,
|
||||
std::complex<float>* resid, int ncv, std::complex<float>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, int lworkl,
|
||||
float* rwork, int& info) {
|
||||
inline void naupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, float tol,
|
||||
std::complex<float>* resid, a_int ncv, std::complex<float>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, a_int lworkl,
|
||||
float* rwork, a_int& info) {
|
||||
internal::cnaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol,
|
||||
reinterpret_cast<_Complex float*>(resid), ncv,
|
||||
@@ -191,14 +193,14 @@ inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
rwork, &info);
|
||||
}
|
||||
|
||||
inline void neupd(bool rvec, howmny const howmny_option, int* select,
|
||||
std::complex<float>* d, std::complex<float>* z, int ldz,
|
||||
inline void neupd(bool rvec, howmny const howmny_option, a_int* select,
|
||||
std::complex<float>* d, std::complex<float>* z, a_int ldz,
|
||||
std::complex<float> sigma, std::complex<float>* workev,
|
||||
bmat const bmat_option, int n, which const ritz_option,
|
||||
int nev, float tol, std::complex<float>* resid, int ncv,
|
||||
std::complex<float>* v, int ldv, int* iparam, int* ipntr,
|
||||
bmat const bmat_option, a_int n, which const ritz_option,
|
||||
a_int nev, float tol, std::complex<float>* resid, a_int ncv,
|
||||
std::complex<float>* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
std::complex<float>* workd, std::complex<float>* workl,
|
||||
int lworkl, float* rwork, int& info) {
|
||||
a_int lworkl, float* rwork, a_int& info) {
|
||||
internal::cneupd_c(rvec, internal::convert_to_char(howmny_option), select,
|
||||
reinterpret_cast<_Complex float*>(d),
|
||||
reinterpret_cast<_Complex float*>(z), ldz,
|
||||
@@ -213,12 +215,12 @@ inline void neupd(bool rvec, howmny const howmny_option, int* select,
|
||||
rwork, &info);
|
||||
}
|
||||
|
||||
inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
which const ritz_option, int nev, double tol,
|
||||
std::complex<double>* resid, int ncv, std::complex<double>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, int lworkl,
|
||||
double* rwork, int& info) {
|
||||
inline void naupd(a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const ritz_option, a_int nev, double tol,
|
||||
std::complex<double>* resid, a_int ncv, std::complex<double>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, a_int lworkl,
|
||||
double* rwork, a_int& info) {
|
||||
internal::znaupd_c(&ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(ritz_option), nev, tol,
|
||||
reinterpret_cast<_Complex double*>(resid), ncv,
|
||||
@@ -228,14 +230,14 @@ inline void naupd(int& ido, bmat const bmat_option, int n,
|
||||
rwork, &info);
|
||||
}
|
||||
|
||||
inline void neupd(bool rvec, howmny const howmny_option, int* select,
|
||||
std::complex<double>* d, std::complex<double>* z, int ldz,
|
||||
inline void neupd(bool rvec, howmny const howmny_option, a_int* select,
|
||||
std::complex<double>* d, std::complex<double>* z, a_int ldz,
|
||||
std::complex<double> sigma, std::complex<double>* workev,
|
||||
bmat const bmat_option, int n, which const ritz_option,
|
||||
int nev, double tol, std::complex<double>* resid, int ncv,
|
||||
std::complex<double>* v, int ldv, int* iparam, int* ipntr,
|
||||
bmat const bmat_option, a_int n, which const ritz_option,
|
||||
a_int nev, double tol, std::complex<double>* resid, a_int ncv,
|
||||
std::complex<double>* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
std::complex<double>* workd, std::complex<double>* workl,
|
||||
int lworkl, double* rwork, int& info) {
|
||||
a_int lworkl, double* rwork, a_int& info) {
|
||||
internal::zneupd_c(rvec, internal::convert_to_char(howmny_option), select,
|
||||
reinterpret_cast<_Complex double*>(d),
|
||||
reinterpret_cast<_Complex double*>(z), ldz,
|
||||
|
||||
@@ -7,6 +7,7 @@ subroutine debug_c(logfil_c, ndigit_c, mgetv0_c,
|
||||
bind(c, name="debug_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: logfil_c, ndigit_c, mgetv0_c
|
||||
integer(kind=c_int), value, intent(in) :: msaupd_c, msaup2_c, msaitr_c, mseigt_c, msapps_c, msgets_c, mseupd_c
|
||||
integer(kind=c_int), value, intent(in) :: mnaupd_c, mnaup2_c, mnaitr_c, mneigh_c, mnapps_c, mngets_c, mneupd_c
|
||||
+14
-12
@@ -1,3 +1,5 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#ifndef __PARPACK_H__
|
||||
#define __PARPACK_H__
|
||||
|
||||
@@ -12,18 +14,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void pcnaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, float tol, float _Complex* resid, int ncv, float _Complex* v, int ldv, int* iparam, int* ipntr, float _Complex* workd, float _Complex* workl, int lworkl, float _Complex* rwork, int* info);
|
||||
void pcneupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, float _Complex* d, float _Complex* z, int ldz, float _Complex sigma, float _Complex* workev, char const* bmat, int n, char const* which, int nev, float tol, float _Complex* resid, int ncv, float _Complex* v, int ldv, int* iparam, int* ipntr, float _Complex* workd, float _Complex* workl, int lworkl, float _Complex* rwork, int* info);
|
||||
void pdnaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void pdneupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, double* dr, double* di, double* z, int ldz, double sigmar, double sigmai, double * workev, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void pdsaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void pdseupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, double* d, double* z, int ldz, double sigma, char const* bmat, int n, char const* which, int nev, double tol, double* resid, int ncv, double* v, int ldv, int* iparam, int* ipntr, double* workd, double* workl, int lworkl, int* info);
|
||||
void psnaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void psneupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, float* dr, float* di, float* z, int ldz, float sigmar, float sigmai, float * workev, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void pssaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void psseupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, float* d, float* z, int ldz, float sigma, char const* bmat, int n, char const* which, int nev, float tol, float* resid, int ncv, float* v, int ldv, int* iparam, int* ipntr, float* workd, float* workl, int lworkl, int* info);
|
||||
void pznaupd_c(MPI_Fint comm, int* ido, char const* bmat, int n, char const* which, int nev, double tol, double _Complex* resid, int ncv, double _Complex* v, int ldv, int* iparam, int* ipntr, double _Complex* workd, double _Complex* workl, int lworkl, double _Complex* rwork, int* info);
|
||||
void pzneupd_c(MPI_Fint comm, bool rvec, char const* howmny, int const* select, double _Complex* d, double _Complex* z, int ldz, double _Complex sigma, double _Complex* workev, char const* bmat, int n, char const* which, int nev, double tol, double _Complex* resid, int ncv, double _Complex* v, int ldv, int* iparam, int* ipntr, double _Complex* workd, double _Complex* workl, int lworkl, double _Complex* rwork, int* info);
|
||||
void pcnaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float _Complex* resid, a_int ncv, float _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, float _Complex* workd, float _Complex* workl, a_int lworkl, float _Complex* rwork, a_int* info);
|
||||
void pcneupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, float _Complex* d, float _Complex* z, a_int ldz, float _Complex sigma, float _Complex* workev, char const* bmat, a_int n, char const* which, a_int nev, float tol, float _Complex* resid, a_int ncv, float _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, float _Complex* workd, float _Complex* workl, a_int lworkl, float _Complex* rwork, a_int* info);
|
||||
void pdnaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void pdneupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, double* dr, double* di, double* z, a_int ldz, double sigmar, double sigmai, double * workev, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void pdsaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void pdseupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, double* d, double* z, a_int ldz, double sigma, char const* bmat, a_int n, char const* which, a_int nev, double tol, double* resid, a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr, double* workd, double* workl, a_int lworkl, a_int* info);
|
||||
void psnaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void psneupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, float* dr, float* di, float* z, a_int ldz, float sigmar, float sigmai, float * workev, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void pssaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void psseupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, float* d, float* z, a_int ldz, float sigma, char const* bmat, a_int n, char const* which, a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr, float* workd, float* workl, a_int lworkl, a_int* info);
|
||||
void pznaupd_c(MPI_Fint comm, a_int* ido, char const* bmat, a_int n, char const* which, a_int nev, double tol, double _Complex* resid, a_int ncv, double _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, double _Complex* workd, double _Complex* workl, a_int lworkl, double _Complex* rwork, a_int* info);
|
||||
void pzneupd_c(MPI_Fint comm, bool rvec, char const* howmny, a_int const* select, double _Complex* d, double _Complex* z, a_int ldz, double _Complex sigma, double _Complex* workev, char const* bmat, a_int n, char const* which, a_int nev, double tol, double _Complex* resid, a_int ncv, double _Complex* v, a_int ldv, a_int* iparam, a_int* ipntr, double _Complex* workd, double _Complex* workl, a_int lworkl, double _Complex* rwork, a_int* info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+65
-64
@@ -1,3 +1,4 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#ifndef __PARPACK_HPP__
|
||||
#define __PARPACK_HPP__
|
||||
@@ -15,21 +16,21 @@ namespace internal {
|
||||
#include "parpack.h"
|
||||
} // namespace internal
|
||||
|
||||
inline void saupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
inline void saupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::pssaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void seupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, float* d, float* z, int ldz, float sigma,
|
||||
bmat const bmat_option, int n, which const which_option,
|
||||
int nev, float tol, float* resid, int ncv, float* v, int ldv,
|
||||
int* iparam, int* ipntr, float* workd, float* workl,
|
||||
int lworkl, int& info) {
|
||||
a_int* select, float* d, float* z, a_int ldz, float sigma,
|
||||
bmat const bmat_option, a_int n, which const which_option,
|
||||
a_int nev, float tol, float* resid, a_int ncv, float* v, a_int ldv,
|
||||
a_int* iparam, a_int* ipntr, float* workd, float* workl,
|
||||
a_int lworkl, a_int& info) {
|
||||
internal::psseupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, d, z, ldz, sigma,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -37,21 +38,21 @@ inline void seupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void saupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
inline void saupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::pdsaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void seupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, double* d, double* z, int ldz, double sigma,
|
||||
bmat const bmat_option, int n, which const which_option,
|
||||
int nev, double tol, double* resid, int ncv, double* v,
|
||||
int ldv, int* iparam, int* ipntr, double* workd,
|
||||
double* workl, int lworkl, int& info) {
|
||||
a_int* select, double* d, double* z, a_int ldz, double sigma,
|
||||
bmat const bmat_option, a_int n, which const which_option,
|
||||
a_int nev, double tol, double* resid, a_int ncv, double* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, double* workd,
|
||||
double* workl, a_int lworkl, a_int& info) {
|
||||
internal::pdseupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, d, z, ldz, sigma,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -59,22 +60,22 @@ inline void seupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
inline void naupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::psnaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, float* dr, float* di, float* z, int ldz,
|
||||
a_int* select, float* dr, float* di, float* z, a_int ldz,
|
||||
float sigmar, float sigmai, float * workev,
|
||||
bmat const bmat_option, int n,
|
||||
which const which_option, int nev, float tol, float* resid,
|
||||
int ncv, float* v, int ldv, int* iparam, int* ipntr,
|
||||
float* workd, float* workl, int lworkl, int& info) {
|
||||
bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, float tol, float* resid,
|
||||
a_int ncv, float* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
float* workd, float* workl, a_int lworkl, a_int& info) {
|
||||
internal::psneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, dr, di, z, ldz, sigmar, sigmai, workev,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -82,22 +83,22 @@ inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
inline void naupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::pdnaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol, resid,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, double* dr, double* di, double* z, int ldz,
|
||||
a_int* select, double* dr, double* di, double* z, a_int ldz,
|
||||
double sigmar, double sigmai, double * workev,
|
||||
bmat const bmat_option, int n,
|
||||
which const which_option, int nev, double tol, double* resid,
|
||||
int ncv, double* v, int ldv, int* iparam, int* ipntr,
|
||||
double* workd, double* workl, int lworkl, int& info) {
|
||||
bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, double tol, double* resid,
|
||||
a_int ncv, double* v, a_int ldv, a_int* iparam, a_int* ipntr,
|
||||
double* workd, double* workl, a_int lworkl, a_int& info) {
|
||||
internal::pdneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, dr, di, z, ldz, sigmar, sigmai, workev,
|
||||
internal::convert_to_char(bmat_option), n,
|
||||
@@ -105,12 +106,12 @@ inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, &info);
|
||||
}
|
||||
|
||||
inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, float tol,
|
||||
std::complex<float>* resid, int ncv, std::complex<float>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, int lworkl,
|
||||
std::complex<float>* rwork, int& info) {
|
||||
inline void naupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, float tol,
|
||||
std::complex<float>* resid, a_int ncv, std::complex<float>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, a_int lworkl,
|
||||
std::complex<float>* rwork, a_int& info) {
|
||||
internal::pcnaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol,
|
||||
reinterpret_cast<_Complex float*>(resid), ncv,
|
||||
@@ -121,14 +122,14 @@ inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
}
|
||||
|
||||
inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, std::complex<float>* d, std::complex<float>* z,
|
||||
int ldz, std::complex<float> sigma,
|
||||
std::complex<float>* workev, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, float tol,
|
||||
std::complex<float>* resid, int ncv, std::complex<float>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, int lworkl,
|
||||
std::complex<float>* rwork, int& info)
|
||||
a_int* select, std::complex<float>* d, std::complex<float>* z,
|
||||
a_int ldz, std::complex<float> sigma,
|
||||
std::complex<float>* workev, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, float tol,
|
||||
std::complex<float>* resid, a_int ncv, std::complex<float>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<float>* workd,
|
||||
std::complex<float>* workl, a_int lworkl,
|
||||
std::complex<float>* rwork, a_int& info)
|
||||
|
||||
{
|
||||
internal::pcneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
@@ -145,12 +146,12 @@ inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
reinterpret_cast<_Complex float*>(rwork), &info);
|
||||
}
|
||||
|
||||
inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, double tol,
|
||||
std::complex<double>* resid, int ncv, std::complex<double>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, int lworkl,
|
||||
std::complex<double>* rwork, int& info) {
|
||||
inline void naupd(MPI_Fint comm, a_int& ido, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, double tol,
|
||||
std::complex<double>* resid, a_int ncv, std::complex<double>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, a_int lworkl,
|
||||
std::complex<double>* rwork, a_int& info) {
|
||||
internal::pznaupd_c(comm, &ido, internal::convert_to_char(bmat_option), n,
|
||||
internal::convert_to_char(which_option), nev, tol,
|
||||
reinterpret_cast<_Complex double*>(resid), ncv,
|
||||
@@ -161,14 +162,14 @@ inline void naupd(MPI_Fint comm, int& ido, bmat const bmat_option, int n,
|
||||
}
|
||||
|
||||
inline void neupd(MPI_Fint comm, bool rvec, howmny const howmny_option,
|
||||
int* select, std::complex<double>* d, std::complex<double>* z,
|
||||
int ldz, std::complex<double> sigma,
|
||||
std::complex<double>* workev, bmat const bmat_option, int n,
|
||||
which const which_option, int nev, double tol,
|
||||
std::complex<double>* resid, int ncv, std::complex<double>* v,
|
||||
int ldv, int* iparam, int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, int lworkl,
|
||||
std::complex<double>* rwork, int& info) {
|
||||
a_int* select, std::complex<double>* d, std::complex<double>* z,
|
||||
a_int ldz, std::complex<double> sigma,
|
||||
std::complex<double>* workev, bmat const bmat_option, a_int n,
|
||||
which const which_option, a_int nev, double tol,
|
||||
std::complex<double>* resid, a_int ncv, std::complex<double>* v,
|
||||
a_int ldv, a_int* iparam, a_int* ipntr, std::complex<double>* workd,
|
||||
std::complex<double>* workl, a_int lworkl,
|
||||
std::complex<double>* rwork, a_int& info) {
|
||||
internal::pzneupd_c(comm, rvec, internal::convert_to_char(howmny_option),
|
||||
select, reinterpret_cast<_Complex double*>(d),
|
||||
reinterpret_cast<_Complex double*>(z), ldz,
|
||||
|
||||
@@ -26,6 +26,7 @@ subroutine stat_c( nopx_c, nbx_c, nrorth_c, nitref_c, nrstrt_c,
|
||||
bind(c, name="stat_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(out) :: nopx_c, nbx_c, nrorth_c, nitref_c, nrstrt_c
|
||||
real(kind=c_float), intent(out) :: tsaupd_c, tsaup2_c, tsaitr_c, tseigt_c, tsgets_c, tsapps_c, tsconv_c,&
|
||||
tnaupd_c, tnaup2_c, tnaitr_c, tneigh_c, tngets_c, tnapps_c, tnconv_c,&
|
||||
+2
-2
@@ -6,7 +6,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS =
|
||||
if MPI
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS += --enable-mpi
|
||||
endif
|
||||
arpack_include_HEADERS = debug.h stat.h
|
||||
arpack_include_HEADERS = debug.h stat.h arpackdef.h
|
||||
|
||||
SUBDIRS = .
|
||||
if ICB
|
||||
@@ -31,4 +31,4 @@ detect_arpack_bug.m4 CMakeLists.txt arpack-ng-config.cmake.in arpack-ng-config-v
|
||||
|
||||
pkgconfig_DATA = arpack@LIBSUFFIX@.pc
|
||||
|
||||
DISTCLEANFILES = $(pkgconfig_DATA)
|
||||
DISTCLEANFILES = $(pkgconfig_DATA) arpackdef.h
|
||||
|
||||
@@ -60,11 +60,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
c
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c %-----------------------------%
|
||||
c | Define maximum dimensions |
|
||||
c | for all arrays. |
|
||||
@@ -91,13 +97,16 @@ c
|
||||
Real
|
||||
& rwork(maxncv), rd(maxncv,3)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nx, nev, ncv, lworkl, info, j,
|
||||
& ierr, nconv, maxitr, ishfts, mode
|
||||
& nloc, nconv, maxitr, ishfts, mode
|
||||
Complex
|
||||
& sigma
|
||||
Real
|
||||
@@ -284,7 +293,7 @@ c
|
||||
call pcneupd (comm, rvec, 'A', select, d, v, ldv, sigma,
|
||||
& workev, bmat, nloc, which, nev, tol, resid, ncv,
|
||||
& v, ldv, iparam, ipntr, workd, workl, lworkl,
|
||||
& rwork, ierr)
|
||||
& rwork, info)
|
||||
c
|
||||
c %----------------------------------------------%
|
||||
c | Eigenvalues are returned in the one |
|
||||
@@ -297,7 +306,7 @@ c | corresponding to the eigenvalues in D is |
|
||||
c | returned in V. |
|
||||
c %----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -306,7 +315,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -424,7 +433,7 @@ c----------------------------------------------------------------------------
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
|
||||
@@ -60,10 +60,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define maximum dimensions |
|
||||
@@ -90,13 +97,16 @@ c
|
||||
& workev(3*maxncv),
|
||||
& workl(3*maxncv*maxncv+6*maxncv)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nx, nev, ncv, lworkl, info, j,
|
||||
& ierr, nconv, maxitr, ishfts, mode
|
||||
& nloc, nconv, maxitr, ishfts, mode
|
||||
Double precision
|
||||
& tol, sigmar, sigmai
|
||||
logical first, rvec
|
||||
@@ -295,7 +305,7 @@ c
|
||||
call pdneupd ( comm, rvec, 'A', select, d, d(1,2), v, ldv,
|
||||
& sigmar, sigmai, workev, bmat, nloc, which, nev, tol,
|
||||
& resid, ncv, v, ldv, iparam, ipntr, workd, workl,
|
||||
& lworkl, ierr )
|
||||
& lworkl, info )
|
||||
c
|
||||
c %-----------------------------------------------%
|
||||
c | The real part of the eigenvalue is returned |
|
||||
@@ -309,7 +319,7 @@ c | for the invariant subspace corresponding to |
|
||||
c | the eigenvalues in D is returned in V. |
|
||||
c %-----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -318,7 +328,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -468,7 +478,7 @@ c----------------------------------------------------------------------------
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
|
||||
@@ -59,11 +59,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define leading dimensions |
|
||||
@@ -91,12 +97,15 @@ c
|
||||
& workl(3*maxncv*maxncv+6*maxncv),
|
||||
& md(maxn), me(maxn-1), temp(maxn), temp_buf(maxn)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nev, ncv, lworkl, info, ierr, j,
|
||||
integer ido, n, nev, ncv, lworkl, info, nloc, j,
|
||||
& nconv, maxitr, ishfts, mode, blk
|
||||
Double precision
|
||||
& tol, sigmar, sigmai
|
||||
@@ -184,8 +193,8 @@ c
|
||||
20 continue
|
||||
md(n) = 4.0*one
|
||||
c
|
||||
call dpttrf(n, md, me, ierr)
|
||||
if ( ierr .ne. 0 ) then
|
||||
call dpttrf(n, md, me, info)
|
||||
if ( info .ne. 0 ) then
|
||||
print*, ' '
|
||||
print*, ' ERROR with _pttrf. '
|
||||
print*, ' '
|
||||
@@ -265,8 +274,8 @@ c======== Hack for Linear system ======= ccc
|
||||
call MPI_ALLREDUCE( temp_buf, temp, n,
|
||||
& MPI_DOUBLE_PRECISION, MPI_SUM, comm, ierr )
|
||||
call dpttrs(n, 1, md, me, temp, n,
|
||||
& ierr)
|
||||
if ( ierr .ne. 0 ) then
|
||||
& info)
|
||||
if ( info .ne. 0 ) then
|
||||
print*, ' '
|
||||
print*, ' ERROR with _pttrs. '
|
||||
print*, ' '
|
||||
@@ -338,7 +347,7 @@ c
|
||||
call pdneupd ( comm, rvec, 'A', select, d, d(1,2), v, ldv,
|
||||
& sigmar, sigmai, workev, bmat, nloc, which, nev, tol,
|
||||
& resid, ncv, v, ldv, iparam, ipntr, workd,
|
||||
& workl, lworkl, ierr )
|
||||
& workl, lworkl, info )
|
||||
c
|
||||
c %-----------------------------------------------%
|
||||
c | The real part of the eigenvalue is returned |
|
||||
@@ -352,7 +361,7 @@ c | for the invariant subspace corresponding to |
|
||||
c | the eigenvalues in D is returned in V. |
|
||||
c %-----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0 ) then
|
||||
if ( info .ne. 0 ) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -361,7 +370,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd'
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -499,7 +508,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, n, j, next, prev
|
||||
@@ -557,7 +566,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, j, next, prev
|
||||
|
||||
@@ -57,11 +57,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define leading dimensions |
|
||||
@@ -87,12 +93,15 @@ c
|
||||
logical select(maxncv)
|
||||
integer iparam(11), ipntr(11)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nev, ncv, lworkl, info, ierr, j,
|
||||
integer ido, n, nev, ncv, lworkl, info, nloc, j,
|
||||
& nx, nconv, maxitr, mode, ishfts
|
||||
logical rvec
|
||||
Double precision
|
||||
@@ -293,7 +302,7 @@ c
|
||||
call pdseupd ( comm, rvec, 'All', select,
|
||||
& d, v, ldv, sigma,
|
||||
& bmat, nloc, which, nev, tol, resid, ncv, v, ldv,
|
||||
& iparam, ipntr, workd, workl, lworkl, ierr )
|
||||
& iparam, ipntr, workd, workl, lworkl, info )
|
||||
c %----------------------------------------------%
|
||||
c | Eigenvalues are returned in the first column |
|
||||
c | of the two dimensional array D and the |
|
||||
@@ -305,7 +314,7 @@ c | corresponding to the eigenvalues in D is |
|
||||
c | returned in V. |
|
||||
c %----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -315,7 +324,7 @@ c
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _seupd, info = ', ierr
|
||||
print *, ' Error with _seupd, info = ', info
|
||||
print *, ' Check the documentation of _seupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -421,7 +430,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
Double precision
|
||||
|
||||
@@ -60,10 +60,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define maximum dimensions |
|
||||
@@ -90,13 +97,16 @@ c
|
||||
& workev(3*maxncv),
|
||||
& workl(3*maxncv*maxncv+6*maxncv)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nx, nev, ncv, lworkl, info, j,
|
||||
& ierr, nconv, maxitr, ishfts, mode
|
||||
& nloc, nconv, maxitr, ishfts, mode
|
||||
Real
|
||||
& tol, sigmar, sigmai
|
||||
logical first, rvec
|
||||
@@ -295,7 +305,7 @@ c
|
||||
call psneupd ( comm, rvec, 'A', select, d, d(1,2), v, ldv,
|
||||
& sigmar, sigmai, workev, bmat, nloc, which, nev, tol,
|
||||
& resid, ncv, v, ldv, iparam, ipntr, workd, workl,
|
||||
& lworkl, ierr )
|
||||
& lworkl, info )
|
||||
c
|
||||
c %-----------------------------------------------%
|
||||
c | The real part of the eigenvalue is returned |
|
||||
@@ -309,7 +319,7 @@ c | for the invariant subspace corresponding to |
|
||||
c | the eigenvalues in D is returned in V. |
|
||||
c %-----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -318,7 +328,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -468,7 +478,7 @@ c----------------------------------------------------------------------------
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
|
||||
@@ -59,11 +59,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define leading dimensions |
|
||||
@@ -91,12 +97,15 @@ c
|
||||
& workl(3*maxncv*maxncv+6*maxncv),
|
||||
& md(maxn), me(maxn-1), temp(maxn), temp_buf(maxn)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nev, ncv, lworkl, info, ierr, j,
|
||||
integer ido, n, nev, ncv, lworkl, info, nloc, j,
|
||||
& nconv, maxitr, ishfts, mode, blk
|
||||
Real
|
||||
& tol, sigmar, sigmai
|
||||
@@ -184,8 +193,8 @@ c
|
||||
20 continue
|
||||
md(n) = 4.0*one
|
||||
c
|
||||
call spttrf(n, md, me, ierr)
|
||||
if ( ierr .ne. 0 ) then
|
||||
call spttrf(n, md, me, info)
|
||||
if ( info .ne. 0 ) then
|
||||
print*, ' '
|
||||
print*, ' ERROR with _pttrf. '
|
||||
print*, ' '
|
||||
@@ -265,8 +274,8 @@ c======== Hack for Linear system ======= ccc
|
||||
call MPI_ALLREDUCE( temp_buf, temp, n,
|
||||
& MPI_REAL, MPI_SUM, comm, ierr )
|
||||
call spttrs(n, 1, md, me, temp, n,
|
||||
& ierr)
|
||||
if ( ierr .ne. 0 ) then
|
||||
& info)
|
||||
if ( info .ne. 0 ) then
|
||||
print*, ' '
|
||||
print*, ' ERROR with _pttrs. '
|
||||
print*, ' '
|
||||
@@ -338,7 +347,7 @@ c
|
||||
call psneupd ( comm, rvec, 'A', select, d, d(1,2), v, ldv,
|
||||
& sigmar, sigmai, workev, bmat, nloc, which, nev, tol,
|
||||
& resid, ncv, v, ldv, iparam, ipntr, workd,
|
||||
& workl, lworkl, ierr )
|
||||
& workl, lworkl, info )
|
||||
c
|
||||
c %-----------------------------------------------%
|
||||
c | The real part of the eigenvalue is returned |
|
||||
@@ -352,7 +361,7 @@ c | for the invariant subspace corresponding to |
|
||||
c | the eigenvalues in D is returned in V. |
|
||||
c %-----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0 ) then
|
||||
if ( info .ne. 0 ) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -361,7 +370,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd'
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -499,7 +508,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, n, j, next, prev
|
||||
@@ -557,7 +566,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, j, next, prev
|
||||
|
||||
@@ -57,11 +57,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define leading dimensions |
|
||||
@@ -87,12 +93,15 @@ c
|
||||
logical select(maxncv)
|
||||
integer iparam(11), ipntr(11)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nev, ncv, lworkl, info, ierr, j,
|
||||
integer ido, n, nev, ncv, lworkl, info, nloc, j,
|
||||
& nx, nconv, maxitr, mode, ishfts
|
||||
logical rvec
|
||||
Real
|
||||
@@ -293,7 +302,7 @@ c
|
||||
call psseupd ( comm, rvec, 'All', select,
|
||||
& d, v, ldv, sigma,
|
||||
& bmat, nloc, which, nev, tol, resid, ncv, v, ldv,
|
||||
& iparam, ipntr, workd, workl, lworkl, ierr )
|
||||
& iparam, ipntr, workd, workl, lworkl, info )
|
||||
c %----------------------------------------------%
|
||||
c | Eigenvalues are returned in the first column |
|
||||
c | of the two dimensional array D and the |
|
||||
@@ -305,7 +314,7 @@ c | corresponding to the eigenvalues in D is |
|
||||
c | returned in V. |
|
||||
c %----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -315,7 +324,7 @@ c
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _seupd, info = ', ierr
|
||||
print *, ' Error with _seupd, info = ', info
|
||||
print *, ' Check the documentation of _seupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -421,7 +430,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
Real
|
||||
|
||||
@@ -60,11 +60,17 @@ c
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
c
|
||||
c %---------------%
|
||||
c | MPI INTERFACE |
|
||||
c %---------------%
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
c %-----------------------------%
|
||||
c | Define maximum dimensions |
|
||||
c | for all arrays. |
|
||||
@@ -91,13 +97,16 @@ c
|
||||
Double precision
|
||||
& rwork(maxncv), rd(maxncv,3)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nx, nev, ncv, lworkl, info, j,
|
||||
& ierr, nconv, maxitr, ishfts, mode
|
||||
& nloc, nconv, maxitr, ishfts, mode
|
||||
Complex*16
|
||||
& sigma
|
||||
Double precision
|
||||
@@ -284,7 +293,7 @@ c
|
||||
call pzneupd (comm, rvec, 'A', select, d, v, ldv, sigma,
|
||||
& workev, bmat, nloc, which, nev, tol, resid, ncv,
|
||||
& v, ldv, iparam, ipntr, workd, workl, lworkl,
|
||||
& rwork, ierr)
|
||||
& rwork, info)
|
||||
c
|
||||
c %----------------------------------------------%
|
||||
c | Eigenvalues are returned in the one |
|
||||
@@ -297,7 +306,7 @@ c | corresponding to the eigenvalues in D is |
|
||||
c | returned in V. |
|
||||
c %----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -306,7 +315,7 @@ c %------------------------------------%
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _neupd, info = ', ierr
|
||||
print *, ' Error with _neupd, info = ', info
|
||||
print *, ' Check the documentation of _neupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -424,7 +433,7 @@ c----------------------------------------------------------------------------
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
c
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
|
||||
@@ -20,10 +20,10 @@ ZSRC = pznaitr.f pznapps.f pznaup2.f pznaupd.f pzneigh.f pzneupd.f pzngets.f \
|
||||
pzgetv0.f pzlarnv.f pdznorm2.f
|
||||
|
||||
if ICB
|
||||
SSRC += icbpss.f90 icbpsn.f90
|
||||
DSRC += icbpds.f90 icbpdn.f90
|
||||
CSRC += icbpcn.f90
|
||||
ZSRC += icbpzn.f90
|
||||
SSRC += icbpss.F90 icbpsn.F90
|
||||
DSRC += icbpds.F90 icbpdn.F90
|
||||
CSRC += icbpcn.F90
|
||||
ZSRC += icbpzn.F90
|
||||
endif
|
||||
|
||||
EXTRA_DIST = debug.h stat.h pcontext.h
|
||||
|
||||
@@ -5,6 +5,7 @@ subroutine pcnaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="pcnaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -33,6 +34,7 @@ subroutine pcneupd_c(comm, rvec, howmny, select, d, z, ldz, sigma, workev,&
|
||||
bind(c, name="pcneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -5,6 +5,7 @@ subroutine pdnaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="pdnaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -33,6 +34,7 @@ subroutine pdneupd_c(comm, rvec, howmny, select, &
|
||||
bind(c, name="pdneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -5,6 +5,7 @@ subroutine pdsaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="pdsaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -32,6 +33,7 @@ subroutine pdseupd_c(comm, rvec, howmny, select, d, z, ldz, sigma,&
|
||||
bind(c, name="pdseupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -5,6 +5,7 @@ subroutine psnaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="psnaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -33,6 +34,7 @@ subroutine psneupd_c(comm, rvec, howmny, select, &
|
||||
bind(c, name="psneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -5,6 +5,7 @@ subroutine pssaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="pssaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -32,6 +33,7 @@ subroutine psseupd_c(comm, rvec, howmny, select, d, z, ldz, sigma,&
|
||||
bind(c, name="psseupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -5,6 +5,7 @@ subroutine pznaupd_c(comm, ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="pznaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
@@ -33,6 +34,7 @@ subroutine pzneupd_c(comm, rvec, howmny, select, d, z, ldz, sigma, workev,&
|
||||
bind(c, name="pzneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), value, intent(in) :: comm
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
@@ -21,9 +21,6 @@
|
||||
* A*x = lambda*x where A is the diagonal matrix
|
||||
* with entries 1000, 999, ... , 2, 1 on the diagonal.
|
||||
* */
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
void dMatVec(double * x, double * y) {
|
||||
int i;
|
||||
@@ -32,25 +29,25 @@ void dMatVec(double * x, double * y) {
|
||||
};
|
||||
|
||||
int ds() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 3;
|
||||
a_int nev = 3;
|
||||
double tol = 0;
|
||||
double resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
double V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
double workd[3*N];
|
||||
bool rvec = true;
|
||||
char howmny[] = "A";
|
||||
double* d = (double*) malloc((nev+1)*sizeof(double));
|
||||
int select[ncv];
|
||||
a_int select[ncv];
|
||||
double z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
double sigma=0;
|
||||
int k;
|
||||
for (k=0; k < 3*N; ++k )
|
||||
@@ -58,8 +55,8 @@ int ds() {
|
||||
double workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
BLASINT info = 0;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int info = 0;
|
||||
int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
|
||||
iparam[0] = 1;
|
||||
@@ -101,25 +98,25 @@ void zMatVec(double _Complex * x, double _Complex * y) {
|
||||
};
|
||||
|
||||
int zn() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 1;
|
||||
a_int nev = 1;
|
||||
double tol = 0;
|
||||
double _Complex resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
double _Complex V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
double _Complex workd[3*N];
|
||||
bool rvec = true;
|
||||
char howmny[] = "A";
|
||||
double _Complex* d = (double _Complex*) malloc((nev+1)*sizeof(double _Complex));
|
||||
int select[ncv];
|
||||
a_int select[ncv];
|
||||
double _Complex z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
double _Complex sigma=0. + I*0.;
|
||||
int k;
|
||||
for (k=0; k < 3*N; ++k )
|
||||
@@ -127,10 +124,10 @@ int zn() {
|
||||
double _Complex workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0. + I * 0.;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
double _Complex rwork[ncv];
|
||||
double _Complex workev[2*ncv];
|
||||
BLASINT info = 0;
|
||||
a_int info = 0;
|
||||
int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
|
||||
iparam[0] = 1;
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
#include "debug_c.hpp" // debug parpack.
|
||||
#include "stat_c.hpp" // arpack statistics.
|
||||
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
void diagonal_matrix_vector_product(float const* const x, float* const y) {
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
y[i] = static_cast<float>(i + 1) * x[i];
|
||||
@@ -32,18 +28,18 @@ void diagonal_matrix_vector_product(float const* const x, float* const y) {
|
||||
}
|
||||
|
||||
void real_symmetric_runner() {
|
||||
BLASINT N = 1000;
|
||||
BLASINT nev = 3;
|
||||
BLASINT ncv = 2 * nev + 1;
|
||||
BLASINT ldz = N + 1;
|
||||
BLASINT lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
BLASINT ldv = N;
|
||||
a_int N = 1000;
|
||||
a_int nev = 3;
|
||||
a_int ncv = 2 * nev + 1;
|
||||
a_int ldz = N + 1;
|
||||
a_int lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
a_int ldv = N;
|
||||
|
||||
bool rvec = true;
|
||||
float tol = 0.0f;
|
||||
float sigma = 0.0f;
|
||||
|
||||
std::array<BLASINT, 14> ipntr;
|
||||
std::array<a_int, 14> ipntr;
|
||||
|
||||
std::vector<float> workd(3 * N, 0.0f);
|
||||
std::vector<float> workl(3 * (ncv * ncv) + 6 * ncv, 0.0f);
|
||||
@@ -51,14 +47,14 @@ void real_symmetric_runner() {
|
||||
std::vector<float> d(nev + 1);
|
||||
std::vector<float> z((N + 1) * (nev + 1));
|
||||
std::vector<float> resid(N);
|
||||
std::vector<int> select(ncv);
|
||||
std::vector<a_int> select(ncv);
|
||||
|
||||
BLASINT info = 0;
|
||||
a_int info = 0;
|
||||
|
||||
int rank;
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
|
||||
std::array<BLASINT, 11> iparam;
|
||||
std::array<a_int, 11> iparam;
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10 * N;
|
||||
iparam[3] = 1;
|
||||
@@ -67,7 +63,7 @@ void real_symmetric_runner() {
|
||||
|
||||
MPI_Fint MCW = MPI_Comm_c2f(MPI_COMM_WORLD);
|
||||
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
|
||||
while (ido != 99) {
|
||||
arpack::saupd(MCW, ido, arpack::bmat::identity, N,
|
||||
@@ -105,11 +101,11 @@ void diagonal_matrix_vector_product(std::complex<float> const* const x,
|
||||
}
|
||||
|
||||
void complex_symmetric_runner() {
|
||||
BLASINT N = 1000;
|
||||
BLASINT nev = 1;
|
||||
BLASINT ncv = 2 * nev + 1;
|
||||
BLASINT ldv = N;
|
||||
BLASINT ldz = N + 1;
|
||||
a_int N = 1000;
|
||||
a_int nev = 1;
|
||||
a_int ncv = 2 * nev + 1;
|
||||
a_int ldv = N;
|
||||
a_int ldz = N + 1;
|
||||
|
||||
float tol = 0.0f;
|
||||
bool rvec = true;
|
||||
@@ -120,31 +116,31 @@ void complex_symmetric_runner() {
|
||||
std::vector<std::complex<float>> workd(3 * N);
|
||||
std::vector<std::complex<float>> d(nev + 1);
|
||||
std::vector<std::complex<float>> z((N + 1) * (nev + 1));
|
||||
std::vector<int> select(ncv);
|
||||
std::vector<a_int> select(ncv);
|
||||
|
||||
BLASINT lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
a_int lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
std::vector<std::complex<float>> workl(lworkl);
|
||||
|
||||
std::vector<std::complex<float>> rwork(ncv);
|
||||
std::vector<std::complex<float>> workev(2 * ncv);
|
||||
|
||||
BLASINT info = 0;
|
||||
a_int info = 0;
|
||||
|
||||
int rank;
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
|
||||
std::array<BLASINT, 11> iparam;
|
||||
std::array<a_int, 11> iparam;
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10 * N;
|
||||
iparam[3] = 1;
|
||||
iparam[4] = 0; // number of ev found by arpack.
|
||||
iparam[6] = 1;
|
||||
|
||||
std::array<BLASINT, 14> ipntr;
|
||||
std::array<a_int, 14> ipntr;
|
||||
|
||||
MPI_Fint MCW = MPI_Comm_c2f(MPI_COMM_WORLD);
|
||||
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
|
||||
while (ido != 99) {
|
||||
arpack::naupd(MCW, ido, arpack::bmat::identity, N,
|
||||
|
||||
+23
-11
@@ -3,7 +3,15 @@ c----------- Example to reproduce issue#46 -------------------------------------
|
||||
c
|
||||
program issue46
|
||||
include 'mpif.h'
|
||||
integer ierr, comm, color, key, myid, nprocs, cnprocs
|
||||
c %-------------------------------%
|
||||
c | MPI INTERFACE |
|
||||
c | ILP64 is not supported by MPI |
|
||||
c | integer*4 must be imposed in |
|
||||
c | all calls involving MPI. |
|
||||
c | |
|
||||
c | Use ierr for MPI calls. |
|
||||
c %-------------------------------%
|
||||
integer*4 ierr, comm, myid, nprocs, cnprocs, color
|
||||
call MPI_INIT( ierr )
|
||||
call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
|
||||
call MPI_COMM_SIZE( MPI_COMM_WORLD, nprocs, ierr )
|
||||
@@ -18,7 +26,8 @@ c Create commuticator to run arnoldi only on the first CPU
|
||||
call MPI_COMM_SIZE( comm, cnprocs, ierr )
|
||||
if(color .eq. 1) call parnoldi(comm)
|
||||
call MPI_Barrier(MPI_COMM_WORLD, ierr)
|
||||
call parnoldi(MPI_COMM_WORLD)
|
||||
comm = MPI_COMM_WORLD
|
||||
call parnoldi(comm)
|
||||
call MPI_FINALIZE(ierr)
|
||||
end
|
||||
|
||||
@@ -28,7 +37,7 @@ c Create commuticator to run arnoldi only on the first CPU
|
||||
include 'debug.h'
|
||||
include 'stat.h'
|
||||
|
||||
integer comm, myid, nprocs, rc, nloc
|
||||
integer*4 comm, myid, nprocs, rc, ierr
|
||||
c
|
||||
c %-----------------------------%
|
||||
c | Define leading dimensions |
|
||||
@@ -54,12 +63,15 @@ c
|
||||
logical select(maxncv)
|
||||
integer iparam(11), ipntr(11)
|
||||
c
|
||||
c %---------------%
|
||||
c | Local Scalars |
|
||||
c %---------------%
|
||||
c %------------------------------------%
|
||||
c | Local Scalars |
|
||||
c | |
|
||||
c | Use info if ILP64 can be supported |
|
||||
c | (call to BLAS, LAPACK, ARPACK). |
|
||||
c %------------------------------------%
|
||||
c
|
||||
character bmat*1, which*2
|
||||
integer ido, n, nev, ncv, lworkl, info, ierr, j,
|
||||
integer ido, n, nev, ncv, lworkl, info, nloc, j,
|
||||
& nx, nconv, maxitr, mode, ishfts
|
||||
logical rvec
|
||||
Double precision
|
||||
@@ -258,7 +270,7 @@ c
|
||||
call pdseupd ( comm, rvec, 'A', select,
|
||||
& d, v, ldv, sigma,
|
||||
& bmat, nloc, which, nev, tol, resid, ncv, v, ldv,
|
||||
& iparam, ipntr, workd, workl, lworkl, ierr )
|
||||
& iparam, ipntr, workd, workl, lworkl, info )
|
||||
c %----------------------------------------------%
|
||||
c | Eigenvalues are returned in the first column |
|
||||
c | of the two dimensional array D and the |
|
||||
@@ -270,7 +282,7 @@ c | corresponding to the eigenvalues in D is |
|
||||
c | returned in V. |
|
||||
c %----------------------------------------------%
|
||||
c
|
||||
if ( ierr .ne. 0) then
|
||||
if ( info .ne. 0) then
|
||||
c
|
||||
c %------------------------------------%
|
||||
c | Error condition: |
|
||||
@@ -280,7 +292,7 @@ c
|
||||
c
|
||||
if ( myid .eq. 0 ) then
|
||||
print *, ' '
|
||||
print *, ' Error with _seupd, info = ', ierr
|
||||
print *, ' Error with _seupd, info = ', info
|
||||
print *, ' Check the documentation of _seupd. '
|
||||
print *, ' '
|
||||
endif
|
||||
@@ -385,7 +397,7 @@ c
|
||||
c
|
||||
c .. MPI Declarations ...
|
||||
include 'mpif.h'
|
||||
integer comm, nprocs, myid, ierr,
|
||||
integer*4 comm, nprocs, myid, ierr,
|
||||
& status(MPI_STATUS_SIZE)
|
||||
integer nloc, nx, np, j, lo, next, prev
|
||||
Double precision
|
||||
|
||||
@@ -17,6 +17,21 @@ Important Features:
|
||||
Shift-Invert strategies for all problem types, data types and precision.
|
||||
* arpackmm: utility to test arpack with matrix market files.
|
||||
Note: to run this utility, you need the eigen library (to handle RCI).
|
||||
* ILP64 support:
|
||||
* users: set INTERFACE64 at configure time.
|
||||
* developpers:
|
||||
* all files which needs ILP64 support must include "arpackdef.h".
|
||||
* when coding, use a_int (defined in arpackdef.h) instead of int.
|
||||
a_int stands for "architecture int": it's #defined to int or int64_t according
|
||||
to the architecture.
|
||||
* example: to test arpack with sequential ILP64 MKL assuming you use gnu compilers
|
||||
~/arpack-ng> ./bootstrap
|
||||
~/arpack-ng> export FFLAGS='-I/usr/include/mkl'
|
||||
~/arpack-ng> export FCFLAGS='-I/usr/include/mkl'
|
||||
~/arpack-ng> export LIBS='-Wl,--no-as-needed -lmkl_sequential -lmkl_core -lpthread -lm -ldl'
|
||||
~/arpack-ng> export INTERFACE64=1
|
||||
~/arpack-ng> ./configure --with-blas=mkl_gf_ilp64 --with-lapack=mkl_gf_ilp64
|
||||
~/arpack-ng> make all check
|
||||
|
||||
This project started as a joint project between Debian, Octave and Scilab in order to
|
||||
provide a common and maintained version of arpack.
|
||||
|
||||
+4
-4
@@ -15,10 +15,10 @@ ZSRC = znaitr.f znapps.f znaup2.f znaupd.f zneigh.f zneupd.f zngets.f zstatn.f \
|
||||
zgetv0.f zsortc.f
|
||||
|
||||
if ICB
|
||||
SSRC += icbass.f90 icbasn.f90
|
||||
DSRC += icbads.f90 icbadn.f90
|
||||
CSRC += icbacn.f90
|
||||
ZSRC += icbazn.f90
|
||||
SSRC += icbass.F90 icbasn.F90
|
||||
DSRC += icbads.F90 icbadn.F90
|
||||
CSRC += icbacn.F90
|
||||
ZSRC += icbazn.F90
|
||||
endif
|
||||
|
||||
EXTRA_DIST = debug.h stat.h version.h
|
||||
|
||||
@@ -5,6 +5,7 @@ subroutine cnaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="cnaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -32,6 +33,7 @@ subroutine cneupd_c(rvec, howmny, select, d, z, ldz, sigma, workev, &
|
||||
bind(c, name="cneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
@@ -5,6 +5,7 @@ subroutine dnaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="dnaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -32,6 +33,7 @@ subroutine dneupd_c(rvec, howmny, select, &
|
||||
bind(c, name="dneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
@@ -5,6 +5,7 @@ subroutine dsaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="dsaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -31,6 +32,7 @@ subroutine dseupd_c(rvec, howmny, select, d, z, ldz, sigma, &
|
||||
bind(c, name="dseupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
@@ -5,6 +5,7 @@ subroutine snaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="snaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -32,6 +33,7 @@ subroutine sneupd_c(rvec, howmny, select, &
|
||||
bind(c, name="sneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
@@ -5,6 +5,7 @@ subroutine ssaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="ssaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -31,6 +32,7 @@ subroutine sseupd_c(rvec, howmny, select, d, z, ldz, sigma, &
|
||||
bind(c, name="sseupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
@@ -5,6 +5,7 @@ subroutine znaupd_c(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv,&
|
||||
bind(c, name="znaupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
integer(kind=c_int), intent(inout) :: ido
|
||||
character(kind=c_char), dimension(1), intent(in) :: bmat
|
||||
integer(kind=c_int), value, intent(in) :: n
|
||||
@@ -32,6 +33,7 @@ subroutine zneupd_c(rvec, howmny, select, d, z, ldz, sigma, workev, &
|
||||
bind(c, name="zneupd_c")
|
||||
use :: iso_c_binding
|
||||
implicit none
|
||||
#include "arpackdef.h"
|
||||
logical(kind=c_bool), value, intent(in) :: rvec
|
||||
character(kind=c_char), dimension(1), intent(in) :: howmny
|
||||
logical(kind=c_bool), dimension(ncv), intent(in) :: select
|
||||
+21
-22
@@ -1,3 +1,5 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -16,18 +18,15 @@
|
||||
* This is not efficient since the problem is
|
||||
* symmetric but is done to exhibit the bug.
|
||||
* */
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
extern void dnaupd(BLASINT *, char *, BLASINT *, char *, BLASINT *,
|
||||
double *, double *, BLASINT *, double *,
|
||||
BLASINT *, BLASINT *, BLASINT *, double *,
|
||||
double *, BLASINT *, BLASINT *);
|
||||
extern void dnaupd(a_int *, char *, a_int *, char *, a_int *,
|
||||
double *, double *, a_int *, double *,
|
||||
a_int *, a_int *, a_int *, double *,
|
||||
double *, a_int *, a_int *);
|
||||
|
||||
extern void dneupd( BLASINT*, char*, BLASINT *, double *, double *, double *, BLASINT*, double *,
|
||||
double *, double *, char *, BLASINT *, char *, BLASINT *, double *, double *, BLASINT *,
|
||||
double *, BLASINT *, BLASINT *, BLASINT *, double *, double *, BLASINT *, BLASINT * );
|
||||
extern void dneupd( a_int*, char*, a_int *, double *, double *, double *, a_int*, double *,
|
||||
double *, double *, char *, a_int *, char *, a_int *, double *, double *, a_int *,
|
||||
double *, a_int *, a_int *, a_int *, double *, double *, a_int *, a_int * );
|
||||
|
||||
void matVec(double * x, double * y) {
|
||||
int i;
|
||||
@@ -36,26 +35,26 @@ void matVec(double * x, double * y) {
|
||||
};
|
||||
|
||||
int main() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 9;
|
||||
a_int nev = 9;
|
||||
double tol = 0;
|
||||
double resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
double V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
double workd[3*N];
|
||||
BLASINT rvec = 1;
|
||||
a_int rvec = 1;
|
||||
char howmny[] = "A";
|
||||
double* dr = (double*) malloc((nev+1)*sizeof(double));
|
||||
double* di = (double*) malloc((nev+1)*sizeof(double));
|
||||
BLASINT select[3*ncv];
|
||||
a_int select[3*ncv];
|
||||
double z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
double sigmar=0;
|
||||
double sigmai=0;
|
||||
double workev[3*ncv];
|
||||
@@ -65,8 +64,8 @@ int main() {
|
||||
double workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
BLASINT info = 0;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int info = 0;
|
||||
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10*N;
|
||||
|
||||
+21
-22
@@ -1,3 +1,5 @@
|
||||
#include "arpackdef.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -16,18 +18,15 @@
|
||||
* This is not efficient since the problem is
|
||||
* symmetric but is done to exhibit the bug.
|
||||
*/
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
extern void snaupd(BLASINT *, char *, BLASINT *, char *, BLASINT *,
|
||||
float *, float *, BLASINT *, float *,
|
||||
BLASINT *, BLASINT *, BLASINT *, float *,
|
||||
float *, BLASINT *, BLASINT *);
|
||||
extern void snaupd(a_int *, char *, a_int *, char *, a_int *,
|
||||
float *, float *, a_int *, float *,
|
||||
a_int *, a_int *, a_int *, float *,
|
||||
float *, a_int *, a_int *);
|
||||
|
||||
extern void sneupd( BLASINT*, char*, BLASINT *, float *, float *, float *, BLASINT*, float *,
|
||||
float *, float *, char *, BLASINT *, char *, BLASINT *, float *, float *, BLASINT *,
|
||||
float *, BLASINT *, BLASINT *, BLASINT *, float *, float *, BLASINT *, BLASINT * );
|
||||
extern void sneupd( a_int*, char*, a_int *, float *, float *, float *, a_int*, float *,
|
||||
float *, float *, char *, a_int *, char *, a_int *, float *, float *, a_int *,
|
||||
float *, a_int *, a_int *, a_int *, float *, float *, a_int *, a_int * );
|
||||
|
||||
|
||||
void matVec(float * x, float * y) {
|
||||
@@ -37,26 +36,26 @@ void matVec(float * x, float * y) {
|
||||
};
|
||||
|
||||
int main() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 9;
|
||||
a_int nev = 9;
|
||||
float tol = 0;
|
||||
float resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
float V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
float workd[3*N];
|
||||
BLASINT rvec = 1;
|
||||
a_int rvec = 1;
|
||||
char howmny[] = "A";
|
||||
float* dr = (float*) malloc((nev+1)*sizeof(float));
|
||||
float* di = (float*) malloc((nev+1)*sizeof(float));
|
||||
BLASINT select[3*ncv];
|
||||
a_int select[3*ncv];
|
||||
float z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
float sigmar=0;
|
||||
float sigmai=0;
|
||||
float workev[3*ncv];
|
||||
@@ -66,8 +65,8 @@ int main() {
|
||||
float workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
BLASINT info = 0;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int info = 0;
|
||||
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10*N;
|
||||
|
||||
+22
-25
@@ -19,9 +19,6 @@
|
||||
* A*x = lambda*x where A is the diagonal matrix
|
||||
* with entries 1000, 999, ... , 2, 1 on the diagonal.
|
||||
* */
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
void dMatVec(double * x, double * y) {
|
||||
int i;
|
||||
@@ -30,25 +27,25 @@ void dMatVec(double * x, double * y) {
|
||||
};
|
||||
|
||||
int ds() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 9;
|
||||
a_int nev = 9;
|
||||
double tol = 0;
|
||||
double resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
double V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
double workd[3*N];
|
||||
bool rvec = true;
|
||||
char howmny[] = "A";
|
||||
double* d = (double*) malloc((nev+1)*sizeof(double));
|
||||
int select[ncv];
|
||||
a_int select[ncv];
|
||||
double z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
double sigma=0;
|
||||
int k;
|
||||
for (k=0; k < 3*N; ++k )
|
||||
@@ -56,8 +53,8 @@ int ds() {
|
||||
double workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
BLASINT info = 0;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int info = 0;
|
||||
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10*N;
|
||||
@@ -97,25 +94,25 @@ void zMatVec(double _Complex * x, double _Complex * y) {
|
||||
};
|
||||
|
||||
int zn() {
|
||||
BLASINT ido = 0;
|
||||
a_int ido = 0;
|
||||
char bmat[] = "I";
|
||||
BLASINT N = 1000;
|
||||
a_int N = 1000;
|
||||
char which[] = "LM";
|
||||
BLASINT nev = 9;
|
||||
a_int nev = 9;
|
||||
double tol = 0;
|
||||
double _Complex resid[N];
|
||||
BLASINT ncv = 2*nev+1;
|
||||
a_int ncv = 2*nev+1;
|
||||
double _Complex V[ncv*N];
|
||||
BLASINT ldv = N;
|
||||
BLASINT iparam[11];
|
||||
BLASINT ipntr[14];
|
||||
a_int ldv = N;
|
||||
a_int iparam[11];
|
||||
a_int ipntr[14];
|
||||
double _Complex workd[3*N];
|
||||
bool rvec = true;
|
||||
char howmny[] = "A";
|
||||
double _Complex* d = (double _Complex*) malloc((nev+1)*sizeof(double _Complex));
|
||||
int select[ncv];
|
||||
a_int select[ncv];
|
||||
double _Complex z[(N+1)*(nev+1)];
|
||||
BLASINT ldz = N+1;
|
||||
a_int ldz = N+1;
|
||||
double _Complex sigma=0. + I*0.;
|
||||
int k;
|
||||
for (k=0; k < 3*N; ++k )
|
||||
@@ -123,10 +120,10 @@ int zn() {
|
||||
double _Complex workl[3*(ncv*ncv) + 6*ncv];
|
||||
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
|
||||
workl[k] = 0;
|
||||
BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
a_int lworkl = 3*(ncv*ncv) + 6*ncv;
|
||||
double rwork[ncv];
|
||||
double _Complex workev[2*ncv];
|
||||
BLASINT info = 0;
|
||||
a_int info = 0;
|
||||
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10*N;
|
||||
|
||||
+20
-24
@@ -19,10 +19,6 @@
|
||||
#include "debug_c.hpp" // debug arpack.
|
||||
#include "stat_c.hpp" // arpack statistics.
|
||||
|
||||
#ifndef BLASINT
|
||||
#define BLASINT int
|
||||
#endif
|
||||
|
||||
template<typename Real>
|
||||
void diagonal_matrix_vector_product(Real const* const x, Real* const y) {
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
@@ -32,15 +28,15 @@ void diagonal_matrix_vector_product(Real const* const x, Real* const y) {
|
||||
|
||||
template<typename Real>
|
||||
void real_symmetric_runner() {
|
||||
BLASINT const N = 1000;
|
||||
BLASINT const nev = 9;
|
||||
a_int const N = 1000;
|
||||
a_int const nev = 9;
|
||||
|
||||
BLASINT const ncv = 2 * nev + 1;
|
||||
BLASINT const ldv = N;
|
||||
a_int const ncv = 2 * nev + 1;
|
||||
a_int const ldv = N;
|
||||
|
||||
BLASINT const ldz = N + 1;
|
||||
a_int const ldz = N + 1;
|
||||
|
||||
BLASINT const lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
a_int const lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
|
||||
Real const tol = 0.0;
|
||||
Real const sigma = 0.0;
|
||||
@@ -54,7 +50,7 @@ void real_symmetric_runner() {
|
||||
std::vector<Real> d((nev + 1));
|
||||
std::vector<Real> z((N + 1) * (nev + 1));
|
||||
|
||||
std::array<BLASINT, 11> iparam{};
|
||||
std::array<a_int, 11> iparam{};
|
||||
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10 * N;
|
||||
@@ -62,9 +58,9 @@ void real_symmetric_runner() {
|
||||
iparam[4] = 0; // number of ev found by arpack.
|
||||
iparam[6] = 1;
|
||||
|
||||
std::array<BLASINT, 14> ipntr{};
|
||||
std::array<a_int, 14> ipntr{};
|
||||
|
||||
BLASINT info = 0, ido = 0;
|
||||
a_int info = 0, ido = 0;
|
||||
|
||||
while (ido != 99) {
|
||||
arpack::saupd(ido, arpack::bmat::identity, N,
|
||||
@@ -81,7 +77,7 @@ void real_symmetric_runner() {
|
||||
throw std::domain_error("Error inside ARPACK routines");
|
||||
}
|
||||
|
||||
std::vector<int> select(ncv);
|
||||
std::vector<a_int> select(ncv);
|
||||
|
||||
arpack::seupd(rvec, arpack::howmny::ritz_vectors, select.data(), d.data(),
|
||||
z.data(), ldz, sigma, arpack::bmat::identity, N,
|
||||
@@ -109,15 +105,15 @@ void diagonal_matrix_vector_product(std::complex<Real> const* const x,
|
||||
|
||||
template<typename Real>
|
||||
void complex_symmetric_runner() {
|
||||
BLASINT const N = 1000;
|
||||
BLASINT const nev = 9;
|
||||
a_int const N = 1000;
|
||||
a_int const nev = 9;
|
||||
|
||||
BLASINT const ncv = 2 * nev + 1;
|
||||
BLASINT const ldv = N;
|
||||
a_int const ncv = 2 * nev + 1;
|
||||
a_int const ldv = N;
|
||||
|
||||
BLASINT const ldz = N + 1;
|
||||
a_int const ldz = N + 1;
|
||||
|
||||
BLASINT const lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
a_int const lworkl = 3 * (ncv * ncv) + 6 * ncv;
|
||||
|
||||
Real const tol = 0.0;
|
||||
std::complex<Real> const sigma(0.0, 0.0);
|
||||
@@ -133,16 +129,16 @@ void complex_symmetric_runner() {
|
||||
std::vector<Real> rwork(ncv);
|
||||
std::vector<std::complex<Real>> workev(2 * ncv);
|
||||
|
||||
std::array<BLASINT, 11> iparam{};
|
||||
std::array<a_int, 11> iparam{};
|
||||
iparam[0] = 1;
|
||||
iparam[2] = 10 * N;
|
||||
iparam[3] = 1;
|
||||
iparam[4] = 0; // number of ev found by arpack.
|
||||
iparam[6] = 1;
|
||||
|
||||
std::array<BLASINT, 14> ipntr{};
|
||||
std::array<a_int, 14> ipntr{};
|
||||
|
||||
BLASINT info = 0, ido = 0;
|
||||
a_int info = 0, ido = 0;
|
||||
|
||||
while (ido != 99) {
|
||||
arpack::naupd(ido, arpack::bmat::identity, N,
|
||||
@@ -159,7 +155,7 @@ void complex_symmetric_runner() {
|
||||
throw std::domain_error("Error inside ARPACK routines");
|
||||
}
|
||||
|
||||
std::vector<int> select(ncv);
|
||||
std::vector<a_int> select(ncv);
|
||||
|
||||
arpack::neupd(rvec, arpack::howmny::ritz_vectors, select.data(), d.data(),
|
||||
z.data(), ldz, sigma, workev.data(), arpack::bmat::identity, N,
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef __ARPACKDEF_H__
|
||||
#define __ARPACKDEF_H__
|
||||
|
||||
#cmakedefine01 INTERFACE64
|
||||
|
||||
#if INTERFACE64
|
||||
#define c_int c_int64_t
|
||||
#define a_int int64_t
|
||||
#define a_uint uint64_t
|
||||
#else
|
||||
#define a_int int
|
||||
#define a_uint unsigned int
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+12
-1
@@ -4,6 +4,7 @@ AC_CONFIG_SRCDIR([SRC/version.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_LINKS([TESTS/testA.mtx:TESTS/testA.mtx])
|
||||
AC_CONFIG_HEADER([arpackdef.autotools.h]) # Autoheader : generate arpackdef.autotools.h.in to handle #ifdef
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
@@ -27,7 +28,10 @@ if test x"$INTERFACE64" == x"1"; then
|
||||
AX_CHECK_COMPILE_FLAG(-fdefault-integer-8, FCFLAGS="$FCFLAGS -fdefault-integer-8",
|
||||
AX_CHECK_COMPILE_FLAG(-i8, FCFLAGS="$FCFLAGS -i8",
|
||||
AC_MSG_WARN([configure does not know how to make your Fortran compiler use 64-bit integers: set it manually via FCFLAGS.])))
|
||||
CFLAGS="$CFLAGS -DBLASINT=int64_t"
|
||||
|
||||
AC_DEFINE([INTERFACE64],[1],['INTERFACE64 is enabled']) # Add a #define (or #undef) for INTERFACE64 in arpackdef.autotools.h.in (autoheader)
|
||||
else
|
||||
INTERFACE64=0
|
||||
fi
|
||||
|
||||
AC_ARG_VAR(LIBSUFFIX, [suffix to add to ARPACK libraries names])
|
||||
@@ -253,6 +257,10 @@ AC_OUTPUT([
|
||||
Makefile
|
||||
])
|
||||
|
||||
# After AC_OUTPUT (autoconf is done) : generate arpackdef.h (for fortran) from arpackdef.autotools.h.in (for C)
|
||||
|
||||
AX_GEN_ARPACKDEF()
|
||||
|
||||
AC_MSG_RESULT([
|
||||
--------------------------------------------------
|
||||
Configuration summary for $PACKAGE_NAME ($VERSION)
|
||||
@@ -260,6 +268,7 @@ Configuration summary for $PACKAGE_NAME ($VERSION)
|
||||
Installation prefix : $prefix
|
||||
MPI enabled : $enable_mpi
|
||||
ICB enabled : $enable_icb
|
||||
INTERFACE64 : $INTERFACE64
|
||||
F77 : $F77
|
||||
FFLAGS : $FFLAGS
|
||||
FC : $FC
|
||||
@@ -271,6 +280,8 @@ CXXFLAGS : $CXXFLAGS
|
||||
BLAS : $BLAS_LIBS
|
||||
LAPACK : $LAPACK_LIBS
|
||||
EIGEN : $EIGEN3_CFLAGS
|
||||
LIBS : $LIBS
|
||||
LDADD : $LDADD
|
||||
--------------------------------------------------
|
||||
Configuration OK
|
||||
--------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_GEN_ARPACKDEF()
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro handles #define symbols for dedicated architecture.
|
||||
# In most cases, this is not necessary. For specific architecture
|
||||
# (like ILP64), some symbols must be changed accordingly.
|
||||
#
|
||||
# Autoheader generates arpackdef.autotools.h (from arpackdef.autotools.h.in)
|
||||
# to handle #define symbols for C. The file arpackdef.autotools.h (C-style)
|
||||
# may not be used by fortran.
|
||||
#
|
||||
# AX_GEN_ARPACKDEF generates arpackdef.h from arpackdef.autotools.h.
|
||||
# arpackdef.h can be used by fortran and/or C.
|
||||
#
|
||||
|
||||
AC_DEFUN([AX_GEN_ARPACKDEF],
|
||||
[
|
||||
AC_MSG_NOTICE([generating arpackdef.h])
|
||||
echo "#ifndef __ARPACKDEF_H__" > arpackdef.h
|
||||
echo "#define __ARPACKDEF_H__" >> arpackdef.h
|
||||
echo "" >> arpackdef.h
|
||||
grep ^.define arpackdef.autotools.h >> arpackdef.h
|
||||
echo "" >> arpackdef.h
|
||||
echo "#if INTERFACE64" >> arpackdef.h
|
||||
echo "#define c_int c_int64_t" >> arpackdef.h
|
||||
echo "#define a_int int64_t" >> arpackdef.h
|
||||
echo "#define a_uint uint64_t" >> arpackdef.h
|
||||
echo "#else" >> arpackdef.h
|
||||
echo "#define a_int int" >> arpackdef.h
|
||||
echo "#define a_uint unsigned int" >> arpackdef.h
|
||||
echo "#endif" >> arpackdef.h
|
||||
echo "" >> arpackdef.h
|
||||
echo "#endif" >> arpackdef.h
|
||||
])
|
||||
Reference in New Issue
Block a user