Commit af386167 authored by COULAUD Olivier's avatar COULAUD Olivier
parents d3844968 5c1aff90
...@@ -13,14 +13,14 @@ cpu=1 ...@@ -13,14 +13,14 @@ cpu=1
STARPU_NCPUS=$cpu STARPU_NCPUS=$cpu
STARPU_NCUDA=0 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 if [[ $VERBOSE ]] ; then
echo $logoutput echo $logoutput
fi 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" 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 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 for (( cpu=1 ; cpu<=$SCALFMM_MAX_NB_CPU ; cpu++)) ; do
...@@ -29,13 +29,13 @@ 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_NCPUS=$cpu
STARPU_NCUDA=0 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 if [[ $VERBOSE ]] ; then
echo $logoutput echo $logoutput
fi 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" 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 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 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{ ...@@ -68,7 +68,7 @@ struct LineData{
} }
} }
if(words.size() != 4){ 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); exit(111);
} }
name = ReduceName(words[0].substr(1, words[0].size() - 2)); name = ReduceName(words[0].substr(1, words[0].size() - 2));
...@@ -186,30 +186,32 @@ int main(int argc, char** argv){ ...@@ -186,30 +186,32 @@ int main(int argc, char** argv){
} }
while((sizeLine = getline((char**)&line, &sizeLine, timeFile)) != -1){ while((sizeLine = getline((char**)&line, &sizeLine, timeFile)) != -1){
LineData dt(line); if(strncmp(line, "WARNING", 7) != 0){
// Task, Runtime, Other LineData dt(line);
if(dt.type == "Task"){ // Task, Runtime, Other
if(dt.name != "execute_on_all_wrapper"){ if(dt.type == "Task"){
timeTasks[idxFile][dt.name] += dt.duration; if(dt.name != "execute_on_all_wrapper"){
allTaskNames.insert(dt.name); timeTasks[idxFile][dt.name] += dt.duration;
times[idxFile].tt += dt.duration; allTaskNames.insert(dt.name);
times[idxFile].tt += dt.duration;
}
} }
} else if(dt.type == "Runtime"){
else if(dt.type == "Runtime"){ if(dt.name == "Scheduling"
if(dt.name == "Scheduling" || dt.name == "FetchingInput"
|| dt.name == "FetchingInput" || dt.name == "PushingOutput"){
|| dt.name == "PushingOutput"){ times[idxFile].tr += dt.duration;
times[idxFile].tr += dt.duration; }
} }
} else if(dt.type == "Other"){
else if(dt.type == "Other"){ if(dt.name == "Idle"){
if(dt.name == "Idle"){ times[idxFile].ti += dt.duration;
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 ...@@ -6,5 +6,5 @@ if [[ $# -ne 1 ]] ; then
fi fi
input=$(cat) 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 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: ...@@ -125,10 +125,14 @@ public:
virtual void M2M(CellClass* const FRestrict cell, const CellClass*const FRestrict *const FRestrict children, const int level) { virtual void M2M(CellClass* const FRestrict cell, const CellClass*const FRestrict *const FRestrict children, const int level) {
if(kernel.m2m_full){ if(kernel.m2m_full){
std::vector<void *> userCellArray; std::vector<void *> userCellArray;
for(int i=0 ;i<8 ; ++i){ for(int idx=0 ;idx<8 ; ++idx){
userCellArray.push_back(children[i]->getContainer()); if( children[idx] ){
kernel.m2m_full(level, cell->getContainer(), userCellArray.data(), userData); userCellArray.push_back(children[idx]->getContainer());
}else{
userCellArray.push_back(nullptr);
}
} }
kernel.m2m_full(level, cell->getContainer(), userCellArray.data(), userData);
}else{ }else{
if(kernel.m2m){ if(kernel.m2m){
for(int idx = 0 ; idx < 8 ; ++idx){ for(int idx = 0 ; idx < 8 ; ++idx){
...@@ -167,7 +171,11 @@ public: ...@@ -167,7 +171,11 @@ public:
if(kernel.l2l_full){ if(kernel.l2l_full){
std::vector<void *> userCellArray; std::vector<void *> userCellArray;
for(int i=0 ;i<8 ; ++i){ 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); kernel.l2l_full(level, cell->getContainer(), userCellArray.data(), userData);
} }
}else{ }else{
......
...@@ -328,9 +328,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -328,9 +328,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# SYMBOL_NAMESPACE "PM_" # SYMBOL_NAMESPACE "PM_"
# SYMBOLS init testPPM:init) # SYMBOLS init testPPM:init)
message(STATUS "CMAKE_CXX_COMPILER_ID STREQUAL ${CMAKE_CXX_COMPILER_ID}") 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 ) if( SCALFMM_USE_MKL_AS_BLAS )
set(BLA_VENDOR "Intel10_64lp_seq") set(BLA_VENDOR "Intel10_64lp_seq")
find_package(BLASEXT QUIET) # not REQUIRED find_package(BLASEXT QUIET) # not REQUIRED
...@@ -338,6 +339,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -338,6 +339,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
if (BLAS_LIBRARIES) if (BLAS_LIBRARIES)
set(BLASLAPACK_LIBRARIES ${BLAS_LIBRARIES}) set(BLASLAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif() 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) elseif(SCALFMM_USE_EXTERNAL_BLAS)
message(STATUS "BLAS SET BY EXTERNAL PROGRAM = ${BLAS_LIBRARIES}") message(STATUS "BLAS SET BY EXTERNAL PROGRAM = ${BLAS_LIBRARIES}")
list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}") list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}")
...@@ -352,7 +363,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -352,7 +363,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}") list(APPEND BLASLAPACK_LIBRARIES "${BLAS_LIBRARIES}")
endif() endif()
endif() endif()
if(BLAS_FOUND) if(BLAS_FOUND)
set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${BLASLAPACK_LIBRARIES}") set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES};${BLASLAPACK_LIBRARIES}")
if(BLAS_LIBRARY_DIRS) if(BLAS_LIBRARY_DIRS)
...@@ -363,6 +374,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -363,6 +374,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# the RPATH to be used when installing # the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${LAPACK_LIBRARY_DIRS}") list(APPEND CMAKE_INSTALL_RPATH "${LAPACK_LIBRARY_DIRS}")
endif() endif()
message (STATUS "check BLAS Fortran mangling")
# check blas and lapack symbols naming # check blas and lapack symbols naming
set(CMAKE_REQUIRED_LIBRARIES "${BLAS_LIBRARIES}") set(CMAKE_REQUIRED_LIBRARIES "${BLAS_LIBRARIES}")
check_function_exists(dgemv_ DGEMV_ADD_) check_function_exists(dgemv_ DGEMV_ADD_)
...@@ -374,19 +386,19 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -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") message (STATUS "BLAS dgemv_ symbol found, SCALFMM_BLAS_ADD_ is ON")
else (DGEMV_ADD_) else (DGEMV_ADD_)
set (SCALFMM_BLAS_ADD_ OFF) set (SCALFMM_BLAS_ADD_ OFF)
check_function_exists(DGEMV DGEMV_UPCASE) check_function_exists(DGEMV DGEMV_UPCASE)
if (DGEMV_UPCASE) if (DGEMV_UPCASE)
set (SCALFMM_BLAS_UPCASE ON) set (SCALFMM_BLAS_UPCASE ON)
message (STATUS "BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON") message (STATUS "BLAS DGEMV symbol found, SCALFMM_BLAS_UPCASE is ON")
else (DGEMV_UPCASE) else (DGEMV_UPCASE)
# set (SCALFMM_BLAS_UPCASE OFF) # set (SCALFMM_BLAS_UPCASE OFF)
check_function_exists(dgemv DGEMV_NOCHANGE) check_function_exists(dgemv DGEMV_NOCHANGE)
if (DGEMV_NOCHANGE) if (DGEMV_NOCHANGE)
set (SCALFMM_BLAS_NOCHANGE ON) set (SCALFMM_BLAS_NOCHANGE ON)
message (STATUS "BLAS dgemv symbol found, SCALFMM_BLAS_NOCHANGE is ON") message (STATUS "BLAS dgemv symbol found, SCALFMM_BLAS_NOCHANGE is ON")
# else (DGEMV_NOCHANGE) # else (DGEMV_NOCHANGE)
# set (SCALFMM_BLAS_NOCHANGE OFF) # set (SCALFMM_BLAS_NOCHANGE OFF)
endif (DGEMV_NOCHANGE) endif (DGEMV_NOCHANGE)
endif (DGEMV_UPCASE) endif (DGEMV_UPCASE)
endif (DGEMV_ADD_) endif (DGEMV_ADD_)
if ( (NOT DGEMV_ADD_) AND (NOT DGEMV_UPCASE) AND (NOT DGEMV_NOCHANGE) ) 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/ ...@@ -403,88 +415,59 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# #
# FFT option # 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 ) if( SCALFMM_USE_FFT )
message(STATUS "SCALFMM USE FFT Configure:") 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 ) 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 (FFTW_LIBRARY_DIRS_DEP)
set(FFT_LIBRARIES "-L${FFTW_LIBRARY_DIRS_DEP};" CACHE STRING "Set your MKL flags")
if( SCALFMM_USE_MKL_AS_BLAS ) endif()
if (FFTW_LIBRARIES_DEP)
unset(FFT_LIBRARIES CACHE) foreach (fft_lib ${FFTW_LIBRARIES_DEP})
message(STATUS " SCALFMM USE MKL already defined") set(FFT_LIBRARIES "${FFT_LIBRARIES};${fft_lib};")
set(FFT_INCLUDES "$ENV{MKLROOT}/include/fftw" CACHE STRING "Set your MKL flags") endforeach()
if (BLAS_FOUND) endif()
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()
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) if (FFT_INCLUDES)
set(SCALFMM_INCLUDES "${SCALFMM_INCLUDES}; ${FFT_INCLUDES}") set(SCALFMM_INCLUDES "${SCALFMM_INCLUDES}; ${FFT_INCLUDES}")
endif() endif()
if(FFTW_FOUND) if(NOT FFTW_FOUND)
message(STATUS " SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
message(STATUS " SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
else()
message(WARNING "FFTW has not been found, SCALFMM will continue to compile but some applications will be disabled.") 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).") 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) set(SCALFMM_USE_FFT OFF)
endif() endif()
endif(SCALFMM_USE_FFT) endif(SCALFMM_USE_FFT)
list(APPEND FUSE_LIST "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}") message(STATUS "SCALFMM_USE_FFT = ${SCALFMM_USE_FFT}")
list(REMOVE_DUPLICATES SCALFMM_INCLUDES)
list(REMOVE_DUPLICATES SCALFMM_LIBRARIES)
# #
# C++ 2011 # C++ 2011
...@@ -788,7 +771,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/ ...@@ -788,7 +771,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
set(SCALFMM_COMPILE_LIBS "") set(SCALFMM_COMPILE_LIBS "")
foreach(lib_var ${SCALFMM_LIBRARIES}) foreach(lib_var ${SCALFMM_LIBRARIES})
string(STRIP ${lib_var} lib_var) string(STRIP ${lib_var} lib_var)
LIST(APPEND SCALFMM_COMPILE_LIBS ${lib_var}) LIST(APPEND SCALFMM_COMPILE_LIBS ${lib_var})
endforeach() endforeach()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Src/ScalFmmConfig.h.cmake configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Src/ScalFmmConfig.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/Src/ScalFmmConfig.h ) ${CMAKE_CURRENT_BINARY_DIR}/Src/ScalFmmConfig.h )
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
### List of vendors (BLA_VENDOR) valid in this module ### List of vendors (BLA_VENDOR) valid in this module
########## List of vendors (BLA_VENDOR) valid in this module ########## List of vendors (BLA_VENDOR) valid in this module
## Open (for OpenBlas), Eigen (for EigenBlas), Goto, ATLAS PhiPACK, ## Open (for OpenBlas), Eigen (for EigenBlas), Goto, ATLAS PhiPACK,
##  CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, ##  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_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), ## Intel10_64lp_seq (intel mkl v10 64 bit,sequential code, lp64 model),
## Intel( older versions of mkl 32 and 64 bit), ## Intel( older versions of mkl 32 and 64 bit),
...@@ -330,11 +330,9 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) ...@@ -330,11 +330,9 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
if(_libraries_work) if(_libraries_work)
set(${LIBRARIES} ${${LIBRARIES}} ${_thread}) set(${LIBRARIES} ${${LIBRARIES}} ${_thread})
else(_libraries_work) else(_libraries_work)
set(${LIBRARIES} FALSE) set(${LIBRARIES} FALSE)
endif(_libraries_work) endif(_libraries_work)
# message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}")
endmacro(Check_Fortran_Libraries) endmacro(Check_Fortran_Libraries)
...@@ -707,6 +705,14 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") ...@@ -707,6 +705,14 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
if(NOT BLAS_FIND_QUIETLY)
if(${_LIBRARIES})
message(STATUS "Looking for MKL BLAS: found")
else()
message(STATUS "Looking for MKL BLAS: not found")
endif()
endif()
endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
...@@ -722,6 +728,13 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") ...@@ -722,6 +728,13 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
"goto2"