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
b60b36d8
Commit
b60b36d8
authored
Jul 04, 2012
by
breuera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MPI support to the build script (+minor enhancements).
parent
39c72857
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
SConstruct
SConstruct
+26
-3
SConscript
src/SConscript
+4
-1
No files found.
SConstruct
View file @
b60b36d8
...
@@ -96,8 +96,15 @@ env = Environment(variables=vars)
...
@@ -96,8 +96,15 @@ env = Environment(variables=vars)
# generate help text
# generate help text
Help
(
vars
.
GenerateHelpText
(
env
))
Help
(
vars
.
GenerateHelpText
(
env
))
# handle unknown, maybe misspelled variables
unknownVariables
=
vars
.
UnknownVariables
()
if
unknownVariables
:
print
"*** The following build variables are unknown:"
,
unknownVariables
.
keys
()
Exit
(
1
)
# valid solver for CUDA?
# valid solver for CUDA?
if
env
[
'parallelization'
]
==
'cuda'
and
env
[
'solver'
]
!=
'rusanov'
and
env
[
'solver'
]
!=
'fwave'
:
if
env
[
'parallelization'
]
in
[
'cuda'
,
'mpi_with_cuda'
]
and
env
[
'solver'
]
!=
'rusanov'
and
env
[
'solver'
]
!=
'fwave'
:
print
'** The "'
+
env
[
'solver'
]
+
'" solver is not supported in CUDA.'
print
'** The "'
+
env
[
'solver'
]
+
'" solver is not supported in CUDA.'
Exit
(
1
)
Exit
(
1
)
...
@@ -137,10 +144,13 @@ elif env['solver'] == 'augrie':
...
@@ -137,10 +144,13 @@ elif env['solver'] == 'augrie':
elif
env
[
'solver'
]
==
'hybrid'
:
elif
env
[
'solver'
]
==
'hybrid'
:
env
.
Append
(
CPPDEFINES
=
[
'WAVE_PROPAGATION_SOLVER=0'
])
env
.
Append
(
CPPDEFINES
=
[
'WAVE_PROPAGATION_SOLVER=0'
])
# set the precompiler flags for serial version
if
env
[
'parallelization'
]
in
[
'none'
,
'cuda'
]:
env
.
Append
(
CPPDEFINES
=
[
'NOMPI'
])
# set the precompiler flags for CUDA
# set the precompiler flags for CUDA
if
env
[
'parallelization'
]
==
'cuda'
:
if
env
[
'parallelization'
]
in
[
'cuda'
,
'mpi_with_cuda'
]
:
env
.
Append
(
CPPDEFINES
=
[
'CUDA'
])
env
.
Append
(
CPPDEFINES
=
[
'CUDA'
])
env
.
Append
(
CPPDEFINES
=
[
'NOMPI'
])
# set the directories for the CudaTool
# set the directories for the CudaTool
if
'cudaToolkitDir'
in
env
:
if
'cudaToolkitDir'
in
env
:
...
@@ -150,10 +160,23 @@ if env['parallelization'] == 'cuda':
...
@@ -150,10 +160,23 @@ if env['parallelization'] == 'cuda':
env
.
Tool
(
'CudaTool'
,
toolpath
=
[
'.'
])
env
.
Tool
(
'CudaTool'
,
toolpath
=
[
'.'
])
# set precompiler flag for nvcc
env
.
Append
(
NVCCFLAGS
=
' -DCUDA'
)
# set the compute capability of the cuda compiler (needs to be set after the CudaTool
# set the compute capability of the cuda compiler (needs to be set after the CudaTool
env
.
Append
(
NVCCFLAGS
=
' --gpu-architecture='
)
env
.
Append
(
NVCCFLAGS
=
' --gpu-architecture='
)
env
.
Append
(
NVCCFLAGS
=
env
[
'computeCapability'
])
env
.
Append
(
NVCCFLAGS
=
env
[
'computeCapability'
])
# set the precompiler flags for MPI (CUDA)
if
env
[
'parallelization'
]
in
[
'mpi_with_cuda'
]:
env
.
Append
(
NVCCFLAGS
=
' -DUSEMPI'
)
# set the precompiler flags for MPI (C++)
if
env
[
'parallelization'
]
in
[
'mpi_with_cuda'
,
'mpi'
]:
env
.
Append
(
CPPDEFINES
=
[
'USEMPI'
])
env
[
'CXX'
]
=
'mpiCC.openmpi'
env
[
'LINKERFORPROGRAMS'
]
=
'mpiCC.openmpi'
# set the precompiler flags and includes for netCDF
# set the precompiler flags and includes for netCDF
if
env
[
'writeNetCDF'
]
==
True
:
if
env
[
'writeNetCDF'
]
==
True
:
env
.
Append
(
CPPDEFINES
=
[
'WRITENETCDF'
])
env
.
Append
(
CPPDEFINES
=
[
'WRITENETCDF'
])
...
...
src/SConscript
View file @
b60b36d8
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
Import
(
'env'
)
Import
(
'env'
)
# Code without CUDA
# Code without CUDA
if
env
[
'parallelization'
]
not
in
[
'cuda'
,
'
cuda_with_mpi
'
]:
if
env
[
'parallelization'
]
not
in
[
'cuda'
,
'
mpi_with_cuda
'
]:
if
env
[
'solver'
]
!=
'rusanov'
:
if
env
[
'solver'
]
!=
'rusanov'
:
sourceFiles
=
[
'SWE_WavePropagationBlock.cpp'
]
sourceFiles
=
[
'SWE_WavePropagationBlock.cpp'
]
else
:
else
:
...
@@ -70,8 +70,11 @@ if env['parallelization'] in ['none', 'cuda']:
...
@@ -70,8 +70,11 @@ if env['parallelization'] in ['none', 'cuda']:
else
:
else
:
print
'** The selected configuration is not implemented.'
print
'** The selected configuration is not implemented.'
Exit
(
1
)
Exit
(
1
)
elif
env
[
'parallelization'
]
in
[
'mpi_with_cuda'
,
'mpi'
]:
sourceFiles
.
append
(
[
'examples/swe_mpi.cpp'
]
)
else
:
else
:
print
'** The selected configuration is not implemented.'
print
'** The selected configuration is not implemented.'
Exit
(
1
)
# CPU compilation for sure
# CPU compilation for sure
for
i
in
sourceFiles
:
for
i
in
sourceFiles
:
...
...
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