# HG changeset patch
# User Carlo de Falco
# Date 1359451076 -3600
# Node ID e15f2837ed55d96a2d20fdaf7ef3590900ffd2f0
# Parent 5c824586de6694c5dd0ffb8d2979cf432df89a49
Add verbose output to f77 functions invoked in EIG.cc
EIG.cc: be verbose when invoking F77 functions if the option
--enable-f77-warn-name is given at configure time.
diff --git a/liboctave/Makefile.am b/liboctave/Makefile.am
--- a/liboctave/Makefile.am
+++ b/liboctave/Makefile.am
@@ -34,6 +34,7 @@
-Ioperators -I$(srcdir)/operators \
-I$(srcdir)/system \
-I$(srcdir)/util \
+ -I$(srcdir)/interpfcn \
-I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu
AM_CFLAGS += $(WARN_CFLAGS)
diff --git a/liboctave/cruft/misc/f77-fcn.h b/liboctave/cruft/misc/f77-fcn.h
--- a/liboctave/cruft/misc/f77-fcn.h
+++ b/liboctave/cruft/misc/f77-fcn.h
@@ -85,13 +85,14 @@
"calling %s %s\ncalled from:\n\t%s at line %s", \
STRINGIZE (F), STRINGIZE (args), \
STRINGIZE(__FILE__), STRINGIZE(__LINE__))
+
#define F77_VERBOSE_XFCN(F, f, args) \
(*current_liboctave_warning_with_id_handler) \
("Octave:f77-name", \
"calling %s %s\ncalled from:\n\t%s at line %s", \
STRINGIZE (F), STRINGIZE (args), \
STRINGIZE(__FILE__), STRINGIZE(__LINE__)); \
- F77_XFCN (f, F, args)
+ F77_XFCN (F, f, args)
#endif
/* So we can check to see if an exception has occurred. */
diff --git a/liboctave/numeric/EIG.cc b/liboctave/numeric/EIG.cc
--- a/liboctave/numeric/EIG.cc
+++ b/liboctave/numeric/EIG.cc
@@ -41,7 +41,7 @@
const octave_idx_type&, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (zgeev, ZGEEV) (F77_CONST_CHAR_ARG_DECL,
F77_CONST_CHAR_ARG_DECL,
@@ -52,7 +52,7 @@
const octave_idx_type&, double*, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (dsyev, DSYEV) (F77_CONST_CHAR_ARG_DECL,
F77_CONST_CHAR_ARG_DECL,
@@ -61,7 +61,7 @@
const octave_idx_type&, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (zheev, ZHEEV) (F77_CONST_CHAR_ARG_DECL,
F77_CONST_CHAR_ARG_DECL,
@@ -71,14 +71,14 @@
octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (dpotrf, DPOTRF) (F77_CONST_CHAR_ARG_DECL,
const octave_idx_type&, double*,
const octave_idx_type&, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (zpotrf, ZPOTRF) (F77_CONST_CHAR_ARG_DECL,
const octave_idx_type&,
@@ -86,7 +86,7 @@
octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (dggev, DGGEV) (F77_CONST_CHAR_ARG_DECL,
F77_CONST_CHAR_ARG_DECL,
@@ -99,7 +99,7 @@
const octave_idx_type&, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (dsygv, DSYGV) (const octave_idx_type&,
F77_CONST_CHAR_ARG_DECL,
@@ -110,7 +110,7 @@
const octave_idx_type&, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (zggev, ZGGEV) (F77_CONST_CHAR_ARG_DECL,
F77_CONST_CHAR_ARG_DECL,
@@ -123,7 +123,7 @@
const octave_idx_type&, double*, octave_idx_type&
F77_CHAR_ARG_LEN_DECL
F77_CHAR_ARG_LEN_DECL);
-
+
F77_RET_T
F77_FUNC (zhegv, ZHEGV) (const octave_idx_type&,
F77_CONST_CHAR_ARG_DECL,
@@ -178,12 +178,12 @@
double *dummy = 0;
octave_idx_type idummy = 1;
- F77_XFCN (dgeev, DGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, tmp_data, n, pwr, pwi, dummy,
- idummy, pvr, n, &dummy_work, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dgeev, DGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, tmp_data, n, pwr, pwi, dummy,
+ idummy, pvr, n, &dummy_work, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -191,12 +191,12 @@
Array work (dim_vector (lwork, 1));
double *pwork = work.fortran_vec ();
- F77_XFCN (dgeev, DGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, tmp_data, n, pwr, pwi, dummy,
- idummy, pvr, n, pwork, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dgeev, DGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, tmp_data, n, pwr, pwi, dummy,
+ idummy, pvr, n, pwork, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -272,7 +272,7 @@
octave_idx_type lwork = -1;
double dummy_work;
- F77_XFCN (dsyev, DSYEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_VERBOSE_XFCN (dsyev, DSYEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
F77_CONST_CHAR_ARG2 ("U", 1),
n, tmp_data, n, pwr, &dummy_work, lwork, info
F77_CHAR_ARG_LEN (1)
@@ -284,11 +284,11 @@
Array work (dim_vector (lwork, 1));
double *pwork = work.fortran_vec ();
- F77_XFCN (dsyev, DSYEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, tmp_data, n, pwr, pwork, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dsyev, DSYEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, tmp_data, n, pwr, pwork, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -354,12 +354,12 @@
Complex *dummy = 0;
octave_idx_type idummy = 1;
- F77_XFCN (zgeev, ZGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, tmp_data, n, pw, dummy, idummy,
- pv, n, &dummy_work, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zgeev, ZGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, tmp_data, n, pw, dummy, idummy,
+ pv, n, &dummy_work, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -367,12 +367,12 @@
Array work (dim_vector (lwork, 1));
Complex *pwork = work.fortran_vec ();
- F77_XFCN (zgeev, ZGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, tmp_data, n, pw, dummy, idummy,
- pv, n, pwork, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zgeev, ZGEEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, tmp_data, n, pw, dummy, idummy,
+ pv, n, pwork, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -421,12 +421,12 @@
Array rwork (dim_vector (lrwork, 1));
double *prwork = rwork.fortran_vec ();
- F77_XFCN (zheev, ZHEEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, tmp_data, n, pwr, &dummy_work, lwork,
- prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zheev, ZHEEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, tmp_data, n, pwr, &dummy_work, lwork,
+ prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -434,11 +434,11 @@
Array work (dim_vector (lwork, 1));
Complex *pwork = work.fortran_vec ();
- F77_XFCN (zheev, ZHEEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, tmp_data, n, pwr, pwork, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zheev, ZHEEV, (F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, tmp_data, n, pwr, pwork, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -491,11 +491,11 @@
Matrix tmp = b;
double *tmp_data = tmp.fortran_vec ();
- F77_XFCN (dpotrf, DPOTRF, (F77_CONST_CHAR_ARG2 ("L", 1),
- n, tmp_data, n,
- info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dpotrf, DPOTRF, (F77_CONST_CHAR_ARG2 ("L", 1),
+ n, tmp_data, n,
+ info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (a.is_symmetric () && b.is_symmetric () && info == 0)
return symmetric_init (a, b, calc_ev);
@@ -525,14 +525,14 @@
double *dummy = 0;
octave_idx_type idummy = 1;
- F77_XFCN (dggev, DGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, atmp_data, n, btmp_data, n,
- par, pai, pbeta,
- dummy, idummy, pvr, n,
- &dummy_work, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dggev, DGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, atmp_data, n, btmp_data, n,
+ par, pai, pbeta,
+ dummy, idummy, pvr, n,
+ &dummy_work, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -540,14 +540,14 @@
Array work (dim_vector (lwork, 1));
double *pwork = work.fortran_vec ();
- F77_XFCN (dggev, DGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, atmp_data, n, btmp_data, n,
- par, pai, pbeta,
- dummy, idummy, pvr, n,
- pwork, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dggev, DGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, atmp_data, n, btmp_data, n,
+ par, pai, pbeta,
+ dummy, idummy, pvr, n,
+ pwork, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -635,13 +635,13 @@
octave_idx_type lwork = -1;
double dummy_work;
- F77_XFCN (dsygv, DSYGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, atmp_data, n,
- btmp_data, n,
- pwr, &dummy_work, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dsygv, DSYGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, atmp_data, n,
+ btmp_data, n,
+ pwr, &dummy_work, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -649,13 +649,13 @@
Array work (dim_vector (lwork, 1));
double *pwork = work.fortran_vec ();
- F77_XFCN (dsygv, DSYGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, atmp_data, n,
- btmp_data, n,
- pwr, pwork, lwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (dsygv, DSYGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, atmp_data, n,
+ btmp_data, n,
+ pwr, pwork, lwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -708,11 +708,11 @@
ComplexMatrix tmp = b;
Complex*tmp_data = tmp.fortran_vec ();
- F77_XFCN (zpotrf, ZPOTRF, (F77_CONST_CHAR_ARG2 ("L", 1),
- n, tmp_data, n,
- info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zpotrf, ZPOTRF, (F77_CONST_CHAR_ARG2 ("L", 1),
+ n, tmp_data, n,
+ info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (a.is_hermitian () && b.is_hermitian () && info == 0)
return hermitian_init (a, calc_ev);
@@ -743,13 +743,13 @@
Complex *dummy = 0;
octave_idx_type idummy = 1;
- F77_XFCN (zggev, ZGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, atmp_data, n, btmp_data, n,
- palpha, pbeta, dummy, idummy,
- pv, n, &dummy_work, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zggev, ZGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, atmp_data, n, btmp_data, n,
+ palpha, pbeta, dummy, idummy,
+ pv, n, &dummy_work, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -757,13 +757,13 @@
Array work (dim_vector (lwork, 1));
Complex *pwork = work.fortran_vec ();
- F77_XFCN (zggev, ZGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
- F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- n, atmp_data, n, btmp_data, n,
- palpha, pbeta, dummy, idummy,
- pv, n, pwork, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zggev, ZGGEV, (F77_CONST_CHAR_ARG2 ("N", 1),
+ F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ n, atmp_data, n, btmp_data, n,
+ palpha, pbeta, dummy, idummy,
+ pv, n, pwork, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info < 0)
{
@@ -826,14 +826,14 @@
Array rwork (dim_vector (lrwork, 1));
double *prwork = rwork.fortran_vec ();
- F77_XFCN (zhegv, ZHEGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, atmp_data, n,
- btmp_data, n,
- pwr, &dummy_work, lwork,
- prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
+ F77_VERBOSE_XFCN (zhegv, ZHEGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, atmp_data, n,
+ btmp_data, n,
+ pwr, &dummy_work, lwork,
+ prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
if (info == 0)
{
@@ -841,14 +841,14 @@
Array work (dim_vector (lwork, 1));
Complex *pwork = work.fortran_vec ();
- F77_XFCN (zhegv, ZHEGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
- F77_CONST_CHAR_ARG2 ("U", 1),
- n, atmp_data, n,
- btmp_data, n,
- pwr, pwork, lwork, prwork, info
- F77_CHAR_ARG_LEN (1)
- F77_CHAR_ARG_LEN (1)));
-
+ F77_VERBOSE_XFCN (zhegv, ZHEGV, (1, F77_CONST_CHAR_ARG2 (calc_ev ? "V" : "N", 1),
+ F77_CONST_CHAR_ARG2 ("U", 1),
+ n, atmp_data, n,
+ btmp_data, n,
+ pwr, pwork, lwork, prwork, info
+ F77_CHAR_ARG_LEN (1)
+ F77_CHAR_ARG_LEN (1)));
+
if (info < 0)
{
(*current_liboctave_error_handler) ("unrecoverable error in zhegv");