Commit 74616e26 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

Branching from branches/new_magmamorse to trunk/chameleon at 2005

parent 0eddec2c
;; C style for Emacs, to assist in following DAGuE coding conventions (originally from PETSc project)
((nil . ((indent-tabs-mode . nil)
(tab-width . 8)
(show-trailing-whitespace . t)))
(c-mode . ((c-tab-always-indent . t)
(c-basic-offset . 4)
(c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((substatement-open after)
(brace-list-open after)
(brace-entry-open)
(defun-open after)
(class-open after)
(inline-open after)
(block-open after)
(block-close . c-snug-do-while)
(statement-case-open after)
(substatement after)))
(c-hanging-colons-alist . ((member-init-intro before)
(inher-intro)
(case-label after)
(label after)
(access-label after)))
(c-hanging-semi&comma-criteria . (c-semi&comma-no-newlines-before-nonblanks))
(c-cleanup-list . (scope-operator
brace-else-brace
brace-elseif-brace
brace-catch-brace
empty-defun-braces
list-close-comma
defun-close-semi))
(c-offsets-alist . ((inexpr-class . +)
(inexpr-statement . +)
(lambda-intro-cont . +)
(inlambda . c-lineup-inexpr-block)
(template-args-cont c-lineup-template-args +)
(incomposition . +)
(inmodule . +)
(innamespace . +)
(inextern-lang . +)
(composition-close . 0)
(module-close . 0)
(namespace-close . 0)
(extern-lang-close . 0)
(composition-open . 0)
(module-open . 0)
(namespace-open . 0)
(extern-lang-open . 0)
(objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +)
(objc-method-args-cont . c-lineup-ObjC-method-args)
(objc-method-intro .
[0])
(friend . 0)
(cpp-define-intro c-lineup-cpp-define +)
(cpp-macro-cont . +)
(cpp-macro .
[0])
(inclass . +)
(stream-op . c-lineup-streamop)
(arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist)
(arglist-cont c-lineup-gcc-asm-reg 0)
(arglist-intro . +)
(catch-clause . 0)
(else-clause . 0)
(do-while-closure . 0)
(label . 2)
(access-label . -)
(substatement-label . 2)
(substatement . +)
(statement-case-open . 0)
(statement-case-intro . +)
(statement-block-intro . +)
(statement-cont . +)
(statement . 0)
(brace-entry-open . 0)
(brace-list-entry . 0)
(brace-list-intro . +)
(brace-list-close . 0)
(brace-list-open . 0)
(block-close . 0)
(inher-cont . c-lineup-multi-inher)
(inher-intro . +)
(member-init-cont . c-lineup-multi-inher)
(member-init-intro . +)
(annotation-var-cont . +)
(annotation-top-cont . 0)
(topmost-intro-cont . c-lineup-topmost-intro-cont)
(topmost-intro . 0)
(knr-argdecl . 0)
(func-decl-cont . +)
(inline-close . 0)
(inline-open . +)
(class-close . 0)
(class-open . 0)
(defun-block-intro . +)
(defun-close . 0)
(defun-open . 0)
(string . c-lineup-dont-change)
(arglist-close . c-lineup-arglist)
(substatement-open . 0)
(case-label . 0)
(block-open . 0)
(c . 1)
(comment-intro . 0)
(knr-argdecl-intro . -)))
(fill-column . 80))))
This diff is collapsed.
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "Morse-Magma")
set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.inria.fr")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Morse-Magma")
set(CTEST_DROP_SITE_CDASH TRUE)
#--------------------------------------------------------------------
# BUILDNAME variable construction
# This variable will be used to set the build name which will appear
# on the Morse-Magma dashboard http://cdash.inria.fr/CDash/
#--------------------------------------------------------------------
# Start with the short system name, e.g. "Linux", "FreeBSD" or "Windows"
if(NOT BUILDNAME)
set(BUILDNAME "${CMAKE_SYSTEM_NAME}")
# Add i386 or amd64
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BUILDNAME "${BUILDNAME}-amd64")
else()
set(BUILDNAME "${BUILDNAME}-i386")
endif()
# Add compiler name
get_filename_component(CMAKE_C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
set(BUILDNAME "${BUILDNAME}-${CMAKE_C_COMPILER_NAME}")
# Add the build type, e.g. "Debug, Release..."
if(CMAKE_BUILD_TYPE)
set(BUILDNAME "${BUILDNAME}-${CMAKE_BUILD_TYPE}")
endif(CMAKE_BUILD_TYPE)
# Specific options of Magma-Morse
if(MAGMAMORSE_SCHED_QUARK)
set(BUILDNAME "${BUILDNAME}-Quark")
endif(MAGMAMORSE_SCHED_QUARK)
if(MAGMAMORSE_SCHED_STARPU)
set(BUILDNAME "${BUILDNAME}-StarPU")
endif(MAGMAMORSE_SCHED_STARPU)
if(MAGMAMORSE_USE_MPI)
set(BUILDNAME "${BUILDNAME}-mpi")
endif(MAGMAMORSE_USE_MPI)
if(MAGMAMORSE_USE_CUDA)
set(BUILDNAME "${BUILDNAME}-cuda")
endif(MAGMAMORSE_USE_CUDA)
endif()
**********************************************
Some instructions about MagmaMorse usage
**********************************************
Compilation of MagmaMorse libraries and executables are done with CMake
(http://www.cmake.org/). This version has been tested with CMake 2.8.8.
Usage: three steps are required to compile and install MagmaMorse
1) configure :
> cmake path/to/magmamorse -DOPTION1= -DOPTION2= ...
see the "Options" section to get list of options
see the "Dependencies detection" for details about libraries detection
2) build :
> make
do not hesitate to use -j[ncores] option to speedup the compilation
3) install (optional) :
> make install
do not forget to specify the install directory with -DCMAKE_INSTALL_PREFIX at configure
example : cmake /home/toto/magmamorse -DCMAKE_INSTALL_PREFIX=/home/toto/install
-------------------------------------------
* List of libraries MagmaMorse depends on *
-------------------------------------------
threads : pthread
blas : refblas (http://www.netlib.org/blas/) or intel mkl
cblas : refblas (http://www.netlib.org/blas/#_cblas) or intel mkl
lapack : refblas (http://www.netlib.org/lapack/) or intel mkl
lapacke : refblas (http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack)
or the lapacke compiled in PLASMA project (http://icl.cs.utk.edu/plasma/)
tmg : refblas (contained in lapack) or intel mkl
runtime : quark (http://icl.cs.utk.edu/quark/) or
starpu (http://runtime.bordeaux.inria.fr/StarPU/)
hwloc : (http://www.open-mpi.org/projects/hwloc/)
optional libraries
cuda : (https://developer.nvidia.com/cuda-downloads)
cublas : comes with cuda (http://docs.nvidia.com/cuda/cublas/)
magma : (http://icl.cs.utk.edu/magma/)
mpi : openmpi (http://www.open-mpi.org/)
FxT : linux package (libfxt) or releases here http://download.savannah.gnu.org/releases/fkt/
-----------------------------------------
-------------------------------------------
* Dependencies detection *
-------------------------------------------
You have different choices to detect dependencies on your system, either by
setting some environment variables containing paths to the libs and headers or
by specifying them directly at cmake configure. Different cases :
1) detection of dependencies through environment variables:
- LD_LIBRARY_PATH should contain the list of paths where to find the libraries:
* export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:install/path/to/your/lib
- INCLUDE should contain the list of paths where to find the header files of libraries
* export INCLUDE=$INCLUDE:install/path/to/your/headers
2) detection with user's given paths:
- you can specify the path at cmake configure by invoking
cmake path/to/your/CMakeLists.txt -DLIB_DIR=path/to/your/lib
where LIB stands for the name of the lib to look for
* example: cmake path/to/your/CMakeLists.txt -DSTARPU_DIR=path/to/starpudir \
-DCBLAS_DIR= ...
it is also possible to specify headers and library directories separately
* example: cmake path/to/your/CMakeLists.txt -DSTARPU_INCDIR=path/to/libstarpu/include/starpu/1.1 \
-DSTARPU_LIBDIR=path/to/libstarpu/lib
- note: BLAS and LAPACK detection can be tedious so that we provide a verbose mode
you can set -DBLAS_VERBOSE=ON or -DLAPACK_VERBOSE=ON to activate it
-------------------------------------------
* Options *
-------------------------------------------
You can optionally activate some options at cmake configure (like CUDA, MPI, ...)
invoking cmake path/to/your/CMakeLists.txt -DOPTION1= -DOPTION2= ...
example: cmake /home/toto/magmamorse/ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/home/toto/install/ \
-DMAGMAMORSE_USE_CUDA=ON \
-DMAGMAMORSE_USE_MAGMA=ON \
-DMAGMAMORSE_USE_MPI=ON \
-DBLA_VENDOR=Intel10_64lp \
-DSTARPU_DIR=/home/toto/install/starpu-1.1/build/include/starpu/1.1/ \
-DMAGMAMORSE_USE_FXT=ON
You can get the full list of options with -L[A][H] options of cmake command
example: cmake -LH /home/toto/magmamorse/
You can also set the options thanks to ccmake interface
Some options (non-exhaustive list) :
------------------------------------
Basic CMake:
------------
CMAKE_BUILD_TYPE=Debug|Release
CMAKE_INSTALL_PREFIX=path/to/your/install/dir (where headers and libraries will be copied
when invoking make install)
Related to specific modules (find_package):
------------------------------------------
BLA_VENDOR=Intel10_64lp (to use intel mkl for example, see the list of BLA_VENDOR in FindBLAS.cmake in cmake_modules/morse/find)
# for the following, see section "Dependencies detection"
STARPU_DIR=...
STARPU_INCDIR=...
STARPU_LIBDIR=...
# same idea can be used for some packages, replace STARPU by one of these:
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - MAGMA - QUARK - TMG
MagmaMorse specific:
--------------------
MAGMAMORSE_USE_MPI=ON|OFF (default OFF)
MAGMAMORSE_USE_CUDA=ON|OFF (default OFF)
MAGMAMORSE_USE_MAGMA=ON|OFF (default OFF)
MAGMAMORSE_USE_FXT=ON|OFF (default OFF)
MAGMAMORSE_SCHED_STARPU=ON|OFF (default ON)
MAGMAMORSE_SCHED_QUARK=ON|OFF (default OFF)
MAGMAMORSE_SIMULATION=ON|OFF (default OFF)
Libraries detected with an official cmake module (see module files in CMAKE_ROOT/Modules/):
CUDA - MPI - Threads
Libraries detected with our cmake modules (see module files in cmake_modules/morse/find/ directory of MagmaMorse sources):
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - MAGMA - QUARK - STARPU - TMG
-------------------------------------------
* Use FxT profiling through StarPU *
-------------------------------------------
StarPU can generate its own trace log files by compiling it with the --with-fxt
option at the configure step (you can have to specify the directory where you
installed FxT by giving --with-fxt=... instead of --with-fxt alone).
By doing so, traces are generated after each execution of a program which uses
StarPU in the directory pointed by the STARPU_FXT_PREFIX environment variable.
example: export STARPU_FXT_PREFIX=/home/toto/fxt_files/
When executing a ./timing/... MagmaMorse program, if it has been enabled
(StarPU compiled with FxT and -DMAGMAMORSE_USE_FXT=ON), you can give the option --trace
to tell the program to generate trace log files.
Finally, to generate the trace file which can be opened with Vite program
(http://vite.gforge.inria.fr/), you have to use the starpu_fxt_tool tool of StarPU.
This tool should be in $STARPU_INSTALL_REPOSITORY/bin.
You can use it to generate the trace file like this:
> path/to/your/install/starpu/bin/starpu_fxt_tool -i prof_filename
There is one file per mpi processus (prof_filename_0, prof_filename_1 ...).
To generate a trace of mpi programs you can call it like this:
> path/to/your/install/starpu/bin/starpu_fxt_tool -i prof_filename*
The trace file will be named paje.trace (use -o option to specify an output name).
-------------------------------------------
* Use simulation mode with StarPU-SimGrid *
-------------------------------------------
Simulation mode can be activated by setting the cmake option MAGMAMORSE_SIMULATION to ON.
This mode allows you to simulate execution of algorithms with StarPU compiled with SimGrid (http://simgrid.gforge.inria.fr/).
To do so, we provide some perfmodels in the simucore/perfmodels/ directory of MagmaMorse sources.
To use these perfmodels, please set your STARPU_HOME environment variable to path/to/your/magmamorse_sources/simucore/perfmodels.
Finally, you need to set your STARPU_HOSTNAME environment variable to the name of the machine to simulate.
For example: STARPU_HOSTNAME=mirage.
Note that only POTRF kernels with block sizes of 320 or 960 (simple and double precision) on mirage machine are available for now.
Database of models is subject to change, it should be enrich in a near future.
###
#
# -- Inria
# -- (C) Copyright 2012
#
# This software is a computer program whose purpose is to process
# Matrices Over Runtime Systems @ Exascale (MORSE). More information
# can be found on the following website: http://www.inria.fr/en/teams/morse.
#
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL-C
# license as circulated by CEA, CNRS and INRIA at the following URL
# "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL-C license and that you accept its terms.
#
###
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 IPB. All rights reserved.
#
###
#
# @file GenPkgConfig.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.1.0
# @author Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 10-11-2014
#
###
###
#
# GENERATE_PKGCONFIG_FILE: generate a file .pc according to the options
#
###
MACRO(GENERATE_PKGCONFIG_FILE _file)
# The link flags specific to this package and any required libraries
# that don't support PkgConfig
set(MAGMAMORSE_PKGCONFIG_LIBS "")
# The link flags for private libraries required by this package but not
# exposed to applications
set(MAGMAMORSE_PKGCONFIG_LIBS_PRIVATE "")
# A list of packages required by this package
set(MAGMAMORSE_PKGCONFIG_REQUIRED "")
# A list of private packages required by this package but not exposed to
# applications
set(MAGMAMORSE_PKGCONFIG_REQUIRED_PRIVATE "")
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS -lmagmamorse)
if(MAGMAMORSE_SCHED_STARPU)
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS -lmagmamorse_starpu)
if ( MAGMAMORSE_USE_MPI )
list(APPEND MAGMAMORSE_PKGCONFIG_REQUIRED
starpumpi-${MAGMAMORSE_STARPU_VERSION})
else()
list(APPEND MAGMAMORSE_PKGCONFIG_REQUIRED
starpu-${MAGMAMORSE_STARPU_VERSION})
endif()
elseif(MAGMAMORSE_SCHED_QUARK)
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS -lmagmamorse_quark)
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS -lquark)
endif()
if(NOT MAGMAMORSE_SIMULATION)
if(MAGMAMORSE_USE_CUDA)
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS ${CUDA_LIBRARIES})
endif()
if(MAGMAMORSE_USE_MAGMA)
list(APPEND MAGMAMORSE_PKGCONFIG_REQUIRED magma)
endif()
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS
-lcoreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
list(APPEND MAGMAMORSE_PKGCONFIG_REQUIRED hwloc)
else(NOT MAGMAMORSE_SIMULATION)
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS
-lcoreblas
-lsimulapacke
-lsimucblas
${EXTRA_LIBRARIES}
)
list(APPEND MAGMAMORSE_PKGCONFIG_REQUIRED hwloc)
endif(NOT MAGMAMORSE_SIMULATION)
list(REMOVE_DUPLICATES MAGMAMORSE_PKGCONFIG_LIBS)
list(REMOVE_DUPLICATES MAGMAMORSE_PKGCONFIG_LIBS_PRIVATE)
list(REMOVE_DUPLICATES MAGMAMORSE_PKGCONFIG_REQUIRED)
list(REMOVE_DUPLICATES MAGMAMORSE_PKGCONFIG_REQUIRED_PRIVATE)
# Define required package
# -----------------------
set(MAGMAMORSE_PKGCONFIG_LIBS_CPY "${MAGMAMORSE_PKGCONFIG_LIBS}")
set(MAGMAMORSE_PKGCONFIG_LIBS "")
foreach(_dep ${MAGMAMORSE_PKGCONFIG_LIBS_CPY})
get_filename_component(dep_we ${_dep} NAME)
STRING(REPLACE "lib" "-l" dep_we "${dep_we}")
STRING(REPLACE ".so" "" dep_we "${dep_we}")
STRING(REPLACE ".a" "" dep_we "${dep_we}")
STRING(REPLACE ".dylib" "" dep_we "${dep_we}")
STRING(REPLACE ".dll" "" dep_we "${dep_we}")
list(APPEND MAGMAMORSE_PKGCONFIG_LIBS ${dep_we})
endforeach()
STRING(REPLACE ";" " " MAGMAMORSE_PKGCONFIG_LIBS "${MAGMAMORSE_PKGCONFIG_LIBS}")
STRING(REPLACE ";" " " MAGMAMORSE_PKGCONFIG_LIBS_PRIVATE "${MAGMAMORSE_PKGCONFIG_LIBS_PRIVATE}")
STRING(REPLACE ";" " " MAGMAMORSE_PKGCONFIG_REQUIRED "${MAGMAMORSE_PKGCONFIG_REQUIRED}")
STRING(REPLACE ";" " " MAGMAMORSE_PKGCONFIG_REQUIRED_PRIVATE "${MAGMAMORSE_PKGCONFIG_REQUIRED_PRIVATE}")
# Create .pc file
# ---------------
GET_FILENAME_COMPONENT(_output_file ${_file} NAME)
STRING(REPLACE ".in" "" _output_file "${_output_file}")
SET(_output_file "${CMAKE_BINARY_DIR}/${_output_file}")
# TODO: add url of MORSE releases in .pc file
CONFIGURE_FILE("${_file}" "${_output_file}" @ONLY)
# installation
# ------------
INSTALL(FILES ${_output_file} DESTINATION lib/pkgconfig)
ENDMACRO(GENERATE_PKGCONFIG_FILE)
##
## @end file GenPkgConfig.cmake
##
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 IPB. All rights reserved.
#
###
#
# @file MorseInit.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 1.1.0
# @author Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 13-07-2012
#
###
# This include is required to check symbols of libs in the main CMakeLists.txt
include(CheckFunctionExists)
# Add the path where we handle our FindFOO.cmake to seek for liraries
list(APPEND CMAKE_MODULE_PATH ${MORSE_CMAKE_MODULE_PATH}/find)
# Set some colors
if(NOT WIN32)
string(ASCII 27 Esc)
set(ColourReset "${Esc}[m")
set(ColourBold "${Esc}[1m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(Blue "${Esc}[34m")
set(Magenta "${Esc}[35m")
set(Cyan "${Esc}[36m")
set(White "${Esc}[37m")
set(BoldRed "${Esc}[1;31m")
set(BoldGreen "${Esc}[1;32m")
set(BoldYellow "${Esc}[1;33m")
set(BoldBlue "${Esc}[1;34m")
set(BoldMagenta "${Esc}[1;35m")
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()
# Colorize cmake messages during configure
function(message)
list(GET ARGV 0 MessageType)
if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR)
list(REMOVE_AT ARGV 0)
string (REPLACE ";" " " ARGV_STR "${ARGV}")
_message(${MessageType} "${BoldRed}${ARGV_STR}${ColourReset}")
elseif(MessageType STREQUAL WARNING)