Commit 1f9d5200 authored by John Douglas Veitch's avatar John Douglas Veitch

Merge branch 'master' into dist_marg_bayestar

parents 52c18d13 5148b049
FROM ligo/lalsuite-runtime:stretch
COPY /opt/lalsuite /opt/lalsuite
ENV LD_LIBRARY_PATH="/opt/lalsuite/lib" \
OCTAVE_PATH="/opt/lalsuite/lib/x86_64-linux-gnu/octave/3.8.2/site/oct/x86_64-pc-linux-gnu" \
PATH="/opt/lalsuite/bin:${PATH}" \
PKG_CONFIG_PATH="/opt/lalsuite/lib/pkgconfig" \
PYTHONPATH="/opt/lalsuite/lib/python2.7/site-packages"
# fix prefix in pkg-config files
RUN find /opt/lalsuite/lib/pkgconfig -type f -name 'lal*.pc' -exec sed -i 's|^prefix=.*|prefix=/opt/lalsuite|g' {} \;
# fix install path in python scripts
RUN find /opt/lalsuite/bin -type f -exec grep -Iq . {} \; -exec sed -i 's|/builds/.*/lalsuite/opt/lalsuite|/opt/lalsuite|g' {} \;
RUN rm -f /opt/lalsuite/lib/*.la
COPY /docker/startup /usr/local/bin/startup
ENTRYPOINT [ "/usr/local/bin/startup" ]
CMD ["/bin/bash", "-i" ]
lal/test/tools/resamp_10x4.eps filter=lfs diff=lfs merge=lfs -text
lalapps/src/string/S5-L1-cat2.txt filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-19-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-19-DE414.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth98.dat filter=lfs diff=lfs merge=lfs -text
lalsimulation/src/lalsimburst_btlwnbexamples.svg filter=lfs diff=lfs merge=lfs -text
lalapps/src/inspiral/MachoMasses.dat filter=lfs diff=lfs merge=lfs -text
......@@ -17,12 +15,10 @@ lalsimulation/src/lalsimburst_sinegaussianexamples.svg filter=lfs diff=lfs merge
lalapps/src/calibration/S4H1Filters.txt filter=lfs diff=lfs merge=lfs -text
lalapps/src/pulsar/HeterodyneSearch/H-CW_Injection-875206560-120.gwf filter=lfs diff=lfs merge=lfs -text
lalframe/test/H-CAL_FAC_V03-729273600-5094000.gwf filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-19-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalapps/src/calibration/S5H1_NoiseCompTimes.txt filter=lfs diff=lfs merge=lfs -text
lalapps/src/calibration/S5L1_NoiseCompTimes.txt filter=lfs diff=lfs merge=lfs -text
lalapps/src/string/S6-L1-cat2.txt filter=lfs diff=lfs merge=lfs -text
lalframe/test/F-TEST-600000060-60.gwf filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-19-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalapps/src/string/S6-H1-cat2.txt filter=lfs diff=lfs merge=lfs -text
lalframe/test/L-CAL_REF_V03-731488397-64.gwf filter=lfs diff=lfs merge=lfs -text
lalsimulation/test/reviewed_waveforms.asc filter=lfs diff=lfs merge=lfs -text
......@@ -35,22 +31,26 @@ lalapps/src/findchirp/L1response_psd.dat filter=lfs diff=lfs merge=lfs -text
lalapps/src/string/S5-H2-cat2.txt filter=lfs diff=lfs merge=lfs -text
lalapps/src/string/S5-L1segments-cat1.txt filter=lfs diff=lfs merge=lfs -text
lalinference/test/data/2016_subset.xml.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-19-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-19-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-19-DE414.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-19-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/tdb_2000-2019.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/te405_2000-2019.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/tdb_2000-2040.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/te405_2000-2040.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-40-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-40-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-40-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/earth00-40-DE430.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-40-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-40-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-40-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/test/sun00-40-DE430.dat.gz filter=lfs diff=lfs merge=lfs -text
lalapps/src/pulsar/Weave/TestInterpolating.tar.gz filter=lfs diff=lfs merge=lfs -text
lalapps/src/pulsar/Weave/TestNonInterpolating.tar.gz filter=lfs diff=lfs merge=lfs -text
lalapps/src/pulsar/Weave/TestSingleSegment.tar.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-40-DE430.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-40-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-19-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-19-DE414.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-40-DE430.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-19-DE414.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-40-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-40-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-19-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-40-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/te405_2000-2019.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-19-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-19-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-19-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-40-DE405.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/sun00-40-DE421.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/tdb_2000-2019.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/tdb_2000-2040.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/te405_2000-2040.dat.gz filter=lfs diff=lfs merge=lfs -text
lalpulsar/src/earth00-19-DE200.dat.gz filter=lfs diff=lfs merge=lfs -text
This diff is collapsed.
AC_PREREQ([2.63])
AC_INIT([LALSuite],[6.48.1],[lal-discuss@ligo.org])
AC_INIT([LALSuite],[6.49.1],[lal-discuss@ligo.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
......@@ -77,7 +77,7 @@ AC_DEFUN([lalsuite_config_subdir],[
# export precious environment variables
uppercase[]_LIBS="${lalsuite_abs_top_builddir}/lowercase/src/lib[]lowercase.la"
uppercase[]_CFLAGS="-I${lalsuite_abs_top_builddir}/lowercase/include"
uppercase[]_DATA_PATH="${lalsuite_abs_top_srcdir}/lowercase/test"
uppercase[]_DATA_PATH="${lalsuite_abs_top_srcdir}/lowercase/src:${lalsuite_abs_top_srcdir}/lowercase/test"
uppercase[]_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lowercase/octave"
uppercase[]_PYTHON_PATH="${lalsuite_abs_top_builddir}/lowercase/python"
uppercase[]_HTMLDIR="${htmldir}/../lowercase"
......
......@@ -856,7 +856,7 @@ AC_ARG_ENABLE(
no) laldetchar=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-laldetchar) ;;
esac
], [ laldetchar=${all_lal:-true} ] )
], [ laldetchar=${all_lal:-false} ] )
if test "$lalmetaio" = "false"; then
laldetchar=false
fi
......
AM_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"' @AM_CPPFLAGS@
AM_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"' -DTEST_PKG_DATA_DIR='"$(abs_top_srcdir)/src/"' @AM_CPPFLAGS@
TEST_EXTENSIONS = .sh .m .py
......@@ -14,6 +14,7 @@ TESTS_ENVIRONMENT = \
export LAL_DEBUG_LEVEL; LAL_DEBUG_LEVEL=msglvl1,memdbg; \
export LAL_TEST_SRCDIR; LAL_TEST_SRCDIR="$(abs_srcdir)"; \
export LAL_TEST_BUILDDIR; LAL_TEST_BUILDDIR="$(abs_builddir)"; \
export LAL_TEST_PKGDATADIR; LAL_TEST_PKGDATADIR="$(abs_top_srcdir)/src"; \
lalsuite_path="$(abs_top_builddir)/octave"; \
test "x$(builddir)" = "x$(srcdir)" || lalsuite_path="$${lalsuite_path}:$(abs_top_srcdir)/octave"; \
test "x$(LAL_OCTAVE_PATH)" = x || lalsuite_path="$${lalsuite_path}:$(LAL_OCTAVE_PATH)"; \
......
AC_PREREQ([2.63])
AC_INIT([LAL],[6.18.0.1],[lal-discuss@ligo.org])
AC_INIT([LAL],[6.19.0.1],[lal-discuss@ligo.org])
AC_CONFIG_HEADERS([src/config.h src/LALConfig.h])
AC_CONFIG_SRCDIR([src/std/LALStdio.h])
AC_CONFIG_AUX_DIR([gnuscripts])
......@@ -88,9 +88,9 @@ LALSUITE_DISTCHECK_CONFIGURE_FLAGS
# then increment age.
# 6. if any interfaces have been removed since the last public release,
# then set age to 0.
AC_SUBST([LIBCURRENT],[14])
AC_SUBST([LIBCURRENT],[15])
AC_SUBST([LIBREVISION],[0])
AC_SUBST([LIBAGE],[0])
AC_SUBST([LIBAGE],[1])
AC_SUBST([LIBVERSION],[${LIBCURRENT}:${LIBREVISION}:${LIBAGE}])
# set library api info - liblalsupport
......@@ -107,7 +107,7 @@ AC_SUBST([LIBVERSION],[${LIBCURRENT}:${LIBREVISION}:${LIBAGE}])
# then increment age.
# 6. if any interfaces have been removed since the last public release,
# then set age to 0.
AC_SUBST([LIBCURRENT_SUPPORT],[11])
AC_SUBST([LIBCURRENT_SUPPORT],[12])
AC_SUBST([LIBREVISION_SUPPORT],[0])
AC_SUBST([LIBAGE_SUPPORT],[0])
AC_SUBST([LIBVERSION_SUPPORT],[${LIBCURRENT_SUPPORT}:${LIBREVISION_SUPPORT}:${LIBAGE_SUPPORT}])
......
lal (6.19.0-1) unstable; urgency=low
* Pre O3 release
-- Adam Mercer <adam.mercer@ligo.org> Thu, 13 Sep 2018 14:58:14 -0700
lal (6.18.0-1) unstable; urgency=low
* LAL 6.18.0
......
......@@ -17,11 +17,13 @@ Build-Depends: bc,
python-glue (>= @MIN_GLUE_VERSION@),
python-numpy,
python-six,
python-dateutil,
python3-all-dev,
python3-ligo-segments,
python3-glue (>= @MIN_GLUE_VERSION@),
python3-numpy,
python3-six,
python3-dateutil,
swig (>= 3.0.7),
zlib1g-dev
X-Python-Version: >= 2.7
......@@ -63,8 +65,8 @@ Description: transitional package
this is a transitional package, it can safely be removed.
Package: python-lal
Replaces: lal-python (<< 6.18.0-1~)
Breaks: lal-python (<< 6.18.0-1~)
Replaces: lal-python (<< 6.18.0.1-1~)
Breaks: lal-python (<< 6.18.0.1-1~)
Section: python
Architecture: any
Depends: ${misc:Depends},
......@@ -73,6 +75,7 @@ Depends: ${misc:Depends},
python-ligo-segments,
python-glue (>= @MIN_GLUE_VERSION@),
python-six,
python-dateutil,
lal (= ${binary:Version})
Description: Python bindings for LAL
The LSC Algorithm Library for gravitational wave analysis.
......@@ -89,8 +92,8 @@ Description: transitional package
Package: python3-lal
Section: python
Replaces: lal-python3 (<< 6.18.0-1~)
Breaks: lal-python3 (<< 6.18.0-1~)
Replaces: lal-python3 (<< 6.18.0.1-1~)
Breaks: lal-python3 (<< 6.18.0.1-1~)
Architecture: any
Depends: ${misc:Depends},
${python3:Depends},
......@@ -98,6 +101,7 @@ Depends: ${misc:Depends},
python3-ligo-segments,
python3-glue (>= @MIN_GLUE_VERSION@),
python3-six,
python3-dateutil,
lal (= ${binary:Version})
Description: Python 3 bindings for LAL
The LSC Algorithm Library for gravitational wave analysis.
......
from __future__ import print_function
__applicationName__ = "doxypy"
__blurb__ = """
doxypy is an input filter for Doxygen. It preprocesses python
......@@ -84,7 +86,7 @@ class FSM(object):
self.current_input = input
self.current_transition = transition
if options.debug:
print >>sys.stderr, "# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input)
print("# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input), file=sys.stderr)
callback(match)
return
......@@ -206,8 +208,8 @@ class Doxypy(object):
if self.output:
try:
if options.debug:
print >>sys.stderr, "# OUTPUT: ", self.output
print >>self.outstream, "\n".join(self.output)
print("# OUTPUT: ", self.output, file=sys.stderr)
print("\n".join(self.output), file=self.outstream)
self.outstream.flush()
except IOError:
# Fix for FS#33. Catches "broken pipe" when doxygen closes
......@@ -226,7 +228,7 @@ class Doxypy(object):
Closes the current commentblock and starts a new comment search.
"""
if options.debug:
print >>sys.stderr, "# CALLBACK: resetCommentSearch"
print("# CALLBACK: resetCommentSearch", file=sys.stderr)
self.__closeComment()
self.startCommentSearch(match)
......@@ -237,7 +239,7 @@ class Doxypy(object):
the current indentation.
"""
if options.debug:
print >>sys.stderr, "# CALLBACK: startCommentSearch"
print("# CALLBACK: startCommentSearch", file=sys.stderr)
self.defclass = [self.fsm.current_input]
self.comment = []
self.indent = match.group(1)
......@@ -249,7 +251,7 @@ class Doxypy(object):
appends the current line to the output.
"""
if options.debug:
print >>sys.stderr, "# CALLBACK: stopCommentSearch"
print("# CALLBACK: stopCommentSearch", file=sys.stderr)
self.__closeComment()
self.defclass = []
......@@ -261,7 +263,7 @@ class Doxypy(object):
Closes the open comment block, resets it and appends the current line.
"""
if options.debug:
print >>sys.stderr, "# CALLBACK: appendFileheadLine"
print("# CALLBACK: appendFileheadLine", file=sys.stderr)
self.__closeComment()
self.comment = []
self.output.append(self.fsm.current_input)
......@@ -273,7 +275,7 @@ class Doxypy(object):
well as singleline comments.
"""
if options.debug:
print >>sys.stderr, "# CALLBACK: appendCommentLine"
print("# CALLBACK: appendCommentLine", file=sys.stderr)
(from_state, to_state, condition, callback) = self.fsm.current_transition
# single line comment
......@@ -312,13 +314,13 @@ class Doxypy(object):
def appendNormalLine(self, match):
"""Appends a line to the output."""
if options.debug:
print >>sys.stderr, "# CALLBACK: appendNormalLine"
print("# CALLBACK: appendNormalLine", file=sys.stderr)
self.output.append(self.fsm.current_input)
def appendDefclassLine(self, match):
"""Appends a line to the triggering block."""
if options.debug:
print >>sys.stderr, "# CALLBACK: appendDefclassLine"
print("# CALLBACK: appendDefclassLine", file=sys.stderr)
self.defclass.append(self.fsm.current_input)
def makeCommentBlock(self):
......@@ -396,7 +398,7 @@ def optParse():
(options, filename) = parser.parse_args()
if not filename:
print >>sys.stderr, "No filename given."
print("No filename given.", file=sys.stderr)
sys.exit(-1)
return filename[0]
......
......@@ -25,6 +25,7 @@ BuildRequires: glue >= @MIN_GLUE_VERSION@
BuildRequires: gsl-devel
BuildRequires: hdf5-devel
BuildRequires: less
BuildRequires: python-dateutil
BuildRequires: numpy
BuildRequires: scipy
BuildRequires: octave-devel
......@@ -36,6 +37,8 @@ Requires: fftw
Requires: gsl
Requires: hdf5
Requires: less
Obsoletes: python-pylal < 0.13.2-1
Provides: python-pylal = 0.13.2-1
Prefix: %{_prefix}
%description
......@@ -58,16 +61,16 @@ as well as the documentation for the library.
%package -n python2-%{name}
Summary: Python %{python2_version} bindings for LAL
Group: LAL
Provides: %{name}-python
Obsoletes: %{name}-python < 6.18.0-2
Conflicts: %{name}-python
Requires: %{name} = %{version}
Requires: python
Requires: python-dateutil
Requires: numpy
Requires: scipy
Requires: python-six
Requires: python2-ligo-segments
Requires: glue >= @MIN_GLUE_VERSION@
Obsoletes: %{name}-python
Provides: %{name}-python
%description -n python2-%{name}
The LSC Algorithm Library for gravitational wave data analysis.
This package provides the Python %{python2_version} bindings.
......@@ -107,6 +110,7 @@ rm -Rf ${RPM_BUILD_DIR}/%{name}-%{version}%{?nightly:-%{nightly}}
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/lal_simd_detect
%{_bindir}/lal_version
%{_libdir}/*.so.*
......@@ -114,6 +118,7 @@ rm -Rf ${RPM_BUILD_DIR}/%{name}-%{version}%{?nightly:-%{nightly}}
%files devel
%defattr(-,root,root)
%license COPYING
%{_includedir}/lal
%{_libdir}/*.a
%{_libdir}/*.so
......@@ -121,14 +126,19 @@ rm -Rf ${RPM_BUILD_DIR}/%{name}-%{version}%{?nightly:-%{nightly}}
%files -n python2-%{name}
%defattr(-,root,root)
%license COPYING
%{python2_sitearch}/*
%files octave
%defattr(-,root,root)
%license COPYING
%{_prefix}/lib*/octave/*/site/oct/*/lal.oct*
# dates should be formatted using: 'date +"%a %b %d %Y"'
%changelog
* Thu Sep 13 2018 Adam Mercer <adam.mercer@ligo.org> 6.19.0-1
- Pre O3 release
* Tue Feb 07 2017 Adam Mercer <adam.mercer@ligo.org> 6.18.0-1
- O2 release
......
......@@ -27,3 +27,80 @@ assert len(cached_detector_by_name) == len(CachedDetectors)
name_to_prefix = dict((name, detector.frDetector.prefix) for name, detector in cached_detector_by_name.items())
prefix_to_name = dict((prefix, name) for name, prefix in name_to_prefix.items())
#
# =============================================================================
#
# Make common LAL datatypes picklable
#
# =============================================================================
#
from six.moves import copyreg
numpy_to_lal_types = {'char': 'CHAR',
'int16': 'INT2',
'int32': 'INT4',
'int64': 'INT8',
'uint16': 'UINT2',
'uint32': 'UINT4',
'uint64': 'UINT8',
'float32': 'REAL4',
'float64': 'REAL8',
'complex64': 'COMPLEX8',
'complex128': 'COMPLEX16'}
def pickle_gps(obj):
return LIGOTimeGPS, (obj.gpsSeconds, obj.gpsNanoSeconds)
def pickle_unit(obj):
return Unit, (str(obj),)
def unpickle_vector(data):
lal_type = numpy_to_lal_types[data.dtype.name]
creator = globals()['Create{}Vector'.format(lal_type)]
result = creator(len(data))
result.data = data
return result
def pickle_vector(obj):
return unpickle_vector, (obj.data,)
def unpickle_series(attrs):
lal_type = numpy_to_lal_types[attrs['data'].data.dtype.name]
kind = 'Frequency' if 'deltaF' in attrs else 'Time'
creator = globals()['{}{}Series'.format(lal_type, kind)]
result = creator()
for key, value in attrs.items():
setattr(result, key, value)
return result
def pickle_series(obj):
attrs = {'name': obj.name, 'epoch': obj.epoch, 'f0': obj.f0,
'sampleUnits': obj.sampleUnits, 'data': obj.data}
if hasattr(obj, 'deltaF'):
attrs['deltaF'] = obj.deltaF
else:
attrs['deltaT'] = obj.deltaT
return unpickle_series, (attrs,)
copyreg.pickle(LIGOTimeGPS, pickle_gps)
copyreg.pickle(Unit, pickle_unit)
for datatype in numpy_to_lal_types.values():
clazz = globals().get('{}Vector'.format(datatype))
if clazz:
copyreg.pickle(clazz, pickle_vector)
clazz = globals().get('{}FrequencySeries'.format(datatype))
if clazz:
copyreg.pickle(clazz, pickle_series)
clazz = globals().get('{}TimeSeries'.format(datatype))
if clazz:
copyreg.pickle(clazz, pickle_series)
......@@ -2433,7 +2433,7 @@ def filter_array(a, window, cyclic = False, use_fft = True):
raise ValueError("window size is not an odd integer in at least 1 dimension")
# determine how much of the window function can be used
window_slices = []
for d in xrange(dims):
for d in range(dims):
if window.shape[d] > a.shape[d]:
# largest odd integer <= size of a
n = ((a.shape[d] + 1) // 2) * 2 - 1
......
......@@ -34,6 +34,10 @@ of the LAL FFT module
# psd = spectrum.median_mean(timeseries, 16384, 8192)
# \endcode
import warnings
warnings.warn('lal.spectrum is no longer maintained, and may be removed in a '
'future release', DeprecationWarning)
from .. import git_version
__author__ = "Duncan Macleod <duncan.macleod@ligo.org>"
__version__ = git_version.id
......
......@@ -137,6 +137,7 @@ const LALVCSInfoList lal@PACKAGE_NAME_NOLAL@VCSInfoList = {
NULL
};
#if @PACKAGE_NAME_UCASE@_VERSION_DEVEL != 0
/*
* VCS header/library mismatch link check function:
* This function will successfully link only if the link check functions defined
......@@ -147,7 +148,6 @@ const LALVCSInfoList lal@PACKAGE_NAME_NOLAL@VCSInfoList = {
*/
void @PACKAGE_NAME_UCASE@_VCS_LINK_CHECK(void)
{
#if @PACKAGE_NAME_UCASE@_VERSION_DEVEL != 0
#if defined(HAVE_LIBLAL) && LAL_VERSION_DEVEL != 0
LAL_VCS_LINK_CHECK();
#endif
......@@ -181,5 +181,5 @@ void @PACKAGE_NAME_UCASE@_VCS_LINK_CHECK(void)
#if defined(HAVE_LIBLALSTOCHASTIC) && LALSTOCHASTIC_VERSION_DEVEL != 0
LALSTOCHASTIC_VCS_LINK_CHECK();
#endif
#endif
}
#endif
......@@ -45,9 +45,11 @@ extern "C" {
#define @PACKAGE_NAME_UCASE@_VCS_CLEAN "@CLEAN@"
#define @PACKAGE_NAME_UCASE@_VCS_STATUS "@STATUS@"
#if @PACKAGE_NAME_UCASE@_VERSION_DEVEL != 0
/* VCS header/library mismatch link check function */
#define @PACKAGE_NAME_UCASE@_VCS_LINK_CHECK @PACKAGE_NAME_UCASE@_@CLEAN@_@ID@_VCS_HEADER_LIBRARY_MISMATCH
void @PACKAGE_NAME_UCASE@_VCS_LINK_CHECK(void);
#endif
#ifdef __cplusplus
}
......
......@@ -55,12 +55,14 @@
/* Check that this file is being compiled for x86 */
#if defined(__x86_64__) || defined(_M_X64)
#define HAVE_X86 /* x86 64-bit */
#define HAVE_X86 1 /* x86 64-bit */
#elif defined(__i386) || defined(_M_IX86)
#define HAVE_X86 /* x86 32-bit */
#define HAVE_X86 1 /* x86 32-bit */
#else
#define HAVE_X86 0
#endif
#if defined(HAVE_X86) && ( defined(__GNUC__) || defined(__clang__) ) && defined(HAVE_CPUID_H)
#if HAVE_X86 && ( defined(__GNUC__) || defined(__clang__) ) && defined(HAVE_CPUID_H)
#include <cpuid.h>
#define HAVE__GET_CPUID 1
#endif
......@@ -104,7 +106,7 @@ static int lalOnce = 1;
*/
static inline UNUSED void cpuid( uint32_t output[4], UNUSED int functionnumber ) {
#if defined(HAVE_X86)
#if HAVE_X86
#if HAVE__GET_CPUID
......@@ -145,7 +147,7 @@ static inline UNUSED void cpuid( uint32_t output[4], UNUSED int functionnumber )
*/
static inline UNUSED int64_t xgetbv( UNUSED int ctr ) {
#if defined(HAVE_X86)
#if HAVE_X86
#if defined(__GNUC__) || defined(__clang__)
......@@ -222,7 +224,7 @@ static LAL_SIMD_ISET detect_instruction_set(void) {
if ((abcd[2] & (1 << 28)) == 0) return iset; /* no AVX */
iset = LAL_SIMD_ISET_AVX; /* AVX detected */
#if defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
#if HAVE_X86 && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
/* GCC's __get_cpuid() fails to detect AVX2, see bug report at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756 */
if (!__builtin_cpu_supports("avx2")) return iset; /* no AVX2 */
#else
......
......@@ -18,11 +18,34 @@
* MA 02111-1307 USA
*/
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <lal/LALStdlib.h>
#include <lal/LALString.h>
/** Like snprintf but doesn't print format truncation warnings with GCC. */
int XLALStringPrint(char *s, size_t n, const char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#ifndef __clang__
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
#endif
ret = vsnprintf(s, n, fmt, ap);
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
va_end(ap);
return ret;
}
/** Like strcat but dynamically reallocates string with LALRealloc. */
char *XLALStringAppend(char *s, const char *append)