Skip to content

Commit

Permalink
Merge branch 'master' into 11350_converttomd_no_expt_info_loading
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
martyngigg committed Mar 20, 2015
2 parents bacb8b4 + 8840848 commit 9ca2298
Show file tree
Hide file tree
Showing 278 changed files with 11,876 additions and 1,373 deletions.
10 changes: 9 additions & 1 deletion Code/Mantid/Build/CMake/CommonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set ( TESTING_TIMEOUT 300 CACHE INTEGER
"Timeout in seconds for each test (default 300=5minutes)")

###########################################################################
# Look for dependencies - bail out if any not found
# Look for dependencies
###########################################################################

set ( Boost_NO_BOOST_CMAKE TRUE )
Expand Down Expand Up @@ -71,6 +71,14 @@ set ( CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH}/zlib123 )
find_package ( ZLIB REQUIRED )
set ( CMAKE_INCLUDE_PATH ${MAIN_CMAKE_INCLUDE_PATH} )

if (${CMAKE_SYSTEM_NAME} MATCHES "Windows" OR OSX_VERSION VERSION_LESS 10.9)
set (HDF5_DIR "${CMAKE_MODULE_PATH}")
find_package ( HDF5 COMPONENTS HL REQUIRED
CONFIGS hdf5-config.cmake )
else()
find_package ( HDF5 COMPONENTS HL REQUIRED )
endif()

find_package ( PythonInterp )

if ( MSVC )
Expand Down
31 changes: 21 additions & 10 deletions Code/Mantid/Build/CMake/FindOpenCascade.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,61 @@ if ( WIN32 )
add_definitions ( -DWNT )
endif ( WIN32 )

set ( OC_REDHAT_RPM /opt/OpenCASCADE/lib64 )
find_path ( OPENCASCADE_LIBRARY_DIR libTKernel.so PATHS
/opt/OpenCASCADE/lib64
$ENV{CASROOT}/lib64
/opt/OpenCASCADE/lib
$ENV{CASROOT}/lib
/opt/OpenCASCADE/lib32
$ENV{CASROOT}/lib32
)

find_library ( OPENCASCADE_LIB_TKERNEL
NAMES TKernel
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKBO
NAMES TKBO
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKPRIM
NAMES TKPrim
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKMESH
NAMES TKMesh
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKBREP
NAMES TKBRep
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKTOPALGO
NAMES TKTopAlgo
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKMATH
NAMES TKMath
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)
find_library ( OPENCASCADE_LIB_TKG2D
NAMES TKG2d
PATHS ${OC_REDHAT_RPM}
PATHS ${OPENCASCADE_LIBRARY_DIR}
)

find_library ( OPENCASCADE_LIB_TKG3D
NAMES TKG3d
PATHS ${OPENCASCADE_LIBRARY_DIR}
)

find_library ( OPENCASCADE_LIB_TKGEOMBASE
NAMES TKGeomBase
PATHS ${OPENCASCADE_LIBRARY_DIR}
)

find_library ( OPENCASCADE_LIB_TKGEOMALGO
NAMES TKGeomAlgo
PATHS ${OPENCASCADE_LIBRARY_DIR}
)

set ( OPENCASCADE_LIBRARIES
Expand All @@ -83,7 +94,7 @@ set ( OPENCASCADE_LIBRARIES
include ( FindPackageHandleStandardArgs )
find_package_handle_standard_args( OpenCascade DEFAULT_MSG OPENCASCADE_LIBRARIES OPENCASCADE_INCLUDE_DIR )

mark_as_advanced ( OPENCASCADE_INCLUDE_DIR
mark_as_advanced ( OPENCASCADE_INCLUDE_DIR OPENCASCADE_LIBRARY_DIR
OPENCASCADE_LIB_TKERNEL OPENCASCADE_LIB_TKBO
OPENCASCADE_LIB_TKPRIM OPENCASCADE_LIB_TKMESH
OPENCASCADE_LIB_TKBREP OPENCASCADE_LIB_TKTOPALGO
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/FindQwt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
find_path ( QWT_INCLUDE_DIR qwt.h
PATHS /opt/include /usr/local/include /usr/include ${CMAKE_INCLUDE_PATH}
PATH_SUFFIXES qwt5 qwt5-qt4 qwt-qt4 qwt )
find_library ( QWT_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt )
find_library ( QWT_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt5 qwt )
find_library ( QWT_LIBRARY_DEBUG qwtd )

# in REQUIRED mode: terminate if one of the above find commands failed
Expand Down
29 changes: 14 additions & 15 deletions Code/Mantid/Build/CMake/LinuxPackageScripts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ set ( CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIB_DIR};${CMAKE_INSTALL_PRE
# Required for Fedora >= 18 and RHEL >= 7
set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /opt /usr/share/applications /usr/share/pixmaps )

###########################################################################
# LD_PRELOAD TCMalloc
###########################################################################
# User systems will only have the libraries and not the symbolic link
# so we must set the preload to the versioned library. We will assume it is
# in the same location as the system that the package was built on
if ( TCMALLOC_LIBRARIES )
execute_process ( COMMAND readlink --no-newline --canonicalize-existing ${TCMALLOC_LIBRARIES}
OUTPUT_VARIABLE TCMALLOC_PRELOAD
RESULT_VARIABLE READLINK_RESULT )
if ( READLINK_RESULT EQUAL 1 )
message ( FATAL_ERROR "Unable to find real file that tcmalloc symlink, ${TCMALLOC_LIBRARIES}, points to." )
endif()
endif()

###########################################################################
# Environment scripts (profile.d)
###########################################################################
Expand Down Expand Up @@ -151,6 +136,12 @@ configure_file ( ${CMAKE_MODULE_PATH}/Packaging/launch_mantidplot.sh.in
# Needs to be executable
execute_process ( COMMAND "chmod" "+x" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/launch_mantidplot.sh"
OUTPUT_QUIET ERROR_QUIET )
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/mantidpython.in
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mantidpython @ONLY )
# Needs to be executable
execute_process ( COMMAND "chmod" "+x" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mantidpython"
OUTPUT_QUIET ERROR_QUIET )

# Package version
set ( MANTIDPLOT_EXEC MantidPlot_exe )
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/launch_mantidplot.sh.in
Expand All @@ -161,3 +152,11 @@ install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/launch_mantidplot.sh.install
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/mantidpython.in
${CMAKE_CURRENT_BINARY_DIR}/mantidpython.install @ONLY )
install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/mantidpython.install
DESTINATION ${BIN_DIR} RENAME mantidpython
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
6 changes: 4 additions & 2 deletions Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTFILE=$(readlink -f "$0")
INSTALLDIR=$(echo $SCRIPTFILE | sed -r -e 's|^(.*)/(.*)$|\1|g') #.* is greedy and eats up until the final slash

# Define extra libraries and load paths
LOCAL_PRELOAD=@TCMALLOC_PRELOAD@
LOCAL_PRELOAD=`readlink --no-newline --canonicalize-existing @TCMALLOC_LIBRARIES@`
if [ -n "${LD_PRELOAD}" ]; then
LOCAL_PRELOAD=${LOCAL_PRELOAD}:${LD_PRELOAD}
fi
Expand All @@ -21,4 +21,6 @@ else
fi

# Launch
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt @WRAPPER_PREFIX@$INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} \
LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt \
@WRAPPER_PREFIX@$INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@
34 changes: 34 additions & 0 deletions Code/Mantid/Build/CMake/Packaging/mantidpython.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
#
# Launch Mantidplot using any necessary LD_PRELOAD or software collection behaviour
#
# Script is configured by CMake

# Find out where we are
SCRIPTFILE=$(readlink -f "$0")
INSTALLDIR=$(echo $SCRIPTFILE | sed -r -e 's|^(.*)/(.*)$|\1|g') #.* is greedy and eats up until the final slash
IPYTHON=$(command -v ipython)

# Define extra libraries and load paths
LOCAL_PRELOAD=`readlink --no-newline --canonicalize-existing @TCMALLOC_LIBRARIES@`
if [ -n "${LD_PRELOAD}" ]; then
LOCAL_PRELOAD=${LOCAL_PRELOAD}:${LD_PRELOAD}
fi
LOCAL_LDPATH=@EXTRA_LDPATH@:${LD_LIBRARY_PATH}
if [ -z "${TCMALLOC_RELEASE_RATE}" ]; then
TCM_RELEASE=10000
else
TCM_RELEASE=${TCMALLOC_RELEASE_RATE}
fi

# Define extra libraries for python
LOCAL_PYTHONPATH=@WRAPPER_PREFIX@$INSTALLDIR
if [ -n "${PYTHONPATH}" ]; then
LOCAL_PYTHONPATH=${LOCAL_PYTHONPATH}:${PYTHONPATH}
fi

# Launch
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} \
LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt \
PYTHONPATH=${LOCAL_PYTHONPATH} \
${IPYTHON} $*@WRAPPER_POSTFIX@
6 changes: 5 additions & 1 deletion Code/Mantid/Build/Jenkins/buildscript
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ else
SCL_ON_RHEL6="eval"
fi

if [[ ${NODE_LABELS} == *rhel7* ]]; then
ON_RHEL7=true
fi

###############################################################################
# Check job requirements from the name
###############################################################################
Expand Down Expand Up @@ -212,6 +216,6 @@ fi
# Run the system tests on RHEL6 when doing a pull request build. Run
# from a package to have at least one Linux checks it install okay
###############################################################################
if [[ "${ON_RHEL6}" == true ]] && [[ ${JOB_NAME} == *pull_requests* ]]; then
if [[ "${ON_RHEL7}" == true ]] && [[ ${JOB_NAME} == *pull_requests* ]]; then
$SCRIPT_DIR/systemtests
fi
1 change: 1 addition & 0 deletions Code/Mantid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ set( DOCS_BUILDDIR ${CMAKE_BINARY_DIR}/docs )
# Framework Build options
set ( CXXTEST_SINGLE_LOGFILE CACHE BOOL "Switch to have the tests for each package run together")
set ( CXXTEST_ADD_PERFORMANCE OFF CACHE BOOL "Switch to add Performance tests to the list of tests run by ctest?")
set ( ENABLE_OPENCASCADE ON CACHE BOOL "Enable OpenCascade-based 3D visualisation")

add_subdirectory ( Framework )

Expand Down
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/FunctionDomain1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class MANTID_API_DLL FunctionDomain1D : public FunctionDomain {
double operator[](size_t i) const { return m_data[i]; }
/// Get a pointer to i-th value
const double *getPointerAt(size_t i) const { return m_data + i; }
/// Convert to a vector
std::vector<double> toVector() const;

protected:
/// Protected constructor, shouldn't be created directly. Use
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/FunctionValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class MANTID_API_DLL FunctionValues {
/// instance.
void setFitDataFromCalculated(const FunctionValues &values);

/// Return the calculated values as a vector
std::vector<double> toVector() const {return m_calculated;}

protected:
/// Copy calculated values to a buffer
/// @param to :: Pointer to the buffer
Expand Down
10 changes: 10 additions & 0 deletions Code/Mantid/Framework/API/src/FunctionDomain1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
namespace Mantid {
namespace API {

/// Convert to a vector
std::vector<double> FunctionDomain1D::toVector() const
{
std::vector<double> res;
if ( m_n > 0 ){
res.assign(m_data, m_data+m_n);
}
return res;
}

/**
* Create a domain from a vector.
* @param xvalues :: Vector with function arguments to be copied from.
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/CurveFitting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set ( SRC_FILES
src/DiffSphere.cpp
src/DynamicKuboToyabe.cpp
src/EndErfc.cpp
src/EstimatePeakErrors.cpp
src/ExpDecay.cpp
src/ExpDecayMuon.cpp
src/ExpDecayOsc.cpp
Expand Down Expand Up @@ -141,6 +142,7 @@ set ( INC_FILES
inc/MantidCurveFitting/DllConfig.h
inc/MantidCurveFitting/DynamicKuboToyabe.h
inc/MantidCurveFitting/EndErfc.h
inc/MantidCurveFitting/EstimatePeakErrors.h
inc/MantidCurveFitting/ExpDecay.h
inc/MantidCurveFitting/ExpDecayMuon.h
inc/MantidCurveFitting/ExpDecayOsc.h
Expand Down Expand Up @@ -245,6 +247,7 @@ set ( TEST_FILES
DiffSphereTest.h
DynamicKuboToyabeTest.h
EndErfcTest.h
EstimatePeakErrorsTest.h
ExpDecayMuonTest.h
ExpDecayOscTest.h
ExpDecayTest.h
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#ifndef MANTID_CURVEFITTING_ESTIMATEPEAKERRORS_H_
#define MANTID_CURVEFITTING_ESTIMATEPEAKERRORS_H_

#include "MantidAPI/Algorithm.h"

namespace Mantid {
namespace CurveFitting {
//---------------------------------------------------------------------------
/**
Copyright &copy; 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport EstimatePeakErrors : public API::Algorithm {
public:
EstimatePeakErrors();

const std::string name() const;
virtual const std::string summary() const ;

int version() const;
const std::string category() const;

private:
void init();
void exec();
};

} // namespace CurveFitting
} // namespace Mantid

#endif /* MANTID_CURVEFITTING_ESTIMATEPEAKERRORS_H_ */

0 comments on commit 9ca2298

Please sign in to comment.