-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optional direct upstream LAPACK for --enable-lapack (#89)
Details: * add capability to directly use upstream Fortran LAPACK for --enable-lapack * move f2c source to a new directory and add directory for Fortran * add a configure option to fallback to f2c source if wanted * for the upstream LAPACK version, add upstream tarball * if configure option is provided, untar and setup tarball at configure stage * compile upstream LAPACK with Fortran compiler and link into the libflame libraries * add documentation Co-authored-by: ItsPitt <[email protected]> Co-authored-by: Michael Pittard <[email protected]>
- Loading branch information
1 parent
ec2707e
commit 74b56a2
Showing
2,005 changed files
with
505 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
AC_DEFUN([FLA_CHECK_ENABLE_LEGACY_LAPACK], | ||
[ | ||
dnl Tell the user we're checking whether to enable the option. | ||
AC_MSG_CHECKING([whether user requested the to use legacy lapack with lapack2flame or lapack2flash]) | ||
dnl Determine whether the user gave the --enable-<option> or | ||
dnl --disable-<option>. If so, then run the first snippet of code; | ||
dnl otherwise, run the second code block. | ||
AC_ARG_ENABLE([legacy_lapack], | ||
AS_HELP_STRING([--enable-legacy-lapack],[Compile and build into libflame the legacy f2c files of LAPACK (Version 3.5.0). If this option is not selected, the latest integrated version of LAPACK using the fortran files will be built. This option only works if the --enable-lapack2flash or --enable-lapack2flame are given. Otherwise no LAPACK will be built. (Disabled by default.)]), | ||
[ | ||
dnl If any form of the option is given, handle each case. | ||
if test "$enableval" = "no" ; then | ||
dnl User provided --enable-<option>=no or --disable-<option>. | ||
fla_enable_legacy_lapack=no | ||
elif test "$enableval" = "yes" ; then | ||
dnl User provided --enable-<option>=yes or --enable-<option>. | ||
fla_enable_legacy_lapack=yes | ||
else | ||
dnl We don't need an else branch because the configure script | ||
dnl should detect whether the user provided an unexpected argument | ||
dnl with the option. | ||
AC_MSG_ERROR([[Reached unreachable branch in FLA_CHECK_ENABLE_LEGACY_LAPACK!]]) | ||
fi | ||
], | ||
[ | ||
dnl User did not specify whether to enable or disable the option. | ||
dnl Default behavior is to disable the option. | ||
fla_enable_legacy_lapack=no | ||
] | ||
) | ||
dnl Now act according to whether the option was requested. | ||
if test "$fla_enable_legacy_lapack" = "yes" ; then | ||
dnl Output the result. | ||
AC_MSG_RESULT([yes]) | ||
dnl Define the macro. | ||
AC_DEFINE(FLA_ENABLE_LEGACY_LAPACK,1, | ||
[Determines whether to use the legacy f2c files or the newer fortran version of lapack with lapack2flame or lapack2flash.]) | ||
elif test "$fla_enable_legacy_lapack" = "no" ; then | ||
dnl Output the result. | ||
AC_MSG_RESULT([no]) | ||
else | ||
dnl Only "yes" and "no" are accepted, so this block is empty. | ||
AC_MSG_ERROR([[Reached unreachable branch in FLA_CHECK_ENABLE_LEGACY_LAPACK!]]) | ||
fi | ||
dnl Substitute the output variable. | ||
AC_SUBST(fla_enable_legacy_lapack) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
AC_DEFUN([FLA_REQUIRE_REFERENCE_LAPACK], | ||
[ | ||
AC_REQUIRE([FLA_CHECK_ENABLE_LAPACK2FLAME]) | ||
AC_REQUIRE([FLA_CHECK_ENABLE_LAPACK2FLASH]) | ||
AC_REQUIRE([FLA_CHECK_ENABLE_LEGACY_LAPACK]) | ||
AC_MSG_CHECKING([whether the files from the reference lapack tar are needed]) | ||
script_name=${0##*/} | ||
path=${0%/${script_name}} | ||
dnl Unpack tar for reference lapack if needed. | ||
dnl if not, clear it out | ||
if test "$fla_enable_lapack2flame" = "yes" || test "$fla_enable_lapack2flash" = "yes" ; then | ||
if test "$fla_enable_legacy_lapack" = "yes" ; then | ||
dnl run script clean | ||
echo " Using legacy f2c lapack files, clearing out any fortran files" | ||
${path}/src/map/common/lapacksrc/scripts/regen-files.sh cleanup | ||
else | ||
dnl run script build | ||
echo " Using lapack fortran files, unpacking tar" | ||
${path}/src/map/common/lapacksrc/scripts/regen-files.sh build | ||
fi | ||
else | ||
dnl run script clean | ||
echo " Not using reference lapack, clearing out any fortran files" | ||
${path}/src/map/common/lapacksrc/scripts/regen-files.sh cleanup | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ openflame:c | |
lapack2flamec:c | ||
lapack2flash:c | ||
f2c:c | ||
lapackcheck:c | ||
fortran:f | ||
install:c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.