Commit af386167 authored by COULAUD Olivier's avatar COULAUD Olivier
parents d3844968 5c1aff90
......@@ -13,14 +13,14 @@ cpu=1
STARPU_NCPUS=$cpu
STARPU_NCUDA=0
logoutput=`./Tests/Release/testBlockedUnifCudaBench -nb $SCALFMM_NB -h $SCALFMM_H -bs $SCALFMM_BS_CPU_SEQ`
logoutput=`./Tests/Release/testBlockedUniformBench -nb $SCALFMM_NB -h $SCALFMM_H -bs $SCALFMM_BS_CPU_SEQ`
if [[ $VERBOSE ]] ; then
echo $logoutput
fi
$SCALFMM_STARPU_DIR/bin/starpu_fxt_tool -i "/tmp/prof_file_"$USER"_0"
$TUTORIAL_STARPU_DIR/bin/starpu_fxt_tool -i "/tmp/prof_file_"$USER"_0"
rec_name="$SCALFMM_RES_DIR/trace-nb_$SCALFMM_NB-h_$SCALFMM_H-bs_$SCALFMM_BS_CPU_SEQ-CPU_$cpu.rec"
mv trace.rec $rec_name
python $SCALFMM_STARPU_DIR/bin/starpu_trace_state_stats.py -t $rec_name > $rec_name.time
python $TUTORIAL_STARPU_DIR/bin/starpu_trace_state_stats.py -t $rec_name > $rec_name.time
for (( cpu=1 ; cpu<=$SCALFMM_MAX_NB_CPU ; cpu++)) ; do
......@@ -29,13 +29,13 @@ for (( cpu=1 ; cpu<=$SCALFMM_MAX_NB_CPU ; cpu++)) ; do
STARPU_NCPUS=$cpu
STARPU_NCUDA=0
logoutput=`./Tests/Release/testBlockedUnifCudaBench -nb $SCALFMM_NB -h $SCALFMM_H -bs $SCALFMM_BS_CPU_PAR`
logoutput=`./Tests/Release/testBlockedUniformBench -nb $SCALFMM_NB -h $SCALFMM_H -bs $SCALFMM_BS_CPU_PAR`
if [[ $VERBOSE ]] ; then
echo $logoutput
fi
$SCALFMM_STARPU_DIR/bin/starpu_fxt_tool -i "/tmp/prof_file_"$USER"_0"
$TUTORIAL_STARPU_DIR/bin/starpu_fxt_tool -i "/tmp/prof_file_"$USER"_0"
rec_name="$SCALFMM_RES_DIR/trace-nb_$SCALFMM_NB-h_$SCALFMM_H-bs_$SCALFMM_BS_CPU_PAR-CPU_$cpu.rec"
mv trace.rec $rec_name
python $SCALFMM_STARPU_DIR/bin/starpu_trace_state_stats.py -t $rec_name > $rec_name.time
python $TUTORIAL_STARPU_DIR/bin/starpu_trace_state_stats.py -t $rec_name > $rec_name.time
done
0 granularity-eff tasks-eff runtime-eff pipeline-eff
1 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
2 9.588832e-01 9.588832e-01 9.972215e-01 9.999844e-01
3 9.984195e-01 9.984195e-01 9.992539e-01 9.999840e-01
4 9.936055e-01 9.936055e-01 9.992505e-01 9.999843e-01
5 9.859209e-01 9.859209e-01 9.991938e-01 9.999840e-01
6 9.913540e-01 9.913540e-01 9.992224e-01 9.999848e-01
7 9.980442e-01 9.980442e-01 9.993216e-01 9.999841e-01
8 9.932070e-01 9.932070e-01 9.993356e-01 9.999844e-01
9 9.953908e-01 9.953908e-01 9.993136e-01 9.999852e-01
10 9.930517e-01 9.930517e-01 9.991280e-01 9.999848e-01
11 9.937148e-01 9.937148e-01 9.992802e-01 9.999838e-01
12 9.895039e-01 9.895039e-01 9.992958e-01 9.999842e-01
13 9.934571e-01 9.934571e-01 9.992770e-01 9.999845e-01
14 9.939346e-01 9.939346e-01 9.993242e-01 9.999845e-01
15 9.929928e-01 9.929928e-01 9.993077e-01 9.999849e-01
16 9.946804e-01 9.946804e-01 9.993051e-01 9.999838e-01
17 9.959137e-01 9.959137e-01 9.992893e-01 9.999839e-01
18 9.652375e-01 9.652375e-01 9.961152e-01 9.999832e-01
19 9.937258e-01 9.937258e-01 9.992987e-01 9.999845e-01
20 9.949256e-01 9.949256e-01 9.992757e-01 9.999843e-01
21 9.886613e-01 9.886613e-01 9.992616e-01 9.999838e-01
22 9.921982e-01 9.921982e-01 9.992499e-01 9.999842e-01
23 1.001717e+00 1.001717e+00 9.992881e-01 9.999846e-01
24 9.957642e-01 9.957642e-01 9.992461e-01 9.999836e-01
......@@ -68,7 +68,7 @@ struct LineData{
}
}
if(words.size() != 4){
printf("Error line is no composed of 4 words\n");
printf("Error line is no composed of 4 words, has %lu for %s\n", words.size(), line);
exit(111);
}
name = ReduceName(words[0].substr(1, words[0].size() - 2));
......@@ -186,30 +186,32 @@ int main(int argc, char** argv){
}
while((sizeLine = getline((char**)&line, &sizeLine, timeFile)) != -1){
LineData dt(line);
// Task, Runtime, Other
if(dt.type == "Task"){
if(dt.name != "execute_on_all_wrapper"){
timeTasks[idxFile][dt.name] += dt.duration;
allTaskNames.insert(dt.name);
times[idxFile].tt += dt.duration;
if(strncmp(line, "WARNING", 7) != 0){
LineData dt(line);
// Task, Runtime, Other
if(dt.type == "Task"){
if(dt.name != "execute_on_all_wrapper"){
timeTasks[idxFile][dt.name] += dt.duration;
allTaskNames.insert(dt.name);
times[idxFile].tt += dt.duration;
}
}
}
else if(dt.type == "Runtime"){
if(dt.name == "Scheduling"
|| dt.name == "FetchingInput"
|| dt.name == "PushingOutput"){
times[idxFile].tr += dt.duration;
else if(dt.type == "Runtime"){
if(dt.name == "Scheduling"
|| dt.name == "FetchingInput"
|| dt.name == "PushingOutput"){
times[idxFile].tr += dt.duration;
}
}
}
else if(dt.type == "Other"){
if(dt.name == "Idle"){
times[idxFile].ti += dt.duration;
else if(dt.type == "Other"){
if(dt.name == "Idle"){
times[idxFile].ti += dt.duration;
}
}
else {
printf("Arg do not know type %s\n", dt.type.c_str());
//return 3;
}
}
else {
printf("Arg do not know type %s\n", dt.type.c_str());
return 3;
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,5 +6,5 @@ if [[ $# -ne 1 ]] ; then
fi
input=$(cat)
res=`echo "$input" | grep "$3" | cut -d'=' -f2 | cut -d's' -f1`
res=`echo "$input" | grep "$1" | cut -d'=' -f2 | cut -d' ' -f2`
echo $res
0 L2L M2M P2M L2P M2L-out M2L P2P-out P2P
1 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
2 9.565659e-01 9.665736e-01 1.031103e+00 1.004286e+00 9.715094e-01 9.208541e-01 9.697996e-01 9.763831e-01
3 9.263068e-01 1.024516e+00 1.029574e+00 9.889095e-01 9.937418e-01 9.954310e-01 1.001689e+00 1.000994e+00
4 1.005226e+00 1.006333e+00 1.033745e+00 1.010624e+00 9.534195e-01 9.864280e-01 9.895790e-01 9.995851e-01
5 8.615300e-01 9.844517e-01 9.938413e-01 1.009990e+00 9.569465e-01 9.791331e-01 9.887700e-01 9.975625e-01
6 8.535893e-01 9.410083e-01 1.014109e+00 1.018876e+00 9.739749e-01 9.860534e-01 9.782539e-01 9.964238e-01
7 1.046813e+00 9.975072e-01 1.037954e+00 1.003486e+00 9.786087e-01 9.933857e-01 1.004895e+00 9.965736e-01
8 9.995985e-01 1.013025e+00 9.895591e-01 1.013030e+00 9.652670e-01 9.907845e-01 1.000561e+00 9.971405e-01
9 1.039365e+00 1.013929e+00 1.047827e+00 9.852421e-01 9.711139e-01 9.898517e-01 9.980679e-01 9.993222e-01
10 9.181035e-01 9.952685e-01 1.031850e+00 1.012496e+00 9.670203e-01 9.852214e-01 9.859215e-01 9.985014e-01
11 8.717502e-01 9.889525e-01 1.028373e+00 1.011922e+00 9.699808e-01 9.888136e-01 9.826419e-01 9.981512e-01
12 9.452144e-01 1.040015e+00 1.013514e+00 9.762884e-01 9.389195e-01 9.915452e-01 9.996240e-01 9.998256e-01
13 1.022490e+00 1.021529e+00 1.014210e+00 9.896566e-01 9.668669e-01 9.898209e-01 1.011145e+00 9.991000e-01
14 9.383201e-01 9.923898e-01 1.030084e+00 1.009296e+00 9.748870e-01 9.858361e-01 1.005721e+00 9.971995e-01
15 9.387378e-01 9.986737e-01 1.032522e+00 9.967096e-01 9.675984e-01 9.877332e-01 1.003181e+00 9.974178e-01
16 9.377196e-01 9.853747e-01 1.043778e+00 1.003874e+00 9.786853e-01 9.873092e-01 1.003464e+00 9.958178e-01
17 9.293735e-01 1.034251e+00 1.038271e+00 1.003177e+00 9.700248e-01 9.915540e-01 9.899480e-01 9.984129e-01
18 9.081814e-01 9.992797e-01 1.018655e+00 9.982681e-01 9.627375e-01 9.752319e-01 9.739917e-01 9.297086e-01
19 9.471672e-01 9.763513e-01 1.026148e+00 1.013503e+00 9.656781e-01 9.868543e-01 9.891711e-01 9.992051e-01
20 9.376034e-01 1.008523e+00 1.015422e+00 9.988900e-01 9.763451e-01 9.917410e-01 1.016855e+00 9.974959e-01
21 9.649789e-01 9.941223e-01 1.023371e+00 9.720318e-01 9.427889e-01 9.864717e-01 1.011408e+00 1.001528e+00
22 8.085859e-01 1.003002e+00 1.024132e+00 1.015483e+00 9.586926e-01 9.888563e-01 9.829068e-01 9.982469e-01
23 9.843031e-01 1.009513e+00 1.041257e+00 1.012564e+00 1.009160e+00 9.949415e-01 9.970272e-01 9.964763e-01
24 9.408696e-01 9.847445e-01 1.030481e+00 9.726508e-01 9.691133e-01 9.975819e-01 1.022271e+00 1.000680e+00
0 L2L M2M P2M L2P M2L-out M2L P2P-out P2P
1 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
2 9.565659e-01 9.665736e-01 1.031103e+00 1.004286e+00 9.715094e-01 9.208541e-01 9.697996e-01 9.763831e-01
3 9.263068e-01 1.024516e+00 1.029574e+00 9.889095e-01 9.937418e-01 9.954310e-01 1.001689e+00 1.000994e+00
4 1.005226e+00 1.006333e+00 1.033745e+00 1.010624e+00 9.534195e-01 9.864280e-01 9.895790e-01 9.995851e-01
5 8.615300e-01 9.844517e-01 9.938413e-01 1.009990e+00 9.569465e-01 9.791331e-01 9.887700e-01 9.975625e-01
6 8.535893e-01 9.410083e-01 1.014109e+00 1.018876e+00 9.739749e-01 9.860534e-01 9.782539e-01 9.964238e-01
7 1.046813e+00 9.975072e-01 1.037954e+00 1.003486e+00 9.786087e-01 9.933857e-01 1.004895e+00 9.965736e-01
8 9.995985e-01 1.013025e+00 9.895591e-01 1.013030e+00 9.652670e-01 9.907845e-01 1.000561e+00 9.971405e-01
9 1.039365e+00 1.013929e+00 1.047827e+00 9.852421e-01 9.711139e-01 9.898517e-01 9.980679e-01 9.993222e-01
10 9.181035e-01 9.952685e-01 1.031850e+00 1.012496e+00 9.670203e-01 9.852214e-01 9.859215e-01 9.985014e-01
11 8.717502e-01 9.889525e-01 1.028373e+00 1.011922e+00 9.699808e-01 9.888136e-01 9.826419e-01 9.981512e-01
12 9.452144e-01 1.040015e+00 1.013514e+00 9.762884e-01 9.389195e-01 9.915452e-01 9.996240e-01 9.998256e-01
13 1.022490e+00 1.021529e+00 1.014210e+00 9.896566e-01 9.668669e-01 9.898209e-01 1.011145e+00 9.991000e-01
14 9.383201e-01 9.923898e-01 1.030084e+00 1.009296e+00 9.748870e-01 9.858361e-01 1.005721e+00 9.971995e-01
15 9.387378e-01 9.986737e-01 1.032522e+00 9.967096e-01 9.675984e-01 9.877332e-01 1.003181e+00 9.974178e-01
16 9.377196e-01 9.853747e-01 1.043778e+00 1.003874e+00 9.786853e-01 9.873092e-01 1.003464e+00 9.958178e-01
17 9.293735e-01 1.034251e+00 1.038271e+00 1.003177e+00 9.700248e-01 9.915540e-01 9.899480e-01 9.984129e-01
18 9.081814e-01 9.992797e-01 1.018655e+00 9.982681e-01 9.627375e-01 9.752319e-01 9.739917e-01 9.297086e-01
19 9.471672e-01 9.763513e-01 1.026148e+00 1.013503e+00 9.656781e-01 9.868543e-01 9.891711e-01 9.992051e-01
20 9.376034e-01 1.008523e+00 1.015422e+00 9.988900e-01 9.763451e-01 9.917410e-01 1.016855e+00 9.974959e-01
21 9.649789e-01 9.941223e-01 1.023371e+00 9.720318e-01 9.427889e-01 9.864717e-01 1.011408e+00 1.001528e+00
22 8.085859e-01 1.003002e+00 1.024132e+00 1.015483e+00 9.586926e-01 9.888563e-01 9.829068e-01 9.982469e-01
23 9.843031e-01 1.009513e+00 1.041257e+00 1.012564e+00 1.009160e+00 9.949415e-01 9.970272e-01 9.964763e-01
24 9.408696e-01 9.847445e-01 1.030481e+00 9.726508e-01 9.691133e-01 9.975819e-01 1.022271e+00 1.000680e+00
......@@ -125,10 +125,14 @@ public:
virtual void M2M(CellClass* const FRestrict cell, const CellClass*const FRestrict *const FRestrict children, const int level) {
if(kernel.m2m_full){
std::vector<void *> userCellArray;
for(int i=0 ;i<8 ; ++i){
userCellArray.push_back(children[i]->getContainer());
kernel.m2m_full(level, cell->getContainer(), userCellArray.data(), userData);
for(int idx=0 ;idx<8 ; ++idx){
if( children[idx] ){
userCellArray.push_back(children[idx]->getContainer());
}else{
userCellArray.push_back(nullptr);
}
}
kernel.m2m_full(level, cell->getContainer(), userCellArray.data(), userData);
}else{
if(kernel.m2m){
for(int idx = 0 ; idx < 8 ; ++idx){
......@@ -167,7 +171,11 @@ public:
if(kernel.l2l_full){
std::vector<void *> userCellArray;
for(int i=0 ;i<8 ; ++i){
userCellArray.push_back(children[i]->getContainer());
if(children[i]){
userCellArray.push_back(children[i]->getContainer());
}else{
userCellArray.push_back(nullptr);
}
kernel.l2l_full(level, cell->getContainer(), userCellArray.data(), userData);
}
}else{
......
......@@ -328,9 +328,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# SYMBOL_NAMESPACE "PM_"
# SYMBOLS init testPPM:init)
message(STATUS "CMAKE_CXX_COMPILER_ID STREQUAL ${CMAKE_CXX_COMPILER_ID}")
option( SCALFMM_USE_MKL_AS_BLAS "Set to ON to use MKL CBLAS" OFF )
option( SCALFMM_USE_MKL_AS_BLAS "Set to ON to use MKL BLAS/LAPACK" OFF )
option( SCALFMM_USE_ESSL_AS_BLAS "Set to ON to use ESSL BLAS/LAPACK" OFF )
if( SCALFMM_USE_MKL_AS_BLAS )
set(BLA_VENDOR "Intel10_64lp_seq")
find_package(BLASEXT QUIET) # not REQUIRED
......@@ -338,6 +339,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
if (BLAS_LIBRARIES)
set(BLASLAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif()
elseif(SCALFMM_USE_ESSL_AS_BLAS)
set(BLA_VENDOR "IBMESSL")
find_package(BLASEXT QUIET) # not REQUIRED
find_package(LAPACKEXT QUIET) # not REQUIRED
if (LAPACK_LIBRARIES)
set(BLASLAPACK_LIBRARIES "${LAPACK_LIBRARIES}")
endif()
if (BLAS_LIBRARIES)
list(APPEND BLASLAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif()
elseif(SCALFMM_USE_EXTERNAL_BLAS)
message(STATUS "BLAS SET BY EXTERNAL PROGRAM = ${BLAS_LIBRARIES}")
list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}")
......@@ -352,7 +363,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}")
endif()
endif()
if(BLAS_FOUND)
set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${BLASLAPACK_LIBRARIES}")
if(BLAS_LIBRARY_DIRS)
......@@ -363,6 +374,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${LAPACK_LIBRARY_DIRS}")
endif()
message (STATUS "check BLAS Fortran mangling")
# check blas and lapack symbols naming
set(CMAKE_REQUIRED_LIBRARIES "${BLAS_LIBRARIES}")
check_function_exists(dgemv_ DGEMV_ADD_)
......@@ -374,19 +386,19 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
message (STATUS "BLAS dgemv_ symbol found, SCALFMM_BLAS_ADD_ is ON")
else (DGEMV_ADD_)
set (SCALFMM_BLAS_ADD_ OFF)
check_function_exists(DGEMV DGEMV_UPCASE)
if (DGEMV_UPCASE)
set (SCALFMM_BLAS_UPCASE ON)
message (STATUS "BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON")
else (DGEMV_UPCASE)
# set (SCALFMM_BLAS_UPCASE OFF)
check_function_exists(DGEMV DGEMV_UPCASE)
if (DGEMV_UPCASE)
set (SCALFMM_BLAS_UPCASE ON)
message (STATUS "BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON")
else (DGEMV_UPCASE)
# set (SCALFMM_BLAS_UPCASE OFF)
check_function_exists(dgemv DGEMV_NOCHANGE)
if (DGEMV_NOCHANGE)
set (SCALFMM_BLAS_NOCHANGE ON)
message (STATUS "BLAS dgemv symbol found, SCALFMM_BLAS_NOCHANGE is ON")
# else (DGEMV_NOCHANGE)
# set (SCALFMM_BLAS_NOCHANGE OFF)
endif (DGEMV_NOCHANGE)
# else (DGEMV_NOCHANGE)
# set (SCALFMM_BLAS_NOCHANGE OFF)
endif (DGEMV_NOCHANGE)
endif (DGEMV_UPCASE)
endif (DGEMV_ADD_)
if ( (NOT DGEMV_ADD_) AND (NOT DGEMV_UPCASE) AND (NOT DGEMV_NOCHANGE) )
......@@ -403,88 +415,59 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
#
# FFT option
#
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_MKL_AS_FFTW "Set to ON to use MKL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS" OFF )
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_MKL_AS_FFTW "Set to ON to use MKL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS" OFF )
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_ESSL_AS_FFTW "Set to ON to use ESSL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_ESSL_AS_BLAS" OFF )
if( SCALFMM_USE_FFT )
message(STATUS "SCALFMM USE FFT Configure:")
# The package find_package(FFTW) can be used with the following COMPONENTS:
# MKL, ESSL, THREADS|OMP and/or SIMPLE|LONG|QUAD
# Default will find the real double precision fftw library version without THREADS|OMP
if( SCALFMM_USE_MKL_AS_FFTW )
message(STATUS " SCALFMM USE FFT from MKL")
find_package(FFTW COMPONENTS MKL)
elseif (SCALFMM_USE_ESSL_AS_FFTW)
message(STATUS " SCALFMM USE FFT from ESSL ")
find_package(FFTW COMPONENTS ESSL)
add_definitions(-DSCALFMM_USE_ESSL_AS_FFTW)
else()
message(STATUS " SCALFMM USE FFTW")
find_package(FFTW COMPONENTS SIMPLE)
endif()
message(STATUS " SCALFMM USE MKL ")
if( SCALFMM_USE_MKL_AS_BLAS )
unset(FFT_LIBRARIES CACHE)
message(STATUS " SCALFMM USE MKL already defined")
set(FFT_INCLUDES "$ENV{MKLROOT}/include/fftw" CACHE STRING "Set your MKL flags")
if (BLAS_FOUND)
set(FFTW_FOUND ON)
endif()
else(SCALFMM_USE_MKL_AS_BLAS)
# The package can be used with the following COMPONENTS:
# MKL, THREADS|OMP and/or SIMPLE|DOUBLE|LONG|QUAD
# Default is DOUBLE and without THREADS|OMP
find_package(FFTW COMPONENTS MKL) # not REQUIRED
if (FFTW_LIBRARY_DIRS_DEP)
set(FFT_LIBRARIES "-L${FFTW_LIBRARY_DIRS_DEP};" CACHE STRING "Set your MKL flags")
endif()
if (FFTW_LIBRARIES_DEP)
foreach (fft_lib ${FFTW_LIBRARIES_DEP})
set(FFT_LIBRARIES "${FFT_LIBRARIES};${fft_lib};")
endforeach()
endif()
set(FFT_INCLUDES "${FFTW_INCLUDE_DIRS_DEP}" )
if (FFT_LIBRARIES)
set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${FFT_LIBRARIES}")
endif()
endif(SCALFMM_USE_MKL_AS_BLAS)
else(SCALFMM_USE_MKL_AS_FFTW)
message(STATUS " SCALFMM USE FFTW ")
# The package can be used with the following COMPONENTS:
# MKL, THREADS|OMP and/or SIMPLE|DOUBLE|LONG|QUAD
# Default is DOUBLE and without THREADS|OMP
find_package(FFTW COMPONENTS SIMPLE) # not REQUIRED
if (FFTW_LIBRARY_DIRS_DEP)
set(FFT_LIBRARIES "-L${FFTW_LIBRARY_DIRS_DEP};" CACHE STRING "Set your FFTW path")
endif()
if (FFTW_LIBRARIES_DEP)
foreach (fft_lib ${FFTW_LIBRARIES_DEP})
set(FFT_LIBRARIES "${FFT_LIBRARIES};${fft_lib};")
endforeach()
endif()
set(FFT_INCLUDES "${FFTW_INCLUDE_DIRS_DEP}" )
if (FFT_LIBRARIES)
set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${FFT_LIBRARIES}")
endif()
if(FFTW_LIBRARY_DIRS)
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${FFTW_LIBRARY_DIRS}")
endif()
if (FFTW_LIBRARY_DIRS_DEP)
set(FFT_LIBRARIES "-L${FFTW_LIBRARY_DIRS_DEP};" CACHE STRING "Set your MKL flags")
endif()
if (FFTW_LIBRARIES_DEP)
foreach (fft_lib ${FFTW_LIBRARIES_DEP})
set(FFT_LIBRARIES "${FFT_LIBRARIES};${fft_lib};")
endforeach()
endif()
endif(SCALFMM_USE_MKL_AS_FFTW)
set(FFT_INCLUDES "${FFTW_INCLUDE_DIRS_DEP}" )
if (FFT_LIBRARIES)
set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${FFT_LIBRARIES}")
endif()
if(FFTW_LIBRARY_DIRS)
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${FFTW_LIBRARY_DIRS}")
endif()
if (FFT_INCLUDES)
set(SCALFMM_INCLUDES "${SCALFMM_INCLUDES}; ${FFT_INCLUDES}")
endif()
if(FFTW_FOUND)
message(STATUS " SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
message(STATUS " SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
else()
if(NOT FFTW_FOUND)
message(WARNING "FFTW has not been found, SCALFMM will continue to compile but some applications will be disabled.")
message(WARNING "If you have FFTW set FFTW_LIBDIR, FFTW_INCDIR or FFTW_DIR (CMake variables using -D or environment variables).")
set(SCALFMM_USE_FFT OFF)
endif()
endif(SCALFMM_USE_FFT)
list(APPEND FUSE_LIST "FFT")
message(STATUS " SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
message(STATUS " SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
message(STATUS "SCALFMM_USE_FFT = ${SCALFMM_USE_FFT}")
list(REMOVE_DUPLICATES SCALFMM_INCLUDES)
list(REMOVE_DUPLICATES SCALFMM_LIBRARIES)
#
# C++ 2011
......@@ -788,7 +771,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set(SCALFMM_COMPILE_LIBS "")
foreach(lib_var ${SCALFMM_LIBRARIES})
string(STRIP ${lib_var} lib_var)
LIST(APPEND SCALFMM_COMPILE_LIBS ${lib_var})
LIST(APPEND SCALFMM_COMPILE_LIBS ${lib_var})
endforeach()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Src/ScalFmmConfig.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/Src/ScalFmmConfig.h )
......
This diff is collapsed.
......@@ -43,13 +43,25 @@
# add a cache variable to let the user specify the BLAS vendor
set(BLA_VENDOR "" CACHE STRING "list of possible BLAS vendor:
Open, Eigen, Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
Open, Eigen, Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT,
Intel10_32 (intel mkl v10 32 bit),
Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),
Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),
Intel( older versions of mkl 32 and 64 bit),
ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "In FindBLASEXT")
message(STATUS "If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure.")
message(STATUS "List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, IBMESSLMT, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
endif()
if (NOT BLAS_FOUND)
# First try to detect two cases:
......@@ -75,34 +87,24 @@ if(BLA_VENDOR STREQUAL "All" AND
endif()
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
"have also potentially detected some BLAS libraries from the MKL."
"We try to use this one.")
message(STATUS "If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure.")
message(STATUS "List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
"have also potentially detected some multithreaded BLAS libraries from the MKL."
"We try to find both libraries lists (Sequential/Multithreaded).")
endif()
set(BLAS_FOUND "")
elseif(BLA_VENDOR STREQUAL "All" AND BLAS_acml_LIBRARY)
set(BLA_VENDOR "ACML")
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
"have also potentially detected some BLAS libraries from the ACML."
"We try to use this one.")
message(STATUS "If you want to force the use of one specific library, "
"please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
"at cmake configure.")
message(STATUS "List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
"DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
"Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
"Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
"Intel( older versions of mkl 32 and 64 bit),"
"ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
"have also potentially detected some multithreaded BLAS libraries from the ACML."
"We try to find both libraries lists (Sequential/Multithreaded).")
endif()
set(BLAS_FOUND "")
elseif(BLA_VENDOR STREQUAL "All" AND BLAS_essl_LIBRARY)
set(BLA_VENDOR "IBMESSL")
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
"have also potentially detected some multithreaded BLAS libraries from the ESSL."
"We try to find both libraries lists (Sequential/Multithreaded).")
endif()
set(BLAS_FOUND "")
endif()
......@@ -238,6 +240,35 @@ elseif(BLA_VENDOR MATCHES "ACML*")
set(BLAS_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES-NOTFOUND}")
endif()
# IBMESSL case
elseif(BLA_VENDOR MATCHES "IBMESSL*")
## look for the sequential version
set(BLA_VENDOR "IBMESSL")
if(BLASEXT_FIND_REQUIRED)
find_package(BLAS REQUIRED)
else()
find_package(BLAS)
endif()
if(BLAS_FOUND)
set(BLAS_SEQ_LIBRARIES "${BLAS_LIBRARIES}")
else()
set(BLAS_SEQ_LIBRARIES "${BLAS_SEQ_LIBRARIES-NOTFOUND}")
endif()
## look for the multithreaded version
set(BLA_VENDOR "IBMESSLMT")
if(BLASEXT_FIND_REQUIRED)
find_package(BLAS REQUIRED)
else(BLAS_FOUND)
find_package(BLAS)
endif()
if(BLAS_FOUND)
set(BLAS_PAR_LIBRARIES "${BLAS_LIBRARIES}")
else()
set(BLAS_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES-NOTFOUND}")
endif()
else()
if(BLAS_FOUND)
......@@ -254,7 +285,6 @@ endif()
if(BLAS_SEQ_LIBRARIES)
set(BLAS_LIBRARIES "${BLAS_SEQ_LIBRARIES}")
endif()
# message("DEBUG BLAS: ${BLAS_SEQ_LIBRARIES} ${BLAS_LIBRARIES}")
# extract libs paths
# remark: because it is not given by find_package(BLAS)
......@@ -275,15 +305,6 @@ if (BLAS_LIBRARY_DIRS)
list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS)
endif ()
# message(STATUS "BLAS_FOUND: ${BLAS_FOUND}")
# message(STATUS "BLA_VENDOR: ${BLA_VENDOR}")
# message(STATUS "BLAS_LIBRARIES: ${BLAS_LIBRARIES}")
# message(STATUS "BLAS_SEQ_LIBRARIES: ${BLAS_SEQ_LIBRARIES}")
# message(STATUS "BLAS_PAR_LIBRARIES: ${BLAS_PAR_LIBRARIES}")
# message(STATUS "BLAS_INCLUDE_DIRS: ${BLAS_INCLUDE_DIRS}")
# message(STATUS "BLAS_LIBRARY_DIRS: ${BLAS_LIBRARY_DIRS}")
# check that BLAS has been found
# ---------------------------------
include(FindPackageHandleStandardArgs)
......@@ -324,8 +345,24 @@ elseif(BLA_VENDOR MATCHES "ACML*")
endif()
find_package_handle_standard_args(BLAS DEFAULT_MSG
BLAS_SEQ_LIBRARIES
BLAS_LIBRARY_DIRS
BLAS_INCLUDE_DIRS)
BLAS_LIBRARY_DIRS)
if(BLAS_PAR_LIBRARIES)
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES")
endif()
find_package_handle_standard_args(BLAS DEFAULT_MSG
BLAS_PAR_LIBRARIES)
endif()
elseif(BLA_VENDOR MATCHES "IBMESSL*")
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "BLAS found is ESSL:"
"we manage two lists of libs,"
" one sequential and one parallel if found (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)")
message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES")
endif()
find_package_handle_standard_args(BLAS DEFAULT_MSG
BLAS_SEQ_LIBRARIES
BLAS_LIBRARY_DIRS)
if(BLAS_PAR_LIBRARIES)
if(NOT BLASEXT_FIND_QUIETLY)
message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES")
......