Skip to content

Commit

Permalink
Merge branch 'master' into feature/9445_poldi_spectrum_domain_function
Browse files Browse the repository at this point in the history
Conflicts:
	Code/Mantid/Framework/SINQ/CMakeLists.txt
  • Loading branch information
Michael Wedel committed Jun 24, 2014
2 parents 2e73527 + 34d1f94 commit 74af488
Show file tree
Hide file tree
Showing 717 changed files with 52,013 additions and 5,128 deletions.
14 changes: 7 additions & 7 deletions Code/Mantid/Build/CMake/CPackLinuxSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set ( CPACK_SOURCE_GENERATOR TGZ )
include (DetermineLinuxDistro)

# define which binary generators to use
if ( ${UNIX_DIST} MATCHES "Ubuntu" )
if ( "${UNIX_DIST}" MATCHES "Ubuntu" )
find_program (DPKG_CMD dpkg)
if ( DPKG_CMD )
set ( CPACK_GENERATOR "DEB" )
Expand All @@ -22,23 +22,23 @@ if ( ${UNIX_DIST} MATCHES "Ubuntu" )
set( CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
endif ( DPKG_CMD )
endif ( ${UNIX_DIST} MATCHES "Ubuntu" )
endif ( "${UNIX_DIST}" MATCHES "Ubuntu" )

#RedHatEnterpriseClient RedHatEnterpriseWorkstation
if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR ${UNIX_DIST} MATCHES "SUSE LINUX" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "Fedora" OR "${UNIX_DIST}" MATCHES "SUSE LINUX" )
find_program ( RPMBUILD_CMD rpmbuild )
if ( RPMBUILD_CMD )
set ( CPACK_GENERATOR "RPM" )
set ( CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}" )
set ( CPACK_RPM_PACKAGE_URL "http://www.mantidproject.org" )

# reset the release name to include the RHEL version if known
if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )
string ( REGEX REPLACE "^([0-9])\\.[0-9]+$" "\\1" TEMP ${UNIX_RELEASE} )
set ( CPACK_RPM_PACKAGE_RELEASE "1.el${TEMP}" )
elseif ( ${UNIX_DIST} MATCHES "Fedora" )
elseif ( "${UNIX_DIST}" MATCHES "Fedora" )
set ( CPACK_RPM_PACKAGE_RELEASE "1.fc${UNIX_RELEASE}" )
endif ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
endif ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )

# If CPACK_SET_DESTDIR is ON then the Prefix doesn't get put in the spec file
if( CPACK_SET_DESTDIR )
Expand All @@ -50,5 +50,5 @@ if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR
set ( CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCHITECTURE}" )
endif ( RPMBUILD_CMD)
endif ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR ${UNIX_DIST} MATCHES "SUSE LINUX" )
endif ()

4 changes: 3 additions & 1 deletion Code/Mantid/Build/CMake/DarwinSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ install ( DIRECTORY /Library/Python/${PY_VER}/site-packages/PyQt4/uic DESTINATIO
# Python packages in Third_Party need copying to build directory and the final package
file ( GLOB THIRDPARTY_PYTHON_PACKAGES ${CMAKE_LIBRARY_PATH}/Python/* )
foreach ( PYPACKAGE ${THIRDPARTY_PYTHON_PACKAGES} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} )
if ( IS_DIRECTORY ${PYPACKAGE} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} )
endif()
file ( COPY ${PYPACKAGE} DESTINATION ${PROJECT_BINARY_DIR}/bin )
endforeach( PYPACKAGE )

Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Build/CMake/LinuxSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ endif()


# RHEL6 specific stuff (as we need to use software collections)
if ( ${UNIX_DIST} STREQUAL "RedHatEnterprise" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )
file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/rpm_post_install.sh "\n"
"if [ -f $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot ]; then\n"
" mv $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot_exe\n"
Expand All @@ -101,12 +101,12 @@ if ( ${UNIX_DIST} STREQUAL "RedHatEnterprise" )
"scl enable mantidlibs \"${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/MantidPlot_exe $*\" \n"
)

install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/launch_mantidplot.sh
install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/launch_mantidplot.sh
DESTINATION ${BIN_DIR}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
)

endif()

Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Build/CMake/WindowsNSIS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
install ( DIRECTORY ${CMAKE_LIBRARY_PATH}/qt_plugins/imageformats ${CMAKE_LIBRARY_PATH}/qt_plugins/sqldrivers DESTINATION plugins/qtplugins
REGEX "^.*d4.dll$" EXCLUDE )
install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/Installers/WinInstaller/qt.conf DESTINATION bin )

# Copy assistant.exe
install ( FILES ${CMAKE_LIBRARY_PATH}/assistant.exe DESTINATION bin )

# Release deployments do modify enviromental variables, other deployments do not.
if(CPACK_PACKAGE_SUFFIX STREQUAL "")
Expand Down
16 changes: 10 additions & 6 deletions Code/Mantid/Build/Jenkins/buildscript
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ if [[ ${JOB_NAME} == *clean* ]]; then

# Set some variables relating to the linux packages created from clean builds
if [[ $(uname) != 'Darwin' ]]; then
# Use different suffix for linux builds
if [[ ${JOB_NAME} == *master* ]]; then
SUFFIX=nightly
PACKAGINGVARS="-DENVVARS_ON_INSTALL=False -DCMAKE_INSTALL_PREFIX=/opt/mantidnightly -DCPACK_PACKAGE_SUFFIX=nightly -DCPACK_SET_DESTDIR=OFF -DPACKAGE_DOCS=ON"
elif [[ ${JOB_NAME} == *develop* ]]; then
SUFFIX=unstable
PACKAGINGVARS="-DENVVARS_ON_INSTALL=False -DCMAKE_INSTALL_PREFIX=/opt/mantidunstable -DCPACK_PACKAGE_SUFFIX=unstable -DCPACK_SET_DESTDIR=OFF -DPACKAGE_DOCS=ON"
fi
PACKAGINGVARS="-DENVVARS_ON_INSTALL=False -DCMAKE_INSTALL_PREFIX=/opt/mantid${SUFFIX} -DCPACK_PACKAGE_SUFFIX=${SUFFIX} -DCPACK_SET_DESTDIR=OFF -DPACKAGE_DOCS=True"
else
# Mac packaging
PACKAGINGVARS="-DPACKAGE_DOCS=ON"
fi
fi

Expand All @@ -62,7 +65,7 @@ cd $WORKSPACE/build
###############################################################################
# CMake configuration
###############################################################################
$SCL_ON_RHEL6 "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} ${PACKAGINGVARS} ../Code/Mantid"
$SCL_ON_RHEL6 "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} -DDOCS_HTML=ON ${PACKAGINGVARS} ../Code/Mantid"

###############################################################################
# Build step
Expand Down Expand Up @@ -93,7 +96,7 @@ if [[ "$CLEANBUILD" == true ]]; then
if [[ $(uname) == 'Darwin' ]]; then
export MANTIDPATH=$PWD/bin
fi
$SCL_ON_RHEL6 "make docs-html"
$SCL_ON_RHEL6 "make docs-qthelp"
fi

###############################################################################
Expand All @@ -116,7 +119,8 @@ if [[ "$CLEANBUILD" == true ]]; then
# and labelled by the commit id it was built with. This assumes the Jenkins git plugin
# has set the GIT_COMMIT environment variable
if [[ "$ON_RHEL6" == true ]]; then
tar -cjf mantiddocs-g${GIT_COMMIT:0:7}.tar.bz2 --exclude='*.buildinfo' docs/html
$SCL_ON_RHEL6 "make docs-html"
tar -cjf mantiddocs-g${GIT_COMMIT:0:7}.tar.bz2 --exclude='*.buildinfo' --exclude="MantidProject.q*" docs/html
# The ..._PREFIX argument avoids opt/Mantid directories at the top of the tree
$SCL_ON_RHEL6 "cpack --config CPackSourceConfig.cmake -D CPACK_PACKAGING_INSTALL_PREFIX="
fi
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/Jenkins/buildscript.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if ERRORLEVEL 1 exit /B %ERRORLEVEL%
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if "%CLEANBUILD%" EQU "yes" (
:: Build offline documentation
msbuild /nologo /nr:false /p:Configuration=Release docs/docs-html.vcxproj
msbuild /nologo /nr:false /p:Configuration=Release docs/docs-qthelp.vcxproj

:: ignore errors as the exit code of the build isn't correct
::if ERRORLEVEL 1 exit /B %ERRORLEVEL%
Expand Down
22 changes: 11 additions & 11 deletions Code/Mantid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ if ( ENABLE_CPACK )
# rhel requirements
set ( CPACK_RPM_PACKAGE_REQUIRES "boost >= 1.34.1,qt4 >= 4.2,nexus,nexus-python,qwt,gsl,glibc,qwtplot3d-qt4,muParser,numpy" )
# OpenCASCADE changed names when packaged for Fedora 20
if( ${UNIX_CODENAME} STREQUAL "Heisenbug" )
if( "${UNIX_CODENAME}" MATCHES "Heisenbug" )
set( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},OCE-devel" )
else()
set( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},OpenCASCADE-libs-modelling >= 6.3.0,OpenCASCADE-libs-foundation >= 6.3.0,OpenCASCADE-libs-visualization >= 6.3.0,OpenCASCADE-libs-ocaf >= 6.3.0,OpenCASCADE-libs-ocaf-lite >= 6.3.0" )
Expand All @@ -196,8 +196,8 @@ if ( ENABLE_CPACK )
# scipy & matplotlib
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},scipy,python-matplotlib" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},mxml,hdf,hdf5" )

if( ${UNIX_CODENAME} STREQUAL "Santiago" )
if( "${UNIX_CODENAME}" MATCHES "Santiago" )
# On RHEL6 we have to use an updated qscintilla to fix an auto complete bug
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} qscintilla >= 2.4.6" )
# On RHEL6 we are using SCL packages for Qt
Expand All @@ -207,20 +207,20 @@ if ( ENABLE_CPACK )
endif()

# Add software collections for RHEL
if ( ${UNIX_CODENAME} STREQUAL "Santiago" )
if ( "${UNIX_CODENAME}" MATCHES "Santiago" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} scl-utils" )
endif()

# qt assistant is in different places in every distro
if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} qt4-x11" )
elseif ( ${UNIX_DIST} MATCHES "Fedora" )
elseif ( "${UNIX_DIST}" MATCHES "Fedora" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} qt4-assistant" )
elseif ( ${UNIX_DIST} MATCHES "SUSE LINUX" )
elseif ( "${UNIX_DIST}" MATCHES "SUSE LINUX" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES} libqt4-devel-doc" )
endif ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
endif ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )

if( ${UNIX_DIST} STREQUAL "Ubuntu" )
if( "${UNIX_DIST}" MATCHES "Ubuntu" )
# common packages
set ( DEPENDS_LIST "libboost-date-time${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION},"
"libboost-regex${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION},"
Expand All @@ -229,11 +229,11 @@ if ( ENABLE_CPACK )
"libnexus0 (>= 4.3),libgsl0ldbl,libqtcore4 (>= 4.2),libqtgui4 (>= 4.2),libqt4-opengl (>= 4.2),"
"libqt4-xml (>= 4.2),libqt4-svg (>= 4.2),libqt4-qt3support (>= 4.2),qt4-dev-tools,"
"libqwt5-qt4,libqwtplot3d-qt4-0,python-numpy,python-sip,python-qt4" )
if( ${UNIX_CODENAME} STREQUAL "lucid" )
if( "${UNIX_CODENAME}" MATCHES "lucid" )
list ( APPEND DEPENDS_LIST ",libqscintilla2-5,"
"libopencascade-foundation-6.3.0 (>= 6.3.0),libopencascade-modeling-6.3.0 (>= 6.3.0),"
"libmuparser0" )
elseif( ${UNIX_CODENAME} STREQUAL "precise" )
elseif( "${UNIX_CODENAME}" MATCHES "precise" )
list ( APPEND DEPENDS_LIST ",libqscintilla2-8,"
"libopencascade-foundation-6.5.0 (>= 6.5.0),libopencascade-modeling-6.5.0 (>= 6.5.0),"
"libmuparser0debian1,"
Expand Down
13 changes: 11 additions & 2 deletions Code/Mantid/Framework/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ set ( SRC_FILES
src/FunctionProperty.cpp
src/FunctionValues.cpp
src/GridDomain.cpp
src/GridDomain1D.cpp
src/GridDomain1D.cpp
src/HistoryItem.cpp
src/HistoryView.cpp
src/IDomainCreator.cpp
src/IEventList.cpp
src/IEventWorkspace.cpp
Expand Down Expand Up @@ -103,6 +105,7 @@ set ( SRC_FILES
src/Sample.cpp
src/SampleEnvironment.cpp
src/ScopedWorkspace.cpp
src/ScriptBuilder.cpp
src/ScriptRepository.cpp
src/ScriptRepositoryFactory.cpp
src/SpectraAxis.cpp
Expand Down Expand Up @@ -177,7 +180,9 @@ set ( INC_FILES
inc/MantidAPI/FunctionProperty.h
inc/MantidAPI/FunctionValues.h
inc/MantidAPI/GridDomain.h
inc/MantidAPI/GridDomain1D.h
inc/MantidAPI/GridDomain1D.h
inc/MantidAPI/HistoryItem.h
inc/MantidAPI/HistoryView.h
inc/MantidAPI/IAlgorithm.h
inc/MantidAPI/IArchiveSearch.h
inc/MantidAPI/IBackgroundFunction.h
Expand Down Expand Up @@ -258,6 +263,7 @@ set ( INC_FILES
inc/MantidAPI/Sample.h
inc/MantidAPI/SampleEnvironment.h
inc/MantidAPI/ScopedWorkspace.h
inc/MantidAPI/ScriptBuilder.h
inc/MantidAPI/ScriptRepository.h
inc/MantidAPI/ScriptRepositoryFactory.h
inc/MantidAPI/SingleValueParameter.h
Expand Down Expand Up @@ -310,6 +316,8 @@ set ( TEST_FILES
FunctionPropertyTest.h
FunctionTest.h
FunctionValuesTest.h
HistoryItemTest.h
HistoryViewTest.h
IEventListTest.h
IFunction1DSpectrumTest.h
IFunction1DTest.h
Expand Down Expand Up @@ -345,6 +353,7 @@ set ( TEST_FILES
RunTest.h
SampleEnvironmentTest.h
SampleTest.h
ScriptBuilderTest.h
ScopedWorkspaceTest.h
SpectraAxisTest.h
SpectrumDetectorMappingTest.h
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/API/inc/MantidAPI/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag

/// get whether we are tracking the history for this algorithm,
bool trackingHistory();
/// Copy workspace history for input workspaces to output workspaces and record the history for ths algorithm
virtual void fillHistory();

/// Set to true to stop execution
bool m_cancel;
Expand Down Expand Up @@ -344,12 +346,11 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
void unlockWorkspaces();

void store();
void linkHistoryWithLastChild();

void logAlgorithmInfo() const;

bool executeAsyncImpl(const Poco::Void & i);
/// Copy workspace history for input workspaces to output workspaces and record the history for ths algorithm
void fillHistory();

// --------------------- Private Members -----------------------------------
/// Poco::ActiveMethod used to implement asynchronous execution.
Expand Down
25 changes: 18 additions & 7 deletions Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ namespace API
class IAlgorithm;
class Algorithm;
class AlgorithmHistory;


//typedefs for algorithm history pointers
typedef boost::shared_ptr<AlgorithmHistory> AlgorithmHistory_sptr;
typedef boost::shared_ptr<const AlgorithmHistory> AlgorithmHistory_const_sptr;

typedef std::set<AlgorithmHistory_sptr,
boost::function<bool(const AlgorithmHistory_const_sptr, const AlgorithmHistory_const_sptr)> > AlgorithmHistories;

Expand Down Expand Up @@ -59,6 +61,7 @@ namespace API

class MANTID_API_DLL AlgorithmHistory
{

public:
/// History container

Expand Down Expand Up @@ -89,13 +92,13 @@ class MANTID_API_DLL AlgorithmHistory
///get the execution count
const std::size_t& execCount() const {return m_execCount;}
/// get parameter list of algorithm in history const
const std::vector<Kernel::PropertyHistory>& getProperties() const {return m_properties;}
const Mantid::Kernel::PropertyHistories& getProperties() const {return m_properties;}
/// get the child histories of this history object
const AlgorithmHistories& getChildHistories() const { return m_childHistories; }
/// Retrieve a child algorithm history by index
AlgorithmHistory_const_sptr getChildAlgorithmHistory(const size_t index) const;
AlgorithmHistory_sptr getChildAlgorithmHistory(const size_t index) const;
/// Add operator[] access
AlgorithmHistory_const_sptr operator[](const size_t index) const;
AlgorithmHistory_sptr operator[](const size_t index) const;
/// Retrieve the number of child algorithms
size_t childHistorySize() const;
/// print contents of object
Expand Down Expand Up @@ -123,12 +126,20 @@ class MANTID_API_DLL AlgorithmHistory
boost::shared_ptr<IAlgorithm> getChildAlgorithm(const size_t index) const;
/// Write this history object to a nexus file
void saveNexus(::NeXus::File* file, int& algCount) const;
// Set the execution count
void setExecCount(std::size_t execCount) { m_execCount = execCount; }
/// Set data on history after it is created
void fillAlgorithmHistory(const Algorithm* const alg,
const Kernel::DateAndTime& start = Kernel::DateAndTime::defaultTime(),
const double& duration = -1.0,std::size_t uexeccount = 0);
// Allow Algorithm::execute to change the exec count & duration after the algorithm was executed
friend class Algorithm;

// Set the execution count
void setExecCount(std::size_t execCount) { m_execCount = execCount; }
private:
//private constructor
AlgorithmHistory();
// Set properties of algorithm
void setProperties(const Algorithm* const alg);
/// The name of the Algorithm
std::string m_name;
/// The version of the algorithm
Expand All @@ -138,7 +149,7 @@ class MANTID_API_DLL AlgorithmHistory
/// The execution duration of the algorithm
double m_executionDuration;
/// The PropertyHistory's defined for the algorithm
std::vector<Kernel::PropertyHistory> m_properties;
Mantid::Kernel::PropertyHistories m_properties;
///count keeps track of execution order of an algorithm
std::size_t m_execCount;
/// set of child algorithm histories for this history record
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/FrameworkManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ namespace Mantid
/// Clear memory associated with the IDS
void clearInstruments();

/// Clear memory associated with the PropertyManagers
void clearPropertyManagers();

/// Creates and instance of an algorithm
IAlgorithm* createAlgorithm(const std::string& algName, const int& version=-1);

Expand Down

0 comments on commit 74af488

Please sign in to comment.