From fa526529869380ff681785816ef47bdd9692bb7f Mon Sep 17 00:00:00 2001 From: coulaud Date: Fri, 6 Jan 2012 16:35:24 +0000 Subject: [PATCH] Fix somes problems with intel compiler git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@288 2616d619-271b-44dc-8df4-d4a8f33a7222 --- CMakeLists.txt | 12 +++++++++--- Src/Fmb/FFmbKernels.hpp | 6 +++--- Src/Fmb/FFmbKernelsBlockBlas.hpp | 12 ++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a27c30aa..4681df4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,17 @@ if(insource) MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../") endif(insource) +# Project Infos +project(scalfmm) + +# Active language +# ----------------------- +ENABLE_LANGUAGE(CXX ) + + # Options OPTION( SCALFMM_USE_CBLAS "Set to ON to build ScaFMM with BLAS" OFF ) -OPTION( SCALFMM_USE_MPI "Set to ON to build ScaFMM with MPI" ON ) +OPTION( SCALFMM_USE_MPI "Set to ON to build ScaFMM with MPI" OFF ) OPTION( SCALFMM_USE_TRACE "Set to ON to print trace or use itac trace" OFF ) OPTION( SCALFMM_BUILD_TESTS "Set to ON to build fonctionnalities Tests" ON ) OPTION( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" ON ) @@ -21,8 +29,6 @@ if( SCALFMM_USE_MPI ) SET(CMAKE_CXX_COMPILER mpicxx) endif() -# Project Infos -project(scalfmm CXX) # Test if openmp is here set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake) diff --git a/Src/Fmb/FFmbKernels.hpp b/Src/Fmb/FFmbKernels.hpp index 5eed37de..2b756fcd 100644 --- a/Src/Fmb/FFmbKernels.hpp +++ b/Src/Fmb/FFmbKernels.hpp @@ -741,7 +741,7 @@ public: for(int n = 0 ; n <= FMB_Info_P ; ++n ){ // l<0 // (-1)^l - FReal pow_of_minus_1_for_l = ( n % 2 ? -1 : 1); + FReal pow_of_minus_1_for_l = static_cast( n % 2 ? -1.0 : 1.0); // O_n^l : here points on the source multipole expansion term of degree n and order |l| const FComplexe* p_src_exp_term = multipole_exp_src + expansion_Redirection_array_for_j[n]+n; @@ -780,7 +780,7 @@ public: for( int j=n ; j <= FMB_Info_P ; ++j ){ // (-1)^k - FReal pow_of_minus_1_for_k = ( FMath::Max(0,n-j+l) %2 ? -1 : 1 ); + FReal pow_of_minus_1_for_k = static_cast( FMath::Max(0,n-j+l) %2 ? -1.0 : 1.0 ); // M_j^k FComplexe *p_target_exp_term = multipole_exp_target + expansion_Redirection_array_for_j[j] + FMath::Max(0,n-j+l); // Inner_{j-n}^{k-l} : here points on the M2M transfer function/expansion term of degree n-j and order |k-l| @@ -1029,7 +1029,7 @@ public: //printf("2\n"); // (-1)^l - FReal pow_of_minus_1_for_l = ((l%2) ? -1 : 1); + FReal pow_of_minus_1_for_l = static_cast((l%2) ? -1.0 : 1.0); for (; l>0 && l>=j-n+k; --l, pow_of_minus_1_for_l = -pow_of_minus_1_for_l, --p_src_exp_term, ++p_Inner_term){ /* l>0 && l-k<=0 */ p_target_exp_term->incReal( pow_of_minus_1_for_l * pow_of_minus_1_for_k * ((p_src_exp_term->getReal() * p_Inner_term->getReal()) + diff --git a/Src/Fmb/FFmbKernelsBlockBlas.hpp b/Src/Fmb/FFmbKernelsBlockBlas.hpp index 4a0d4a1d..11d97f4d 100644 --- a/Src/Fmb/FFmbKernelsBlockBlas.hpp +++ b/Src/Fmb/FFmbKernelsBlockBlas.hpp @@ -857,7 +857,7 @@ public: for(typename ContainerClass::ConstBasicIterator iterParticle(*inParticles); - iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ + iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ //std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n"; @@ -871,7 +871,7 @@ public: //ok printf("\tr=%.15e\tcos_theta=%.15e\tsin_theta=%.15e\tphi=%.15e\n",spherical.r,spherical.cosTheta,spherical.sinTheta,spherical.phi); FComplexe* p_exp_term = inPole->getMultipole(); - FComplexe* p_Y_term = current_thread_Y; + FComplexe* p_Y_term = current_thread_Y; FReal pow_of_minus_1_j = 1.0;//(-1)^j const FReal valueParticle = iterParticle.data().getPhysicalValue(); @@ -931,7 +931,7 @@ public: for(int n = 0 ; n <= FMB_Info_P ; ++n ){ // l<0 // (-1)^l - FReal pow_of_minus_1_for_l = ( n % 2 ? -1 : 1); + FReal pow_of_minus_1_for_l = static_cast( n % 2 ? -1.0 : 1.0); // O_n^l : here points on the source multipole expansion term of degree n and order |l| const FComplexe* p_src_exp_term = multipole_exp_src + expansion_Redirection_array_for_j[n]+n; @@ -971,7 +971,7 @@ public: for( int j=n ; j <= FMB_Info_P ; ++j ){ // (-1)^k - FReal pow_of_minus_1_for_k = ( FMath::Max(0,n-j+l) %2 ? -1 : 1 ); + FReal pow_of_minus_1_for_k = static_cast( FMath::Max(0,n-j+l) %2 ? -1.0 : 1.0 ); // M_j^k FComplexe *p_target_exp_term = multipole_exp_target + expansion_Redirection_array_for_j[j] + FMath::Max(0,n-j+l); // Inner_{j-n}^{k-l} : here points on the M2M transfer function/expansion term of degree n-j and order |k-l| @@ -1051,7 +1051,7 @@ public: p_exp += j+1 + half_jj_plus_1; p_nexp -= j-1; for (k= -j, - pow_of_minus_1_for_k = ((j%2) ? -1 : 1); + pow_of_minus_1_for_k = static_cast((j%2) ? -1.0 : 1.0); k<0; ++k, pow_of_minus_1_for_k = -pow_of_minus_1_for_k){ @@ -1324,7 +1324,7 @@ public: //printf("2\n"); // (-1)^l - FReal pow_of_minus_1_for_l = ((l%2) ? -1 : 1); + FReal pow_of_minus_1_for_l = static_cast((l%2) ? -1.0 : 1.0); for (; l>0 && l>=j-n+k; --l, pow_of_minus_1_for_l = -pow_of_minus_1_for_l, --p_src_exp_term, ++p_Inner_term){ /* l>0 && l-k<=0 */ p_target_exp_term->incReal( pow_of_minus_1_for_l * pow_of_minus_1_for_k * ((p_src_exp_term->getReal() * p_Inner_term->getReal()) + -- GitLab