Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
b16a0225
Commit
b16a0225
authored
May 27, 2014
by
COULAUD Olivier
Browse files
Fix errors for icl++ compiler on MAcOs X
parent
0763df33
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
b16a0225
...
...
@@ -178,11 +178,17 @@ endif(ScalFMM_USE_FFT)
#ADD_DEFINITIONS(-std=c++11)
IF
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
AND APPLE
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpversion OUTPUT_VARIABLE INTEL_VERSION
)
# MESSAGE( "CMAKE_SYSTEM: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
# MESSAGE( "Intel: ${INTEL_VERSION}")
if
(
${
CMAKE_SYSTEM_VERSION
}
EQUAL 13 AND
${
INTEL_VERSION
}
GREATER 13.0
)
SET
(
SCALFMM_LIBRARIES
"
${
SCALFMM_LIBRARIES
}
-stdlib=libstdc++"
)
SET
(
ScaLFMM_CXX_FLAGS
"
${
ScaLFMM_CXX_FLAGS
}
-stdlib=libstdc++"
)
string
(
FIND
${
CMAKE_CXX_COMPILER
}
"icl++"
NAME
)
MESSAGE
(
"CMAKE_SYSTEM:
${
CMAKE_SYSTEM
}
CMAKE_CXX_COMPILER_ID
${
CMAKE_CXX_COMPILER_ID
}
CMAKE_CXX_COMPILER
${
NAME
}
"
)
MESSAGE
(
"Intel:
${
INTEL_VERSION
}
"
)
if
(
${
NAME
}
GREATER 0
)
if
(
${
INTEL_VERSION
}
EQUAL 15. OR
${
INTEL_VERSION
}
GREATER 15.0.0
)
MESSAGE
(
" Intel compiler is icl++ ( version >= 15.0.0)"
)
else
()
MESSAGE
(
FATAL_ERROR
" Intel compiler should be icl++ ( version >= 15.0.0)"
)
endif
()
else
()
MESSAGE
(
FATAL_ERROR
" Intel compiler should be icl++ ( version >= 15.0.0)"
)
endif
()
endif
()
...
...
Examples/generateDistributions.cpp
View file @
b16a0225
...
...
@@ -221,12 +221,13 @@ int main(int argc, char ** argv){
BoxWith
+=
2
*
extraRadius
;
}
if
(
!
FParameters
::
existParameter
(
argc
,
argv
,
"-bin"
)){
std
::
ofstream
outfileA
(
genericFileName
+
".fma"
,
std
::
ofstream
::
out
);
std
::
string
name
(
genericFileName
+
".fma"
);
std
::
ofstream
outfileA
(
name
.
c_str
(),
std
::
ofstream
::
out
);
if
(
!
outfileA
)
{
std
::
cout
<<
"Cannot open file."
<<
std
::
endl
;
exit
(
-
1
)
;
}
std
::
cout
<<
"Writes in ascii FMA format in file "
<<
genericFileName
+
".fma"
<<
std
::
endl
;
std
::
cout
<<
"Writes in ascii FMA format in file "
<<
name
<<
std
::
endl
;
std
::
cout
<<
" Points are in a cube of size "
<<
BoxWith
<<
" Centered in the Origin"
<<
std
::
endl
;
//
outfileA
<<
NbPoints
<<
" "
<<
BoxWith
<<
" "
<<
Centre
.
getX
()
<<
" "
<<
Centre
.
getY
()
<<
" "
<<
Centre
.
getZ
()
<<
std
::
endl
;
...
...
@@ -236,14 +237,15 @@ int main(int argc, char ** argv){
}
}
else
{
std
::
cout
<<
"Writes in binary FMA format in file "
<<
genericFileName
+
".bfma"
<<
std
::
endl
;
std
::
cout
<<
" Points are in a cube of size "
<<
BoxWith
<<
" Centered in the Origin"
<<
std
::
endl
;
//
std
::
fstream
outfile
(
genericFileName
+
".bfma"
,
std
::
ifstream
::
out
|
std
::
ios
::
binary
|
std
::
ios
::
trunc
);
std
::
string
name
(
genericFileName
+
".bfma"
);
std
::
fstream
outfile
(
name
.
c_str
(),
std
::
ifstream
::
out
|
std
::
ios
::
binary
|
std
::
ios
::
trunc
);
if
(
!
outfile
)
{
std
::
cout
<<
"Cannot open file."
<<
std
::
endl
;
return
1
;
}
std
::
cout
<<
"Writes in binary FMA format in file "
<<
name
<<
std
::
endl
;
std
::
cout
<<
" Points are in a cube of size "
<<
BoxWith
<<
" Centered in the Origin"
<<
std
::
endl
;
//
int
typeFReal
=
sizeof
(
FReal
)
;
outfile
.
write
((
char
*
)
&
typeFReal
,
sizeof
(
int
));
outfile
.
write
((
char
*
)
const_cast
<
int
*>
(
&
NbPoints
),
sizeof
(
FSize
));
...
...
@@ -271,7 +273,7 @@ int main(int argc, char ** argv){
else
{
visufile
=
genericFileName
+
".csv"
;
}
std
::
ofstream
file
(
visufile
,
std
::
ofstream
::
out
);
std
::
ofstream
file
(
visufile
.
c_str
()
,
std
::
ofstream
::
out
);
if
(
!
file
)
{
std
::
cout
<<
"Cannot open file."
<<
std
::
endl
;
exit
(
-
1
)
;
...
...
Examples/statisticsOnOctree.cpp
View file @
b16a0225
...
...
@@ -192,7 +192,8 @@ int main(int argc, char ** argv){
//
// write data
//
std
::
ofstream
outfile
(
genericFileName
+
".txt"
,
std
::
ofstream
::
out
);
std
::
string
name
(
genericFileName
+
".txt"
);
std
::
ofstream
outfile
(
name
.
c_str
(),
std
::
ofstream
::
out
);
if
(
!
outfile
)
{
std
::
cout
<<
"Cannot open file "
<<
std
::
endl
;
exit
(
-
1
)
;
...
...
Src/Core/FFmmAlgorithmThreadProc.hpp
View file @
b16a0225
This diff is collapsed.
Click to expand it.
Src/Files/FFmaGenericLoader.hpp
View file @
b16a0225
...
...
@@ -79,10 +79,10 @@ public:
FFmaGenericLoader
(
const
std
::
string
&
filename
,
const
bool
binary
=
false
)
:
file
(
nullptr
),
binaryFile
(
binary
),
centerOfBox
(
0.0
,
0.0
,
0.0
),
boxWidth
(
0.0
),
nbParticles
(
0
){
if
(
binary
)
{
this
->
file
=
new
std
::
fstream
(
filename
,
std
::
ifstream
::
in
|
std
::
ios
::
binary
);
this
->
file
=
new
std
::
fstream
(
filename
.
c_str
()
,
std
::
ifstream
::
in
|
std
::
ios
::
binary
);
}
else
{
this
->
file
=
new
std
::
fstream
(
filename
,
std
::
ifstream
::
in
)
;
this
->
file
=
new
std
::
fstream
(
filename
.
c_str
()
,
std
::
ifstream
::
in
)
;
}
// test if open
if
(
this
->
file
->
is_open
()){
...
...
Src/Kernels/Interpolation/FInterpMatrixKernel.hpp
View file @
b16a0225
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
é
renger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, B
e
renger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
...
...
@@ -266,7 +266,7 @@ struct FInterpMatrixKernel_IOR : FInterpAbstractMatrixKernel
{}
// returns position in reduced storage from position in full 3x3 matrix
int
getPosition
(
const
unsigned
int
n
)
const
unsigned
int
getPosition
(
const
unsigned
int
n
)
const
{
return
applyTab
[
n
];}
FReal
evaluate
(
const
FPoint
&
x
,
const
FPoint
&
y
)
const
...
...
Tests/Kernels/testSphericalBench.cpp
View file @
b16a0225
...
...
@@ -223,7 +223,8 @@ int main(int argc, char ** argv){
if
(
FParameters
::
existParameter
(
argc
,
argv
,
"-test-hp"
)
){
std
::
cout
<<
"Execute : test-hp
\n
"
;
FMath
::
FAccurater
allPotentialDiff
[(
NbLevels
+
1
-
2
)
*
(
DevP
+
1
-
2
)];
// FMath::FAccurater allPotentialDiff[(NbLevels+1-2)*(DevP+1-2)];
FMath
::
FAccurater
*
allPotentialDiff
=
new
FMath
::
FAccurater
[(
NbLevels
+
1
-
2
)
*
(
DevP
+
1
-
2
)];
printf
(
"Size array %d
\n
"
,
(
NbLevels
+
1
-
2
)
*
(
DevP
+
1
-
2
));
doATest
(
NbParticles
,
2
,
DevP
,
2
,
NbLevels
,
...
...
@@ -460,7 +461,7 @@ int main(int argc, char ** argv){
}
if
(
FParameters
::
existParameter
(
argc
,
argv
,
"-test-p"
)
){
std
::
cout
<<
"Execute : test-p
\n
"
;
FMath
::
FAccurater
potentialDiff
[
DevP
+
1
];
FMath
::
FAccurater
*
potentialDiff
=
new
FMath
::
FAccurater
[
DevP
+
1
];
FReal
potentialAbsoluteDiff
[
DevP
+
1
];
doATest
(
NbParticles
,
1
,
DevP
,
NbLevels
,
NbLevels
,
...
...
Tests/Kernels/testTaylorSimple.cpp
View file @
b16a0225
...
...
@@ -51,7 +51,7 @@
int
nbPart
=
3
;
FPoint
tabPart
[
nbPart
];
FPoint
tabPart
[
3
];
tabPart
[
0
]
=
FPoint
(
FReal
(
-
1.9
),
FReal
(
-
1.9
),
FReal
(
1.6
));
tabPart
[
1
]
=
FPoint
(
FReal
(
0.9
),
FReal
(
1.1
),
FReal
(
1.6
));
tabPart
[
2
]
=
FPoint
(
FReal
(
1.9
),
FReal
(
0.1
),
FReal
(
1.6
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment