Commit 276c4948 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Added support for CORE-AVX2 and CORE-AVC-I optimized code when using INTEL compiler.

Added better control of the number of threads used in MKL library calls (when used).
Pushed version number to 2.18.3.
parent 79250284
......@@ -25,7 +25,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with AstrOmatic software.
dnl If not, see <http://www.gnu.org/licenses/>.
dnl
dnl Last modified: 05/07/2012
dnl Last modified: 19/07/2012
dnl
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dnl
......@@ -60,15 +60,15 @@ EOF
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2,AVX -no-prec-div -unroll"
prog_ld_optim_cv_flags=""
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
dnl INTEL C 32bits compiler
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX -no-prec-div -unroll"
prog_ld_optim_cv_flags=""
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
dnl GCC
elif test "$GCC" = "yes"; then
......@@ -129,13 +129,10 @@ EOF
rm -f conftest.*
fi
if test -n "$prog_cc_optim_cv_flags"; then
AM_CFLAGS="$AM_CFLAGS $prog_cc_optim_cv_flags"
AM_CFLAGS="$CFLAGS $prog_cc_optim_cv_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_cv_flags"
else
prog_cc_optim_cv_flags=""
fi
if test -n "$prog_ld_optim_cv_flags"; then
AM_LDFLAGS="$AM_LDFLAGS $prog_ld_optim_cv_flags"
else
prog_ld_optim_cv_flags=""
fi
])
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for sextractor 2.18.2.
# Generated by GNU Autoconf 2.68 for sextractor 2.18.3.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -570,8 +570,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.18.2'
PACKAGE_STRING='sextractor 2.18.2'
PACKAGE_VERSION='2.18.3'
PACKAGE_STRING='sextractor 2.18.3'
PACKAGE_BUGREPORT='bertin@iap.fr'
PACKAGE_URL=''
......@@ -1324,7 +1324,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sextractor 2.18.2 to adapt to many kinds of systems.
\`configure' configures sextractor 2.18.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1394,7 +1394,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.18.2:";;
short | recursive ) echo "Configuration of sextractor 2.18.3:";;
esac
cat <<\_ACEOF
......@@ -1524,7 +1524,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.18.2
sextractor configure 2.18.3
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -1947,7 +1947,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sextractor $as_me 2.18.2, which was
It was created by sextractor $as_me 2.18.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -2752,7 +2752,7 @@ fi
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.18.2'
VERSION='2.18.3'
cat >>confdefs.h <<_ACEOF
......@@ -3948,14 +3948,14 @@ EOF
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2,AVX -no-prec-div -unroll"
prog_ld_optim_cv_flags=""
prog_cc_optim_cv_flags="-O3 -axSSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX -no-prec-div -unroll"
prog_ld_optim_cv_flags=""
prog_cc_optim_cv_flags="-O3 -axSSE2,SSE3,SSE4.1,SSE4.2,AVX,CORE-AVX2,CORE-AVX-I -no-prec-div -unroll"
prog_ld_optim_cv_flags="-static-intel"
elif test "$GCC" = "yes"; then
prog_cc_optim_cv_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
......@@ -4008,13 +4008,10 @@ EOF
rm -f conftest.*
fi
if test -n "$prog_cc_optim_cv_flags"; then
AM_CFLAGS="$AM_CFLAGS $prog_cc_optim_cv_flags"
AM_CFLAGS="$CFLAGS $prog_cc_optim_cv_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_cv_flags"
else
prog_cc_optim_cv_flags=""
fi
if test -n "$prog_ld_optim_cv_flags"; then
AM_LDFLAGS="$AM_LDFLAGS $prog_ld_optim_cv_flags"
else
prog_ld_optim_cv_flags=""
fi
......@@ -15512,7 +15509,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sextractor $as_me 2.18.2, which was
This file was extended by sextractor $as_me 2.18.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -15578,7 +15575,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sextractor config.status 2.18.2
sextractor config.status 2.18.3
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
......
......@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
#
# Last modified: 17/07/2012
# Last modified: 19/07/2012
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.18.2, [bertin@iap.fr])
AC_INIT(sextractor, 2.18.3, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADERS(config.h)
......
.TH SEXTRACTOR "1" "July 2012" "SExtractor 2.18.2" "User Commands"
.TH SEXTRACTOR "1" "July 2012" "SExtractor 2.18.3" "User Commands"
.SH NAME
sex \- extract a source catalogue from an astronomical FITS image
.SH SYNOPSIS
......
......@@ -23,7 +23,7 @@
* along with AstrOmatic software.
* If not, see <http://www.gnu.org/licenses/>.
*
* Last modified: 03/06/2012
* Last modified: 18/07/2012
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
......@@ -705,16 +705,17 @@ PURPOSE Give the ``t_type'' of a binary-table field from its ``TFORM''.
INPUT TFORM string (see the FITS documentation).
OUTPUT size in bytes, or RETURN_ERROR if the TFORM is unknown.
NOTES -.
AUTHOR E. Bertin (IAP & Leiden observatory)
VERSION 28/10/2009
AUTHOR E. Bertin (IAP)
VERSION 18/07/2012
***/
t_type ttypeof(char *str)
{
char *str2;
long dummy;
str2 = str;
strtol(str, &str2, 10);
dummy = strtol(str, &str2, 10);
switch ((int)*str2)
{
case 'L': case 'B': case 'X': return T_BYTE;
......
......@@ -456,10 +456,6 @@ void preprefs()
"Performance will be degraded.");
#endif
#ifdef HAVE_MKL
mkl_set_num_threads(prefs.nthreads);
#endif
#else
if (prefs.nthreads != 1)
{
......@@ -469,6 +465,11 @@ void preprefs()
}
#endif
/* We temporarily allow threads for non-multithreaded code (defaulted to 1)*/
#ifdef HAVE_MKL
mkl_set_num_threads(prefs.nthreads);
#endif
/* Override INTEL CPU detection routine to help performance on 3rd-party CPUs */
#if defined(__INTEL_COMPILER) && defined (USE_CPUREDISPATCH)
__get_cpuid(1, &eax, &ebx, &ecx, &edx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment