Commit cb6f7883 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille
parents 0d4a7dea 90d89c0d
......@@ -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
......@@ -115,12 +115,12 @@ public:
}else{
if(type==SOURCE){
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleTypeSource,idPart);
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleType::FParticleTypeSource,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}else{
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleTypeTarget,idPart);
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleType::FParticleTypeTarget,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}
......@@ -138,12 +138,12 @@ public:
}else{
if(type==SOURCE){
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleTypeSource,idPart);
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleType::FParticleTypeSource,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}else{
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleTypeTarget,idPart);
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleType::FParticleTypeTarget,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}
......
......@@ -388,12 +388,12 @@ public:
}else{
if(type==SOURCE){
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleTypeSource,idPart);
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleType::FParticleTypeSource,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}else{
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleTypeTarget,idPart);
octree->insert(FPoint<FReal>(X[idPart],Y[idPart],Z[idPart]),FParticleType::FParticleTypeTarget,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}
......@@ -411,12 +411,12 @@ public:
}else{
if(type==SOURCE){
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleTypeSource,idPart);
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleType::FParticleTypeSource,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}else{
for(FSize idPart = 0; idPart<NbPositions ; ++idPart){
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleTypeTarget,idPart);
octree->insert(FPoint<FReal>(&XYZ[3*idPart]),FParticleType::FParticleTypeTarget,idPart);
}
FScalFMMEngine<FReal>::nbPart += NbPositions;
}
......
......@@ -321,10 +321,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
##############################################################################
#
if( SCALFMM_USE_BLAS )
# include(FortranCInterface)
# # Define a Fortran interface file (FCMangle.hpp)
# FortranCInterface_HEADER( ${CMAKE_CURRENT_SOURCE_DIR}/Src/FCMangle.hpp
# MACRO_NAMESPACE "PM_"
# 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 )
if( SCALFMM_USE_MKL_AS_BLAS )
set(BLA_VENDOR "Intel10_64lp_seq")
find_package(BLASEXT QUIET) # not REQUIRED
......@@ -346,7 +352,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)
......@@ -357,6 +363,35 @@ 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()
# check blas and lapack symbols naming
set(CMAKE_REQUIRED_LIBRARIES "${BLAS_LIBRARIES}")
check_function_exists(dgemv_ DGEMV_ADD_)
set (SCALFMM_BLAS_UPCASE OFF)
set (SCALFMM_BLAS_NOCHANGE OFF)
message (STATUS "BLAS dgemv_ " ${DGEMV_ADD_} ${SCALFMM_BLAS_UPCASE})
if (DGEMV_ADD_)
set (SCALFMM_BLAS_ADD_ ON)
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_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)
endif (DGEMV_UPCASE)
endif (DGEMV_ADD_)
if ( (NOT DGEMV_ADD_) AND (NOT DGEMV_UPCASE) AND (NOT DGEMV_NOCHANGE) )
message(FATAL_ERROR "BLAS Fortran mangling cannot be properly detected")
endif ()
else()
message(WARNING "BLAS has not been found, SCALFMM will continue to compile but some applications will be disabled.")
message(WARNING "If you have BLAS set BLAS_LIBDIR, BLAS_INCDIR or BLAS_DIR (CMake variables using -D or environment variables).")
......@@ -612,7 +647,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
OUTPUT_VARIABLE COMPILE_AVX_OUTPUT)
if(${COMPILE_AVX})
message(STATUS "%%%%%%%%%%%% COMPILE_AVX = ${COMPILE_AVX} %%%%< ${AVX_FLAGS}")
set(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} ${AVX_FLAGS}")
message(STATUS "%%%%%%%%%%%% SCALFMM_CXX_FLAGS = ${SCALFMM_CXX_FLAGS}")
#set( SCALFMM_USE_SSE OFF FORCE) # ne marche pas
......@@ -725,7 +760,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
endif(PKG_CONFIG_FOUND)
endif(SCALFMM_USE_EZTRACE)
##################################################################
#
# To catch signals
......@@ -738,7 +773,6 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
IF( NOT APPLE)
SET(SCALFMM_CXX_FLAGS "${SCALFMM_CXX_FLAGS} -rdynamic")
ENDIF()
endif()
##################################################################
# #
......@@ -806,6 +840,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
##################################################################
# Add - doc #
##################################################################
message(STATUS "SCALFMM_BUILD_DOC = ${SCALFMM_BUILD_DOC}" )
if(SCALFMM_BUILD_DOC)
add_subdirectory(Doc)
endif()
......
......@@ -279,6 +279,7 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
HINTS ${_libdir}
NO_DEFAULT_PATH
)
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
# Print status if not found
......@@ -293,6 +294,10 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
if(_libraries_work)
# Test this combination of libraries.
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BLA_STATIC)
list(INSERT ${LIBRARIES} 0 "-Wl,--start-group")
list(APPEND ${LIBRARIES} "-Wl,--end-group")
endif()
set(CMAKE_REQUIRED_LIBRARIES "${_flags};${${LIBRARIES}};${_thread}")
set(CMAKE_REQUIRED_FLAGS "${BLAS_COMPILER_FLAGS}")
if (BLAS_VERBOSE)
......@@ -901,7 +906,7 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
BLAS
sgemm
""
"essl;blas"
"essl"
""
)
endif()
......
......@@ -259,9 +259,17 @@ endif()
# extract libs paths
# remark: because it is not given by find_package(BLAS)
set(BLAS_LIBRARY_DIRS "")
string(REPLACE " " ";" BLAS_LIBRARIES "${BLAS_LIBRARIES}")
foreach(blas_lib ${BLAS_LIBRARIES})
get_filename_component(a_blas_lib_dir "${blas_lib}" PATH)
list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" )
string(REPLACE "-L" "" blas_lib "${blas_lib}")
if (EXISTS "${blas_lib}")
list(APPEND BLAS_LIBRARY_DIRS "${blas_lib}" )
else()
get_filename_component(a_blas_lib_dir "${blas_lib}" PATH)
if (EXISTS "${a_blas_lib_dir}")
list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" )
endif()
endif()
endforeach()
if (BLAS_LIBRARY_DIRS)
list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS)
......
......@@ -172,13 +172,16 @@ find_package(PkgConfig QUIET)
if( PKG_CONFIG_EXECUTABLE AND NOT FFTW_GIVEN_BY_USER )
if(FFTW_LOOK_FOR_FFTW_SIMPLE)
pkg_search_module(FFTW fftw3f)
pkg_search_module(FFTW3F fftw3f)
pkg_search_module(FFTW3 fftw3)
elseif(FFTW_LOOK_FOR_FFTW_LONG)
pkg_search_module(FFTW fftw3)
pkg_search_module(FFTW3L fftw3l)
pkg_search_module(FFTW3 fftw3)
elseif(FFTW_LOOK_FOR_FFTW_QUAD)
pkg_search_module(FFTW fftw3q)
pkg_search_module(FFTW3Q fftw3q)
pkg_search_module(FFTW3 fftw3)
else()
pkg_search_module(FFTW fftw3)
pkg_search_module(FFTW3 fftw3)
endif()
if (NOT FFTW_FIND_QUIETLY)
......@@ -198,7 +201,19 @@ if( PKG_CONFIG_EXECUTABLE AND NOT FFTW_GIVEN_BY_USER )
set(FFTW_INCLUDE_DIRS_DEP "${FFTW_INCLUDE_DIRS}")
set(FFTW_LIBRARY_DIRS_DEP "${FFTW_LIBRARY_DIRS}")
set(FFTW_LIBRARIES_DEP "${FFTW_LIBRARIES}")
set(FFTW_LIBRARIES_DEP)
if( FFTW3Q_LIBRARIES )
list(APPEND FFTW_LIBRARIES_DEP "${FFTW3Q_LIBRARIES}")
endif()
if( FFTW3L_LIBRARIES )
list(APPEND FFTW_LIBRARIES_DEP "${FFTW3L_LIBRARIES}")
endif()
if( FFTW3F_LIBRARIES )
list(APPEND FFTW_LIBRARIES_DEP "${FFTW3F_LIBRARIES}")
endif()
if( FFTW3_LIBRARIES )
list(APPEND FFTW_LIBRARIES_DEP "${FFTW3_LIBRARIES}")
endif()
set(FFTW_WORKS TRUE)
endif( PKG_CONFIG_EXECUTABLE AND NOT FFTW_GIVEN_BY_USER )
......@@ -551,7 +566,13 @@ endif()
# check that FFTW has been found
# -------------------------------
include(FindPackageHandleStandardArgs)
if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FFTW_FOUND) OR (FFTW_GIVEN_BY_USER) )
find_package_handle_standard_args(FFTW DEFAULT_MSG
FFTW_LIBRARIES
FFTW_INCLUDE_DIRS
FFTW_WORKS)
else()
find_package_handle_standard_args(FFTW DEFAULT_MSG
FFTW_LIBRARIES
FFTW_WORKS)
endif()
......@@ -154,7 +154,7 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads
# N.B. _prefix is the prefix applied to the names of all cached variables that
# are generated internally and marked advanced by this macro.
set(_libdir ${ARGN})
set(_libraries_work TRUE)
set(${LIBRARIES})
set(_combined_name)
......@@ -263,6 +263,7 @@ foreach(_library ${_list})
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
HINTS ${_libdir}
NO_DEFAULT_PATH
)
mark_as_advanced(${_prefix}_${_library}_LIBRARY)
# Print status if not found
......@@ -277,6 +278,10 @@ endforeach(_library ${_list})
if(_libraries_work)
# Test this combination of libraries.
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BLA_STATIC)
list(INSERT ${LIBRARIES} 0 "-Wl,--start-group")
list(APPEND ${LIBRARIES} "-Wl,--end-group")
endif()
if(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads})
else(UNIX AND BLA_STATIC)
......
......@@ -211,9 +211,17 @@ endif()
# extract libs paths
# remark: because it is not given by find_package(LAPACK)
set(LAPACK_LIBRARY_DIRS "")
string(REPLACE " " ";" LAPACK_LIBRARIES "${LAPACK_LIBRARIES}")
foreach(lapack_lib ${LAPACK_LIBRARIES})
get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH)
list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" )
string(REPLACE "-L" "" lapack_lib "${lapack_lib}")
if (EXISTS "${lapack_lib}")
list(APPEND LAPACK_LIBRARY_DIRS "${lapack_lib}" )
else()
get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH)
if (EXISTS "${a_lapack_lib_dir}")
list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" )
endif()
endif()
endforeach()
if (LAPACK_LIBRARY_DIRS)
list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS)
......
......@@ -17,6 +17,7 @@
#
# PASTIX depends on the following libraries:
# - Threads, m, rt
# - MPI
# - HWLOC
# - BLAS
#
......
......@@ -225,6 +225,10 @@ if(PKG_CONFIG_EXECUTABLE AND NOT STARPU_GIVEN_BY_USER)
# "Perhaps the path to starpu headers is already present in your"
# "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
#endif()
set(STARPU_VERSION_STRING "${STARPU_SHM_VERSION}")
string(REPLACE "." ";" STARPU_VERSION_STRING_LIST ${STARPU_VERSION_STRING})
list(GET STARPU_VERSION_STRING_LIST 0 STARPU_VERSION_MAJOR)
list(GET STARPU_VERSION_STRING_LIST 1 STARPU_VERSION_MINOR)
else()
message("${Magenta}Looking for STARPU - not found using PkgConfig."
"Perhaps you should add the directory containing libstarpu.pc"
......@@ -461,14 +465,23 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND)
find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS
NAMES ${starpu_hdr}
HINTS ${STARPU_DIR}
PATH_SUFFIXES "include/starpu/${STARPU_VERSION_STRING}")
PATH_SUFFIXES "include"
"include/starpu/1.0"
"include/starpu/1.1"
"include/starpu/1.2"
"include/starpu/1.3")
endforeach()
else()
foreach(starpu_hdr ${STARPU_hdrs_to_find})
set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND")
find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS
NAMES ${starpu_hdr}
HINTS ${_inc_env})
HINTS ${_inc_env}
PATH_SUFFIXES
"starpu/1.0"
"starpu/1.1"
"starpu/1.2"
"starpu/1.3")
endforeach()
endif()
endif()
......
8 4
20000
0.5 0.5 0.5 0.5
20000 1 0.5 0.5 0.5
0.840188 0.394383 0.783099 0.01 1
0.911647 0.197551 0.335223 0.01 1
0.277775 0.55397 0.477397 0.01 1
......@@ -20000,4 +19998,4 @@
0.00448784 0.00539908 0.182474 0.01 0
0.0237434 0.139661 0.412617 0.01 1
0.514349 0.627817 0.0209046 0.01 1
0.56572 0.990817 0.904442 0.01 0
\ No newline at end of file
0.56572 0.990817 0.904442 0.01 0
# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(
doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......@@ -11,5 +12,5 @@ if(DOXYGEN_FOUND)
# INSTALL(FILES ${SCALFMM_BINARY_DIR}/Doc/scalfmm.tag DESTINATION doc/ )
# INSTALL(DIRECTORY ${SCALFMM_BINARY_DIR}/Doc/html DESTINATION doc/ )
else()
message( WARNING "You ask to enable the doc generation but Doxygen cannot be found." )
message( FATAL_ERROR "You ask to enable the doc generation but Doxygen cannot be found." )
endif(DOXYGEN_FOUND)
/*! \page interFMM Kernel Independent FMM
* In this section, we briefly discuss the
* \section general
* \section MatrixKernel
*
* \subsection AddKernel How add a new Matrix Kernel
* \subsection predKernel predefined Matrix Kernel
* Different kernels are predefined in ScalFMM. The kernels are in located
* in FInterpMatrixKernel.hpp
*<ul>
* <li> Laplacian kernel K(x,y)= 1/r with r=|x-y| <--> class FInterpMatrixKernelR
* <li> Laplacian kernel K(x,y)=1/rh with rh=sqrt(L_i*(x_i-y_i)^2) <--> class FInterpMatrixKernelRH
* <li> K(x,y)=1/r^2 with r=|x-y| <--> class FInterpMatrixKernelRR
* <li> Lennard Jones K(x,y)=1/r^12 - 1/r^6 with r=|x-y|" <--> class FInterpMatrixKernelLJ
* <li>Modified Laplacian kernel K(x,y)=1/r exp(-lambda r) with r=|x-y| <--> FInterpMatrixKernelML
* <li> K(x,y)=1/(r^2 + coreWidth) with r=|x-y| <--> FInterpMatrixKernelAPLUSRR
* </ul>
*/
......@@ -107,9 +107,9 @@ If you consider the
\subsection{Plummer Model}
This is a hard test case in astrophysics problem, and it models a globular cluster of stars, which is highly non uniform. It is called the plummer distribution. To construct such distribution, first we construct a uniform points distribution on the unit sphere. Second, the radius is chosen according to the plummer distribution (double power law in astrophysics). We consider $u$ a random number between 0 and 1, then the associated radius is given by
\begin{equation*}
r = \sqrt{\frac{u^{2/3}}{u^{2/3}-1}}
r = 1.0/\sqrt{u^{-2/3}-1},
\end{equation*}
and the total mass is one. Then, $m_i = \frac{1}{Npt}$.
\begin{figure}[h]
\centering
\begin{minipage}{0.45\textwidth}%
......@@ -140,6 +140,8 @@ The corresponding potential is
\begin{equation}
\Phi_P(r) = - \frac{G M}{\sqrt{r^2+a^2}}
\end{equation}
In N-body units, $G = M = 1$ and $a = 3\pi/16 \sim 0.589$
\subsection{Diagonal Model}
%, shape end size=.5cm},decoration={shape start size=.5cm, shape end size=.125cm
......
......@@ -28,17 +28,21 @@
#include <string>
#include "ScalFmmConfig.h"
#include "Utils/FGlobal.hpp"
#include "Files/FFmaGenericLoader.hpp"
#include "Utils/FParameters.hpp"