Skip to content

Commit

Permalink
Re #11374 Fix minor merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Mar 20, 2015
2 parents 25ed51f + ac8dd14 commit 6bc614b
Show file tree
Hide file tree
Showing 254 changed files with 10,162 additions and 1,337 deletions.
11 changes: 10 additions & 1 deletion Code/Mantid/Build/CMake/CommonSetup.cmake
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 All @@ -60,6 +60,7 @@ include_directories ( SYSTEM ${NEXUS_INCLUDE_DIR} )
find_package ( MuParser REQUIRED )

find_package ( JsonCPP REQUIRED )
include_directories ( SYSTEM ${JSONCPP_INCLUDE_DIR} )

find_package ( Doxygen ) # optional

Expand All @@ -71,6 +72,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 (APPLE AND 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
8 changes: 7 additions & 1 deletion Code/Mantid/Build/CMake/FindJsonCPP.cmake
Expand Up @@ -9,8 +9,14 @@
# JSONCPP_LIBRARY_DEBUG - library files for linking (debug version)
# JSONCPP_LIBRARIES - All required libraries, including the configuration type

# Using unset here is a temporary hack to force FindJson to find the correct
# path in an incremental build. It should be removed a day or two after the
# branch introducing this is merged.
unset ( JSONCPP_INCLUDE_DIR CACHE )

# Headers
find_path ( JSONCPP_INCLUDE_DIR jsoncpp/json/json.h )
find_path ( JSONCPP_INCLUDE_DIR json/reader.h
PATH_SUFFIXES jsoncpp )

# Libraries
find_library ( JSONCPP_LIBRARY NAMES jsoncpp ) # optimized
Expand Down
31 changes: 21 additions & 10 deletions Code/Mantid/Build/CMake/FindOpenCascade.cmake
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
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
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
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
@@ -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
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
2 changes: 1 addition & 1 deletion Code/Mantid/Build/Jenkins/buildscript.bat
Expand Up @@ -87,7 +87,7 @@ if not "%JOB_NAME%"=="%JOB_NAME:relwithdbg=%" (
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Update the PATH so that we can find everything
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set PATH=%WORKSPACE%\Code\Third_Party\lib\win64;%WORKSPACE%\Code\Third_Party\lib\win64\Python27;%PARAVIEW_DIR%\bin\%BUILD_CONFIG%;%PATH%
set PATH=%WORKSPACE%\Code\Third_Party\lib\win64;%WORKSPACE%\Code\Third_Party\lib\win64\Python27;%WORKSPACE%\Code\Third_Party\lib\win64\mingw;%PARAVIEW_DIR%\bin\%BUILD_CONFIG%;%PATH%

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: CMake configuration
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/CMakeLists.txt
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
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
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
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDEventWorkspace.h
Expand Up @@ -51,11 +51,6 @@ class MANTID_API_DLL IMDEventWorkspace : public API::IMDWorkspace,
virtual void getBoxes(std::vector<API::IMDNode *> &boxes, size_t maxDepth,
bool leafOnly) = 0;

/// TODO: The meaning of this method have changed! Helper method that makes a
/// table workspace with some box data
// virtual Mantid::API::ITableWorkspace_sptr makeBoxTable(size_t start, size_t
// num) = 0;

/// @return true if the workspace is file-backed
virtual bool isFileBacked() const = 0;

Expand Down
Expand Up @@ -89,7 +89,7 @@ class DLLExport IMDHistoWorkspace : public IMDWorkspace,
virtual double &operator[](const size_t &index) = 0;

virtual void setCoordinateSystem(
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;
const Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

virtual boost::shared_ptr<IMDHistoWorkspace> clone() const = 0;

Expand Down
7 changes: 3 additions & 4 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h
Expand Up @@ -67,8 +67,7 @@ enum MDNormalization {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/

class MANTID_API_DLL IMDWorkspace : public Workspace,
public Mantid::API::MDGeometry {
class MANTID_API_DLL IMDWorkspace : public Workspace, public API::MDGeometry {
public:
IMDWorkspace();
IMDWorkspace(const IMDWorkspace &other);
Expand Down Expand Up @@ -119,11 +118,11 @@ class MANTID_API_DLL IMDWorkspace : public Workspace,
/// Clear existing masks
virtual void clearMDMasking() = 0;
///
virtual Mantid::Kernel::SpecialCoordinateSystem
virtual Kernel::SpecialCoordinateSystem
getSpecialCoordinateSystem() const = 0;
/// if a workspace was filebacked, this should clear file-based status, delete
/// file-based information and close related files.
virtual void clearFileBacked(bool /* loadFileContentsToMemory*/){};
virtual void clearFileBacked(bool /* loadFileContentsToMemory*/) {}
/// this is the method to build table workspace from any workspace. It does
/// not have much sence and may be placed here erroneously
virtual ITableWorkspace_sptr makeBoxTable(size_t /*start*/, size_t /* num*/) {
Expand Down
17 changes: 7 additions & 10 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h
Expand Up @@ -55,10 +55,6 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
/// Destructor
virtual ~IPeaksWorkspace();

// boost::shared_ptr<IPeaksWorkspace> clone() = 0;
// void appendFile( std::string filename, Mantid::Geometry::Instrument_sptr
// inst) = 0;

//---------------------------------------------------------------------------------------------
/** @return the number of peaks
*/
Expand Down Expand Up @@ -99,14 +95,15 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,

//---------------------------------------------------------------------------------------------
/** Create an instance of a Peak
* @param QLabFrame :: Q of the center of the peak in the lab frame, in reciprocal space
* @param detectorDistance :: Optional distance between the sample and the detector. Calculated if not provided.
* @param QLabFrame :: Q of the center of the peak in the lab frame, in
* reciprocal space
* @param detectorDistance :: Optional distance between the sample and the
* detector. Calculated if not provided.
* @return a pointer to a new Peak object.
*/
virtual IPeak *createPeak(Mantid::Kernel::V3D QLabFrame,
boost::optional<double> detectorDistance) const = 0;


/**
* Create an instance of a peak using a V3D
* @param HKL V3D
Expand Down Expand Up @@ -136,16 +133,16 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
* @param coordinateSystem : Special Q3D coordinate system to use.
*/
virtual void setCoordinateSystem(
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

const Kernel::SpecialCoordinateSystem coordinateSystem) = 0;
//---------------------------------------------------------------------------------------------
/**
* Get the special coordinate system.
* @returns special Q3D coordinate system to use being used by this
* PeaksWorkspace object. Probably the one the workspace was generated with.
*/
virtual Mantid::Kernel::SpecialCoordinateSystem
virtual Kernel::SpecialCoordinateSystem
getSpecialCoordinateSystem() const = 0;

virtual std::vector<std::pair<std::string, std::string>>
peakInfo(Kernel::V3D QFrame, bool labCoords) const = 0;
virtual int peakInfoNumber(Kernel::V3D qLabFrame, bool labCoords) const = 0;
Expand Down

0 comments on commit 6bc614b

Please sign in to comment.