Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
7fe1ae78
Commit
7fe1ae78
authored
Jun 05, 2013
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for cray
parent
29bafe20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
SConstruct
SConstruct
+24
-5
No files found.
SConstruct
View file @
7fe1ae78
...
@@ -65,7 +65,7 @@ vars.AddVariables(
...
@@ -65,7 +65,7 @@ vars.AddVariables(
PathVariable
(
'buildDir'
,
'where to build the code'
,
'build'
,
PathVariable
.
PathIsDirCreate
),
PathVariable
(
'buildDir'
,
'where to build the code'
,
'build'
,
PathVariable
.
PathIsDirCreate
),
EnumVariable
(
'compiler'
,
'used compiler'
,
'gnu'
,
EnumVariable
(
'compiler'
,
'used compiler'
,
'gnu'
,
allowed_values
=
(
'gnu'
,
'intel'
)
allowed_values
=
(
'gnu'
,
'intel'
,
'cray'
)
),
),
EnumVariable
(
'compileMode'
,
'mode of the compilation'
,
'release'
,
EnumVariable
(
'compileMode'
,
'mode of the compilation'
,
'release'
,
...
@@ -103,7 +103,9 @@ vars.AddVariables(
...
@@ -103,7 +103,9 @@ vars.AddVariables(
allowed_values
=
(
'default'
,
'mic'
)
allowed_values
=
(
'default'
,
'mic'
)
),
),
BoolVariable
(
'xmlRuntime'
,
'use a xml-file for runtime parameters'
,
False
)
BoolVariable
(
'xmlRuntime'
,
'use a xml-file for runtime parameters'
,
False
),
BoolVariable
(
'copyenv'
,
'copy the whole environment'
,
False
)
)
)
# external variables
# external variables
...
@@ -145,13 +147,20 @@ if env['parallelization'] != 'cuda' and env['openGL'] == True:
...
@@ -145,13 +147,20 @@ if env['parallelization'] != 'cuda' and env['openGL'] == True:
print
>>
sys
.
stderr
,
'** The parallelization "'
+
env
[
'parallelization'
]
+
'" does not support OpenGL visualization (CUDA only).'
print
>>
sys
.
stderr
,
'** The parallelization "'
+
env
[
'parallelization'
]
+
'" does not support OpenGL visualization (CUDA only).'
Exit
(
3
)
Exit
(
3
)
# Copy whole environment?
if
env
[
'copyenv'
]:
env
.
AppendUnique
(
ENV
=
os
.
environ
,
delete_existing
=
1
)
#
#
# precompiler, compiler and linker flags
# precompiler, compiler and linker flags
#
#
# Select the compiler (MPI and/or Intel, GNU is default)
# Select the compiler (MPI and/or Intel, GNU is default)
if
env
[
'parallelization'
]
in
[
'mpi'
,
'mpi_with_cuda'
]:
if
env
[
'parallelization'
]
in
[
'mpi'
,
'mpi_with_cuda'
]:
env
[
'CXX'
]
=
env
[
'LINKERFORPROGRAMS'
]
=
env
.
Detect
([
'mpiCC'
,
'mpicxx'
])
if
env
[
'compiler'
]
==
'cray'
:
env
[
'CXX'
]
=
'CC'
else
:
env
[
'CXX'
]
=
env
[
'LINKERFORPROGRAMS'
]
=
env
.
Detect
([
'mpiCC'
,
'mpicxx'
])
if
not
env
[
'CXX'
]:
if
not
env
[
'CXX'
]:
print
>>
sys
.
stderr
,
'** MPI compiler not found, please update PATH environment variable'
print
>>
sys
.
stderr
,
'** MPI compiler not found, please update PATH environment variable'
Exit
(
1
)
Exit
(
1
)
...
@@ -165,9 +174,12 @@ if env['parallelization'] in ['mpi', 'mpi_with_cuda']:
...
@@ -165,9 +174,12 @@ if env['parallelization'] in ['mpi', 'mpi_with_cuda']:
else
:
else
:
if
env
[
'compiler'
]
==
'intel'
:
if
env
[
'compiler'
]
==
'intel'
:
env
[
'CXX'
]
=
'icpc'
env
[
'CXX'
]
=
'icpc'
elif
env
[
'compiler'
]
==
'cray'
:
env
[
'CXX'
]
=
env
[
'LINKERFORPROGRAMS'
]
=
'CC'
# eclipse specific flag
# eclipse specific flag
env
.
Append
(
CCFLAGS
=
[
'-fmessage-length=0'
])
if
env
[
'compiler'
]
!=
'cray'
:
env
.
Append
(
CCFLAGS
=
[
'-fmessage-length=0'
])
# xml parameters for the compiler TODO
# xml parameters for the compiler TODO
...
@@ -181,6 +193,9 @@ if env['compileMode'] == 'debug':
...
@@ -181,6 +193,9 @@ if env['compileMode'] == 'debug':
elif
env
[
'compiler'
]
==
'intel'
:
elif
env
[
'compiler'
]
==
'intel'
:
env
.
Append
(
CCFLAGS
=
[
'-O0'
,
'-g'
])
env
.
Append
(
CCFLAGS
=
[
'-O0'
,
'-g'
])
elif
env
[
'compiler'
]
==
'cray'
:
env
.
Append
(
CCFLAGS
=
[
'-O0'
])
elif
env
[
'compileMode'
]
==
'release'
:
elif
env
[
'compileMode'
]
==
'release'
:
env
.
Append
(
CPPDEFINES
=
[
'NDEBUG'
])
env
.
Append
(
CPPDEFINES
=
[
'NDEBUG'
])
...
@@ -189,9 +204,13 @@ elif env['compileMode'] == 'release':
...
@@ -189,9 +204,13 @@ elif env['compileMode'] == 'release':
elif
env
[
'compiler'
]
==
'intel'
:
elif
env
[
'compiler'
]
==
'intel'
:
env
.
Append
(
CCFLAGS
=
[
'-O2'
])
env
.
Append
(
CCFLAGS
=
[
'-O2'
])
elif
env
[
'compiler'
]
==
'cray'
:
env
.
Append
(
CCFLAGS
=
[
'-O3'
])
# Other compiler flags (for all compilers)
# Other compiler flags (for all compilers)
env
.
Append
(
CCFLAGS
=
[
'-fstrict-aliasing'
,
'-fargument-noalias'
])
if
env
[
'compiler'
]
!=
'cray'
:
env
.
Append
(
CCFLAGS
=
[
'-fstrict-aliasing'
,
'-fargument-noalias'
])
# Vectorization?
# Vectorization?
if
env
[
'compileMode'
]
==
'release'
and
env
[
'vectorize'
]:
if
env
[
'compileMode'
]
==
'release'
and
env
[
'vectorize'
]:
...
...
Write
Preview
Markdown
is supported
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