[Scipy-svn] r3601 - in branches/scipy.scons/scipy: lib/lapack linalg linsolve linsolve/umfpack odr optimize

scipy-svn@scip... scipy-svn@scip...
Mon Nov 26 03:19:09 CST 2007


Author: cdavid
Date: 2007-11-26 03:18:24 -0600 (Mon, 26 Nov 2007)
New Revision: 3601

Modified:
   branches/scipy.scons/scipy/lib/lapack/SConstruct
   branches/scipy.scons/scipy/linalg/SConstruct
   branches/scipy.scons/scipy/linsolve/SConstruct
   branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py
   branches/scipy.scons/scipy/odr/SConstruct
   branches/scipy.scons/scipy/optimize/SConstruct
Log:
Fix remaining C/F linking problems for scons build; gcc + ifort now pass all tests

Modified: branches/scipy.scons/scipy/lib/lapack/SConstruct
===================================================================
--- branches/scipy.scons/scipy/lib/lapack/SConstruct	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/lib/lapack/SConstruct	2007-11-26 09:18:24 UTC (rev 3601)
@@ -1,4 +1,4 @@
-# Last Change: Sat Nov 24 08:00 PM 2007 J
+# Last Change: Mon Nov 26 05:00 PM 2007 J
 # vim:syntax=python
 
 import os
@@ -9,7 +9,8 @@
 from numpy.distutils.scons import GetNumpyEnvironment
 from numpy.distutils.scons import CheckF77LAPACK,\
                                   CheckCLAPACK, \
-                                  IsATLAS, GetATLASVersion
+                                  IsATLAS, GetATLASVersion, \
+                                  CheckF77Clib
 
 from scons_support import do_generate_fake_interface, \
                           generate_interface_emitter
@@ -27,11 +28,16 @@
 # Starting Configuration
 #=======================
 config = env.NumpyConfigure(custom_tests = {'CheckCLAPACK' : CheckCLAPACK,
-                                            'CheckLAPACK' : CheckF77LAPACK})
+                                            'CheckLAPACK' : CheckF77LAPACK,
+                                            'CheckF77Clib' : CheckF77Clib})
 
 #--------------
 # Checking Blas
 #--------------
+if not config.CheckF77Clib():
+    raise RuntimeError("Could not check F/C runtime library for %s/%s, " \
+                       "contact the maintainer" % (env['CC'], env['F77']))
+
 st = config.CheckLAPACK(check_version = 1)
 if not st:
     raise RuntimeError("no lapack found, necessary for lapack module")
@@ -79,7 +85,8 @@
 #----------------
 calc_src = env.F2py(pjoin(env['build_dir'], 'calc_lworkmodule.c'), 
                     source = pjoin(env['build_dir'], 'calc_lwork.f'))
-env.NumpyPythonExtension('calc_lwork', source = calc_src + ['calc_lwork.f'])
+env.NumpyPythonExtension('calc_lwork', source = calc_src + ['calc_lwork.f'],
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 #--------------
 # Atlas version

Modified: branches/scipy.scons/scipy/linalg/SConstruct
===================================================================
--- branches/scipy.scons/scipy/linalg/SConstruct	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/linalg/SConstruct	2007-11-26 09:18:24 UTC (rev 3601)
@@ -1,4 +1,4 @@
-# Last Change: Sat Nov 24 12:00 PM 2007 J
+# Last Change: Mon Nov 26 05:00 PM 2007 J
 # vim:syntax=python
 
 import os
@@ -9,7 +9,7 @@
 from numpy.distutils.scons import GetNumpyEnvironment
 from numpy.distutils.scons import CheckCBLAS, CheckF77BLAS, CheckF77LAPACK,\
                                   CheckCLAPACK, IsVeclib, IsAccelerate, \
-                                  IsATLAS, GetATLASVersion
+                                  IsATLAS, GetATLASVersion, CheckF77Clib
 
 from scons_support import do_generate_interface, do_generate_fake_interface, \
                           generate_interface_emitter
@@ -32,11 +32,16 @@
 config = env.NumpyConfigure(custom_tests = {'CheckCBLAS' : CheckCBLAS,
                                             'CheckBLAS' : CheckF77BLAS,
                                             'CheckCLAPACK' : CheckCLAPACK,
-                                            'CheckLAPACK' : CheckF77LAPACK})
+                                            'CheckLAPACK' : CheckF77LAPACK,
+                                            'CheckF77Clib' : CheckF77Clib})
 
 #--------------
 # Checking Blas
 #--------------
+if not config.CheckF77Clib():
+    raise RuntimeError("Could not check F/C runtime library for %s/%s, " \
+                       "contact the maintainer" % (env['CC'], env['F77']))
+
 st = config.CheckBLAS(check_version = 1)
 if not st:
     raise RuntimeError("no blas found, necessary for linalg module")
@@ -131,7 +136,8 @@
 calc_src = env.F2py(pjoin(env['build_dir'], 'src', 'calc_lworkmodule.c'), 
                     source = pjoin(env['build_dir'], 'src', 'calc_lwork.f'))
 env.NumpyPythonExtension('calc_lwork', 
-                         source = calc_src + [pjoin('src', 'calc_lwork.f')])
+                         source = calc_src + [pjoin('src', 'calc_lwork.f')],
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 #--------------------
 # iterative methods

Modified: branches/scipy.scons/scipy/linsolve/SConstruct
===================================================================
--- branches/scipy.scons/scipy/linsolve/SConstruct	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/linsolve/SConstruct	2007-11-26 09:18:24 UTC (rev 3601)
@@ -1,4 +1,4 @@
-# Last Change: Sat Nov 24 05:00 PM 2007 J
+# Last Change: Mon Nov 26 04:00 PM 2007 J
 # vim:syntax=python
 from os.path import join as pjoin
 
@@ -12,14 +12,22 @@
 
 env = GetNumpyEnvironment(ARGUMENTS)
 
-env.AppendUnique(CPPPATH = get_numpy_include_dirs())
-env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
+# Configuration
+config = env.NumpyConfigure(custom_tests = {'CheckF77LAPACK' : CheckF77LAPACK})
+if not config.CheckF77LAPACK():
+    warnings.warn("Could not find F77 LAPACK")
+config.Finish()
 
 if sys.platform=='win32':
     superlu_defs = [('NO_TIMER',1)]
 else:
     superlu_defs = []
+superlu_defs.append(('USE_VENDOR_BLAS', 1))
 
+env.AppendUnique(CPPDEFINES = superlu_defs)
+env.AppendUnique(CPPPATH = get_numpy_include_dirs())
+env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
+
 # Build superlu 
 src = env.NumpyGlob(pjoin('SuperLU', 'SRC', '*.c'))
 superlu = env.NumpyStaticExtLibrary('superlu_src', source = src, 

Modified: branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py
===================================================================
--- branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py	2007-11-26 09:18:24 UTC (rev 3601)
@@ -9,6 +9,7 @@
     config = Configuration( 'umfpack', parent_package, top_path )
     config.add_data_dir('tests')
 
+    # XXX: Implement umfpack tester
 #    umf_info = get_info( 'umfpack', notfound_action = 1 )
 #
 #    umfpack_i_file = config.paths('umfpack.i')[0]

Modified: branches/scipy.scons/scipy/odr/SConstruct
===================================================================
--- branches/scipy.scons/scipy/odr/SConstruct	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/odr/SConstruct	2007-11-26 09:18:24 UTC (rev 3601)
@@ -1,4 +1,4 @@
-# Last Change: Sat Nov 24 06:00 PM 2007 J
+# Last Change: Mon Nov 26 06:00 PM 2007 J
 # vim:syntax=python
 
 import os
@@ -7,7 +7,7 @@
 from numpy.distutils.misc_util import get_numpy_include_dirs
 from numpy.distutils.scons import get_python_inc#, get_pythonlib_dir
 from numpy.distutils.scons import GetNumpyEnvironment
-from numpy.distutils.scons import CheckF77BLAS
+from numpy.distutils.scons import CheckF77BLAS, CheckF77Clib
 
 from numpy.distutils.scons.configuration import write_info
 
@@ -22,8 +22,13 @@
 #=======================
 # Starting Configuration
 #=======================
-config = env.NumpyConfigure(custom_tests = {'CheckBLAS' : CheckF77BLAS})
+config = env.NumpyConfigure(custom_tests = {'CheckBLAS' : CheckF77BLAS, 
+                                            'CheckF77Clib' : CheckF77Clib})
 
+if not config.CheckF77Clib():
+    raise RuntimeError("Could not check F/C runtime library for %s/%s, " \
+                       "contact the maintainer" % (env['CC'], env['F77']))
+
 #--------------
 # Checking Blas
 #--------------
@@ -47,9 +52,10 @@
 else:
     libodr_src.append(pjoin('odrpack', 'd_lpkbls.f'))
 
-env.NumpyStaticExtLibrary('odr', source = libodr_src)
-env.AppendUnique(LIBS = 'odr')
+env.NumpyStaticExtLibrary('odrpack', source = libodr_src)
+env.AppendUnique(LIBS = 'odrpack')
 env.AppendUnique(LIBPATH = env['build_dir'])
 
 # odr pyextension
-env.NumpyPythonExtension('__odrpack', '__odrpack.c')
+env.NumpyPythonExtension('__odrpack', '__odrpack.c',
+                         LINKFLAGSEND = env['F77_LDFLAGS'])

Modified: branches/scipy.scons/scipy/optimize/SConstruct
===================================================================
--- branches/scipy.scons/scipy/optimize/SConstruct	2007-11-26 08:33:53 UTC (rev 3600)
+++ branches/scipy.scons/scipy/optimize/SConstruct	2007-11-26 09:18:24 UTC (rev 3601)
@@ -1,4 +1,4 @@
-# Last Change: Mon Nov 26 03:00 PM 2007 J
+# Last Change: Mon Nov 26 05:00 PM 2007 J
 # vim:syntax=python
 
 import os
@@ -8,7 +8,7 @@
 from numpy.distutils.misc_util import get_numpy_include_dirs
 from numpy.distutils.scons import get_python_inc#, get_pythonlib_dir
 from numpy.distutils.scons import GetNumpyEnvironment
-from numpy.distutils.scons import CheckF77LAPACK
+from numpy.distutils.scons import CheckF77LAPACK, CheckF77Clib
 
 from numpy.distutils.scons.configuration import write_info
 
@@ -24,11 +24,16 @@
 #=======================
 # Starting Configuration
 #=======================
-config = env.NumpyConfigure(custom_tests = {'CheckLAPACK' : CheckF77LAPACK})
+config = env.NumpyConfigure(custom_tests = {'CheckLAPACK' : CheckF77LAPACK,
+                                            'CheckF77Clib' : CheckF77Clib})
 
 #-----------------
 # Checking Lapack
 #-----------------
+if not config.CheckF77Clib():
+    raise RuntimeLibrary("Could not check C/F runtime library for %s/%s"\
+                         " , contact the maintainer" % (env['CC'], env['F77']))
+
 st = config.CheckLAPACK()
 if not st:
     has_lapack = 0
@@ -54,7 +59,8 @@
 env.AppendUnique(LIBPATH = env['build_dir'])
 
 # _minpack pyextension
-env.NumpyPythonExtension('_minpack', '_minpackmodule.c')
+env.NumpyPythonExtension('_minpack', '_minpackmodule.c',
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 # _zeros pyextension
 env.NumpyPythonExtension('_zeros', 'zeros.c')
@@ -63,19 +69,22 @@
 src = pjoin('lbfgsb', 'routines.f')
 lbfgsb_src = env.F2py(pjoin(env['build_dir'], '_lbfgsbmodule.c'), 
                       pjoin(env['build_dir'], 'lbfgsb', 'lbfgsb.pyf'))
-env.NumpyPythonExtension('_lbfgsb', source = [src] + lbfgsb_src)
+env.NumpyPythonExtension('_lbfgsb', source = [src] + lbfgsb_src,
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 # _cobyla pyextension
 src = [pjoin('cobyla', i) for i in ['cobyla2.f', 'trstlp.f']]
 wrap_src = env.F2py(pjoin(env['build_dir'], 'cobyla', '_cobylamodule.c'), 
                     pjoin(env['build_dir'], 'cobyla', 'cobyla.pyf'))
-env.NumpyPythonExtension('_cobyla', source = src + wrap_src)
+env.NumpyPythonExtension('_cobyla', source = src + wrap_src,
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 # _minpack2 pyextension
 src = [pjoin('minpack2', i) for i in ['dcsrch.f', 'dcstep.f']]
 wrap_src = env.F2py(pjoin(env['build_dir'], 'minpack2', 'minpack2module.c'), 
                     pjoin(env['build_dir'], 'minpack2', 'minpack2.pyf'))
-env.NumpyPythonExtension('minpack2', source = src + wrap_src)
+env.NumpyPythonExtension('minpack2', source = src + wrap_src,
+                         LINKFLAGSEND = env['F77_LDFLAGS'])
 
 # moduleTNC pyextension
 env.NumpyPythonExtension('moduleTNC', 



More information about the Scipy-svn mailing list