Commit fa526529 authored by coulaud's avatar coulaud

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
parent f0985907
...@@ -6,9 +6,17 @@ if(insource) ...@@ -6,9 +6,17 @@ if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../") MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../")
endif(insource) endif(insource)
# Project Infos
project(scalfmm)
# Active language
# -----------------------
ENABLE_LANGUAGE(CXX )
# Options # Options
OPTION( SCALFMM_USE_CBLAS "Set to ON to build ScaFMM with BLAS" OFF ) 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_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_TESTS "Set to ON to build fonctionnalities Tests" ON )
OPTION( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" ON ) OPTION( SCALFMM_BUILD_UTESTS "Set to ON to build UTests" ON )
...@@ -21,8 +29,6 @@ if( SCALFMM_USE_MPI ) ...@@ -21,8 +29,6 @@ if( SCALFMM_USE_MPI )
SET(CMAKE_CXX_COMPILER mpicxx) SET(CMAKE_CXX_COMPILER mpicxx)
endif() endif()
# Project Infos
project(scalfmm CXX)
# Test if openmp is here # Test if openmp is here
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
......
...@@ -741,7 +741,7 @@ public: ...@@ -741,7 +741,7 @@ public:
for(int n = 0 ; n <= FMB_Info_P ; ++n ){ for(int n = 0 ; n <= FMB_Info_P ; ++n ){
// l<0 // (-1)^l // l<0 // (-1)^l
FReal pow_of_minus_1_for_l = ( n % 2 ? -1 : 1); FReal pow_of_minus_1_for_l = static_cast<FReal>( n % 2 ? -1.0 : 1.0);
// O_n^l : here points on the source multipole expansion term of degree n and order |l| // 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; const FComplexe* p_src_exp_term = multipole_exp_src + expansion_Redirection_array_for_j[n]+n;
...@@ -780,7 +780,7 @@ public: ...@@ -780,7 +780,7 @@ public:
for( int j=n ; j <= FMB_Info_P ; ++j ){ for( int j=n ; j <= FMB_Info_P ; ++j ){
// (-1)^k // (-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<FReal>( FMath::Max(0,n-j+l) %2 ? -1.0 : 1.0 );
// M_j^k // M_j^k
FComplexe *p_target_exp_term = multipole_exp_target + expansion_Redirection_array_for_j[j] + FMath::Max(0,n-j+l); 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| // 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: ...@@ -1029,7 +1029,7 @@ public:
//printf("2\n"); //printf("2\n");
// (-1)^l // (-1)^l
FReal pow_of_minus_1_for_l = ((l%2) ? -1 : 1); FReal pow_of_minus_1_for_l = static_cast<FReal>((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 */ 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_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()) + ((p_src_exp_term->getReal() * p_Inner_term->getReal()) +
......
...@@ -857,7 +857,7 @@ public: ...@@ -857,7 +857,7 @@ public:
for(typename ContainerClass::ConstBasicIterator iterParticle(*inParticles); for(typename ContainerClass::ConstBasicIterator iterParticle(*inParticles);
iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ iterParticle.hasNotFinished() ; iterParticle.gotoNext()){
//std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n"; //std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n";
...@@ -871,7 +871,7 @@ public: ...@@ -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); //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_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 FReal pow_of_minus_1_j = 1.0;//(-1)^j
const FReal valueParticle = iterParticle.data().getPhysicalValue(); const FReal valueParticle = iterParticle.data().getPhysicalValue();
...@@ -931,7 +931,7 @@ public: ...@@ -931,7 +931,7 @@ public:
for(int n = 0 ; n <= FMB_Info_P ; ++n ){ for(int n = 0 ; n <= FMB_Info_P ; ++n ){
// l<0 // (-1)^l // l<0 // (-1)^l
FReal pow_of_minus_1_for_l = ( n % 2 ? -1 : 1); FReal pow_of_minus_1_for_l = static_cast<FReal>( n % 2 ? -1.0 : 1.0);
// O_n^l : here points on the source multipole expansion term of degree n and order |l| // 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; const FComplexe* p_src_exp_term = multipole_exp_src + expansion_Redirection_array_for_j[n]+n;
...@@ -971,7 +971,7 @@ public: ...@@ -971,7 +971,7 @@ public:
for( int j=n ; j <= FMB_Info_P ; ++j ){ for( int j=n ; j <= FMB_Info_P ; ++j ){
// (-1)^k // (-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<FReal>( FMath::Max(0,n-j+l) %2 ? -1.0 : 1.0 );
// M_j^k // M_j^k
FComplexe *p_target_exp_term = multipole_exp_target + expansion_Redirection_array_for_j[j] + FMath::Max(0,n-j+l); 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| // 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: ...@@ -1051,7 +1051,7 @@ public:
p_exp += j+1 + half_jj_plus_1; p_exp += j+1 + half_jj_plus_1;
p_nexp -= j-1; p_nexp -= j-1;
for (k= -j, for (k= -j,
pow_of_minus_1_for_k = ((j%2) ? -1 : 1); pow_of_minus_1_for_k = static_cast<FReal>((j%2) ? -1.0 : 1.0);
k<0; k<0;
++k, ++k,
pow_of_minus_1_for_k = -pow_of_minus_1_for_k){ pow_of_minus_1_for_k = -pow_of_minus_1_for_k){
...@@ -1324,7 +1324,7 @@ public: ...@@ -1324,7 +1324,7 @@ public:
//printf("2\n"); //printf("2\n");
// (-1)^l // (-1)^l
FReal pow_of_minus_1_for_l = ((l%2) ? -1 : 1); FReal pow_of_minus_1_for_l = static_cast<FReal>((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 */ 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_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()) + ((p_src_exp_term->getReal() * p_Inner_term->getReal()) +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment