Skip to content

Commit

Permalink
Fix integration test [integration]
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 committed Oct 15, 2024
1 parent f962cc4 commit 54efacc
Show file tree
Hide file tree
Showing 28 changed files with 342 additions and 274 deletions.
115 changes: 79 additions & 36 deletions integration_tests/recipes/libf2c/extras/make.inc
Original file line number Diff line number Diff line change
@@ -1,37 +1,80 @@
# -*- Makefile -*-
#################################################################### # LAPACK
make include file. # # LAPACK, Version 3.2.1 # # June 2009 #
#################################################################### # # See the
INSTALL/ directory for more examples. # SHELL = /usr/bin/env sh # # The machine
(platform) identifier to append to the library names # # WA for WebAssembly PLAT
= _WA # # Modify the FORTRAN and OPTS definitions to refer to the # compiler and
desired compiler options for your machine. NOOPT # refers to the compiler
options desired when NO OPTIMIZATION is # selected. Define LOADER and LOADOPTS
to refer to the loader # and desired load options for your machine. #
####################################################### # This is used to
compile C library #CC = gcc # inherit $CC from emmake # if no wrapping of the
blas library is needed, uncomment next line #CC = gcc -DNO_BLAS_WRAP CFLAGS =
-O3 -I$(TOPDIR)/INCLUDE -fPIC -DNO_BLAS_WRAP LDFLAGS = -O3 LOADER = $(CC)
LOADOPTS = NOOPT = -O0 -I$(TOPDIR)/INCLUDE -fPIC DRVCFLAGS = $(CFLAGS) F2CCFLAGS
= $(CFLAGS)
####################################################################### # #
Timer for the SECOND and DSECND routines # # Default : SECOND and DSECND will
use a call to the EXTERNAL FUNCTION ETIME # TIMER = EXT_ETIME # For RS6K :
SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ # TIMER =
EXT_ETIME_ # For gfortran compiler: SECOND and DSECND will use a call to the
INTERNAL FUNCTION ETIME # TIMER = INT_ETIME # If your Fortran compiler does not
provide etime (like Nag Fortran Compiler, etc...) # SECOND and DSECND will use a
call to the Fortran standard INTERNAL FUNCTION CPU_TIME TIMER = INT_CPU_TIME #
If neither of this works...you can use the NONE value... In that case, SECOND
and DSECND will always return 0 # TIMER = NONE # # The archiver and the flag(s)
to use when building archive (library) # If you system has no ranlib, set RANLIB
= echo. # ARCH = $(AR) ARCHFLAGS= cr #RANLIB = ranlib # # The location of BLAS
library for linking the testing programs. # The target's machine-specific,
optimized BLAS library should be # used whenever possible. # BLASLIB =
../../blas$(PLAT).a # # Location of the extended-precision BLAS (XBLAS) Fortran
library # used for building and testing extended-precision routines. The #
relevant routines will be compiled and XBLAS will be linked only if # USEXBLAS
is defined. # # USEXBLAS = Yes XBLASLIB = # XBLASLIB = -lxblas # # Names of
generated libraries. # LAPACKLIB = lapack$(PLAT).a F2CLIB =
../../F2CLIBS/libf2c.a TMGLIB = tmglib$(PLAT).a EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a
####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.2.1 #
# June 2009 #
####################################################################
#
# See the INSTALL/ directory for more examples.
#
SHELL = /usr/bin/env sh
#
# The machine (platform) identifier to append to the library names
#
# WA for WebAssembly
PLAT = _WA
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader
# and desired load options for your machine.
#
#######################################################
# This is used to compile C library
#CC = gcc # inherit $CC from emmake
# if no wrapping of the blas library is needed, uncomment next line
#CC = gcc -DNO_BLAS_WRAP
CFLAGS = -O3 -I$(TOPDIR)/INCLUDE -fPIC -DNO_BLAS_WRAP
LDFLAGS = -O3
LOADER = $(CC)
LOADOPTS =
NOOPT = -O0 -I$(TOPDIR)/INCLUDE -fPIC
DRVCFLAGS = $(CFLAGS)
F2CCFLAGS = $(CFLAGS)
#######################################################################

#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
# TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
# TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = $(AR)
ARCHFLAGS= cr
#RANLIB = ranlib
#
# The location of BLAS library for linking the testing programs.
# The target's machine-specific, optimized BLAS library should be
# used whenever possible.
#
BLASLIB = ../../blas$(PLAT).a
#
# Location of the extended-precision BLAS (XBLAS) Fortran library
# used for building and testing extended-precision routines. The
# relevant routines will be compiled and XBLAS will be linked only if
# USEXBLAS is defined.
#
# USEXBLAS = Yes
XBLASLIB =
# XBLASLIB = -lxblas
#
# Names of generated libraries.
#
LAPACKLIB = lapack$(PLAT).a
F2CLIB = ../../F2CLIBS/libf2c.a
TMGLIB = tmglib$(PLAT).a
EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ index 0a3ed0d..a473ed8 100644
- rm -f a.out arithchk.o
+ node a.out.js >arith.h
+ rm -f a.out.js a.out.wasm

check:
xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
--
--
2.25.1

Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ index a473ed8..e51d826 100644
## Under Solaris (and other systems that do not understand ld -x),
## omit -x in the ld line above.
## If your system does not have the ld command, comment out
--
--
2.25.1

Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ index 5f1eb22..32e669b 100644
@@ -48,9 +48,9 @@ include ../make.inc
#
#######################################################################

-ALLAUX = maxloc.o ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \
+ALLAUX = maxloc.o ilaenv.o ieeeck.o lsamen.o iparmq.o \
ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \
- ../INSTALL/ilaver.o ../INSTALL/lsame.o
+ ../INSTALL/ilaver.o

ALLXAUX =

--
--
2.25.1

Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ index 8d92a63..54c4ff1 100644
@@ -28,11 +28,11 @@ extern
extern "C" {
#endif

- VOID
+
+
#ifdef KR_headers
-s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll;
+int s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll;
Expand All @@ -66,7 +66,7 @@ index 9dacfc7..8d8963f 100644
+++ b/F2CLIBS/libf2c/s_copy.c
@@ -12,9 +12,9 @@ extern "C" {
/* assign strings: a = b */

#ifdef KR_headers
-VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
+int s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
Expand All @@ -76,5 +76,6 @@ index 9dacfc7..8d8963f 100644
#endif
{
register char *aend, *bend;
--
--
2.25.1

Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ index 57eff0d..136050f 100644
REAL = r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\
r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\
r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\
--
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ Index: CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile
+++ CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile
@@ -70,8 +70,8 @@ OFILES = $(MISC) $(POW) $(CX) $(DCX) $(R
all: f2c.h signal1.h sysdep1.h libf2c.a clapack_install

libf2c.a: $(OFILES)
- ar r libf2c.a $?
- -ranlib libf2c.a
+ $(ARCH) r libf2c.a $?
+ $(RANLIB) libf2c.a

## Shared-library variant: the following rule works on Linux
## systems. Details are system-dependent. Under Linux, -fPIC
@@ -80,7 +80,7 @@ libf2c.a: $(OFILES)
## of "cc -shared".

libf2c.so: $(OFILES)
- cc -shared -o libf2c.so $(OFILES)
+ $(CC) -shared -o libf2c.so $(OFILES)

### If your system lacks ranlib, you don't need it; see README.

@@ -117,7 +117,7 @@ sysdep1.h: sysdep1.h0

install: libf2c.a
cp libf2c.a $(LIBDIR)
- -ranlib $(LIBDIR)/libf2c.a
+ $(RANLIB) $(LIBDIR)/libf2c.a

clapack_install: libf2c.a
mv libf2c.a ..
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ index 5f787a9c..6890046a 100644
# Flags for POWER8 are defined in Makefile.power. Don't modify COMMON_OPT
-# COMMON_OPT = -O2
+COMMON_OPT = -O2 -Wno-return-type

# gfortran option for LAPACK to improve thread-safety
# It is enabled by default in Makefile.system for gfortran
--
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ index fe7d6d898..74d3ca96a 100644
--- a/lapack-netlib/SRC/xerbla_array.c
+++ b/lapack-netlib/SRC/xerbla_array.c
@@ -600,7 +600,7 @@ array.f"> */

/* ===================================================================== */
/* Subroutine */ void xerbla_array_(char *srname_array__, integer *
- srname_len__, integer *info, integer srname_array_len)
+ srname_len__, integer *info)
{
/* System generated locals */
integer i__1, i__2, i__3;
--
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ index 0d20ba1ca..d4325f71f 100644
double *work, CBLAS_INT *lwork, CBLAS_INT *iwork, CBLAS_INT *liwork,
- CBLAS_INT *info, size_t jobz_len, size_t range_len);
+ CBLAS_INT *info);

static void c_dstevr(char *jobz, char *range, CBLAS_INT *n, double *d, double *e,
double *vl, double *vu, CBLAS_INT *il, CBLAS_INT *iu, double *abstol,
CBLAS_INT *m, double *w, double *z, CBLAS_INT *ldz, CBLAS_INT *isuppz,
Expand All @@ -27,5 +27,6 @@ index 0d20ba1ca..d4325f71f 100644
- 1, 1);
+ w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
}
--
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ index 7e180e4f8..b940bb702 100644
1 i, lun, lunit, mesflg, ncpw, nch, nwds
double precision r1, r2
dimension msg(nmes)
--
--
2.34.1

19 changes: 10 additions & 9 deletions integration_tests/recipes/scipy/patches/0003-gemm_-no-const.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ index dfc0516ac..92d7d7d6b 100644
--- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h
+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_cdefs.h
@@ -262,9 +262,9 @@ extern void ccheck_tempv(int, singlecomplex *);

/*! \brief BLAS */

-extern int cgemm_(const char*, const char*, const int*, const int*, const int*,
- const singlecomplex*, const singlecomplex*, const int*, const singlecomplex*,
- const int*, const singlecomplex*, singlecomplex*, const int*);
Expand All @@ -35,9 +35,9 @@ index 3b5aa509f..1305641bd 100644
--- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h
+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_ddefs.h
@@ -260,9 +260,9 @@ extern void dcheck_tempv(int, double *);

/*! \brief BLAS */

-extern int dgemm_(const char*, const char*, const int*, const int*, const int*,
- const double*, const double*, const int*, const double*,
- const int*, const double*, double*, const int*);
Expand All @@ -52,9 +52,9 @@ index 9bb6a38e7..b013962a4 100644
--- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h
+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_sdefs.h
@@ -259,9 +259,9 @@ extern void scheck_tempv(int, float *);

/*! \brief BLAS */

-extern int sgemm_(const char*, const char*, const int*, const int*, const int*,
- const float*, const float*, const int*, const float*,
- const int*, const float*, float*, const int*);
Expand All @@ -69,9 +69,9 @@ index c6418d584..c5a2692be 100644
--- a/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h
+++ b/scipy/sparse/linalg/_dsolve/SuperLU/SRC/slu_zdefs.h
@@ -262,9 +262,9 @@ extern void zcheck_tempv(int, doublecomplex *);

/*! \brief BLAS */

-extern int zgemm_(const char*, const char*, const int*, const int*, const int*,
- const doublecomplex*, const doublecomplex*, const int*, const doublecomplex*,
- const int*, const doublecomplex*, doublecomplex*, const int*);
Expand All @@ -81,5 +81,6 @@ index c6418d584..c5a2692be 100644
extern int ztrsv_(char*, char*, char*, int*, doublecomplex*, int*,
doublecomplex*, int*);
extern int ztrsm_(char*, char*, char*, char*, int*, int*,
--
--
2.34.1

Loading

0 comments on commit 54efacc

Please sign in to comment.