Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CLAPACK


  • To: vsipl++@xxxxxxxxxxxxxxxx
  • Subject: CLAPACK
  • From: Assem Salama <assem@xxxxxxxxxxxxxxxx>
  • Date: Tue, 21 Mar 2006 19:13:27 -0500

Everyone,
I have changed modules file to now only load SRC dir of clapack. I have also added an option to configure to allow a user to specify CFLAGS for building clapack. The option is --with-clapack-cflags. It seams like the option -funroll-all-loops works well with clapack so this is something the user might want to specify. If this option is not used, the default CFLAGS is used.

Thanks,
Assem Salama
Index: configure.ac
===================================================================
RCS file: /home/cvs/Repository/vpp/configure.ac,v
retrieving revision 1.88
diff -u -r1.88 configure.ac
--- configure.ac	21 Mar 2006 15:52:23 -0000	1.88
+++ configure.ac	22 Mar 2006 00:05:39 -0000
@@ -170,6 +170,21 @@
 
 
 # LAPACK and related libraries (Intel MKL)
+
+# this option allows the user to OVERRIDE the default CFLAGS for CLAPACK
+# it seams that when -funroll-all-loops is specified, it runs a little better
+# it is up to the user to try specifying his own set of CFLAGS. If this option
+# is not used, CLAPACK_CLFAGS defaults to CFLAGS. .in files will find this
+# value in CLAPACK_CFLAGS
+AC_ARG_WITH(clapack-cflags,
+  AS_HELP_STRING([--with-clapack-cflags=CLAPACK_CFLAGS],
+                 [Specify CFLAGS to use when building builtin clapack.
+		  Only used if --with-lapack=builtin.]),
+            CLAPACK_CFLAGS=$withval,
+            CLAPACK_CFLAGS=no)
+# let's not forget AC_SUBST!
+AC_SUBST(CLAPACK_CFLAGS)
+
 AC_ARG_WITH([lapack],
   AS_HELP_STRING([--with-lapack\[=PKG\]],
                  [enable use of LAPACK if found
@@ -317,6 +332,11 @@
 AC_SUBST(CXXDEP)
 AC_LANG(C++)
 
+# assign cflags to CLAPACK_CFLAGS if the user didn't use --with-clapack-cflags
+if test "$CLAPACK_CFLAGS" == "no"; then
+  CLAPACK_CFLAGS=$CFLAGS
+fi
+
 AC_MSG_CHECKING([for FORTRAN float return type])
 if test "$host_cpu" == "x86_64"; then
   AC_DEFINE_UNQUOTED(VSIP_IMPL_FORTRAN_FLOAT_RETURN, double,
Index: vendor/clapack/SRC/make.inc.in
===================================================================
RCS file: /home/cvs/Repository/clapack/SRC/make.inc.in,v
retrieving revision 1.1
diff -u -r1.1 make.inc.in
--- vendor/clapack/SRC/make.inc.in	21 Mar 2006 21:38:49 -0000	1.1
+++ vendor/clapack/SRC/make.inc.in	22 Mar 2006 00:05:40 -0000
@@ -19,9 +19,12 @@
 #  selected.  Define LOADER and LOADOPTS to refer to the loader and
 #  desired load options for your machine.
 #
-# configure will now substitute correct values for these variables
+# configure will now substitute correct values for these variables.
+# we added a variable called CLAPACK_CFLAGS that will allow someone to 
+# specify special flags that could make CLAPACK run faster. It seams
+# like -funroll-all-loops works very well.
 CC        = @CC@
-CFLAGS    = @CFLAGS@
+CFLAGS    = @CLAPACK_CFLAGS@
 LOADER    = $(CC)
 LOADOPTS  = $(CFLAGS)
 NOOPT     =