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
f8767af5
Commit
f8767af5
authored
Jul 13, 2012
by
breuera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended build script.
Includes possible usage of parameter files and corr. examples.
parent
9d16b105
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
8 deletions
+148
-8
SConstruct
SConstruct
+27
-7
hpcsccs3_SWE_gnu_cuda_asagi.py
build/options/hpcsccs3_SWE_gnu_cuda_asagi.py
+39
-0
hpcsccs3_SWE_gnu_mpi_with_cuda_asagi.py
build/options/hpcsccs3_SWE_gnu_mpi_with_cuda_asagi.py
+40
-0
npsgpu_SWE_gnu_mpi_with_cuda_asagi.py
build/options/npsgpu_SWE_gnu_mpi_with_cuda_asagi.py
+41
-0
SConscript
src/SConscript
+1
-1
No files found.
SConstruct
View file @
f8767af5
...
...
@@ -37,8 +37,8 @@ print ' Department of Informatics'
print
' Chair of Scientific Computing'
print
' http://www5.in.tum.de/SWE'
print
''
print
'
This program
comes with ABSOLUTELY NO WARRANTY.'
print
'
This is
free software, and you are welcome to redistribute it'
print
'
SWE
comes with ABSOLUTELY NO WARRANTY.'
print
'
SWE
free software, and you are welcome to redistribute it'
print
'under certain conditions.'
print
'Details can be found in the file
\'
gpl.txt
\'
.'
print
''
...
...
@@ -48,10 +48,16 @@ print ''
#
vars
=
Variables
()
#
SWE specific variables
#
read parameters from a file if given
vars
.
AddVariables
(
PathVariable
(
'xmlFile'
,
'location of the xml-file, which contains compile parameters'
,
None
,
PathVariable
.
PathIsFile
),
PathVariable
(
'buildVariablesFile'
,
'location of the python file, which contains the build variables'
,
None
,
PathVariable
.
PathIsFile
)
)
env
=
Environment
(
variables
=
vars
)
if
'buildVariablesFile'
in
env
:
vars
=
Variables
(
env
[
'buildVariablesFile'
])
# SWE specific variables
vars
.
AddVariables
(
PathVariable
(
'buildDir'
,
'where to build the code'
,
'build'
,
PathVariable
.
PathIsDirCreate
),
EnumVariable
(
'compiler'
,
'used compiler'
,
'gnu'
,
...
...
@@ -83,6 +89,8 @@ vars.AddVariables(
# external variables
vars
.
AddVariables
(
PathVariable
(
'compilerPath'
,
'location of the C++ compiler'
,
None
,
PathVariable
.
PathIsFile
),
PathVariable
(
'linkerPath'
,
'location of the C++ linker'
,
None
,
PathVariable
.
PathIsFile
),
PathVariable
(
'cudaToolkitDir'
,
'location of the CUDA toolkit'
,
None
),
PathVariable
(
'cudaSDKDir'
,
'location of the CUDA SDK'
,
None
),
PathVariable
(
'netCDFDir'
,
'location of netCDF'
,
None
),
...
...
@@ -98,6 +106,12 @@ Help(vars.GenerateHelpText(env))
# handle unknown, maybe misspelled variables
unknownVariables
=
vars
.
UnknownVariables
()
# remove the buildVariablesFile from the list of unknown variables (used before)
if
'buildVariablesFile'
in
unknownVariables
:
unknownVariables
.
pop
(
'buildVariablesFile'
)
# exit in the case of unknown variables
if
unknownVariables
:
print
"*** The following build variables are unknown:"
,
unknownVariables
.
keys
()
Exit
(
1
)
...
...
@@ -174,12 +188,18 @@ if env['parallelization'] in ['mpi_with_cuda']:
# 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'
if
'compilerPath'
in
env
:
env
[
'CXX'
]
=
env
[
'compilerPath'
]
else
:
env
[
'CXX'
]
=
'mpiCC'
if
'linkerPath'
in
env
:
env
[
'LINKERFORPROGRAMS'
]
=
env
[
'linkerPath'
]
env
[
'LINKERFORPROGRAMS'
]
=
'mpiCC'
# set the precompiler flags and includes for netCDF
if
env
[
'writeNetCDF'
]
==
True
:
env
.
Append
(
CPPDEFINES
=
[
'WRITENETCDF'
])
env
.
Append
(
LIBS
=
[
'netcdf'
,
'netcdf_c++'
])
# set netCDF location
if
'netCDFDir'
in
env
:
env
.
Append
(
CPPPATH
=
[
env
[
'netCDFDir'
]
+
'/include'
])
...
...
@@ -193,7 +213,7 @@ if env['asagi'] == True:
env
.
Append
(
LIBS
=
[
'asagi'
])
if
'asagiDir'
in
env
:
env
.
Append
(
CPPPATH
=
[
env
[
'asagiDir'
]
+
'/include'
])
env
.
Append
(
LIBPATH
=
[
env
[
'asagiDir'
]])
env
.
Append
(
LIBPATH
=
[
env
[
'asagiDir'
]
+
'/lib'
])
if
'netCDFDir'
in
env
:
env
.
Append
(
LIBPATH
=
[
env
[
'netCDFDir'
]
+
'/lib'
])
...
...
build/options/hpcsccs3_SWE_gnu_cuda_asagi.py
0 → 100644
View file @
f8767af5
#! /usr/bin/python
# @file
# This file is part of SWE.
#
# @author Alexander Breuer (breuera AT in.tum.de, http://www5.in.tum.de/wiki/index.php/Dipl.-Math._Alexander_Breuer)
#
# @section LICENSE
#
# SWE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SWE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SWE. If not, see <http://www.gnu.org/licenses/>.
#
#
# @section DESCRIPTION
#
# Example build parameters a "gnu, cuda, asagi" setting.
#
#build options
parallelization
=
'cuda'
computeCapability
=
'sm_21'
solver
=
'fwave'
asagi
=
'yes'
# libraries (machine dependent)
cudaToolkitDir
=
'/work/breuera/software/cuda'
cudaSDKDir
=
'/work/breuera/workspace/NVIDIA_GPU_Computing_SDK'
asagiDir
=
'/work/breuera/software/asagi_nompi'
netCDFDir
=
'/home_local/breuera/software/netcdf/netcdf-4.1.3'
build/options/hpcsccs3_SWE_gnu_mpi_with_cuda_asagi.py
0 → 100644
View file @
f8767af5
#! /usr/bin/python
# @file
# This file is part of SWE.
#
# @author Alexander Breuer (breuera AT in.tum.de, http://www5.in.tum.de/wiki/index.php/Dipl.-Math._Alexander_Breuer)
#
# @section LICENSE
#
# SWE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SWE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SWE. If not, see <http://www.gnu.org/licenses/>.
#
#
# @section DESCRIPTION
#
# Example build parameters a "gnu, mpi_with_cuda, asagi" setting.
#
#build options
parallelization
=
'mpi_with_cuda'
computeCapability
=
'sm_21'
solver
=
'fwave'
asagi
=
'yes'
writeNetCDF
=
'yes'
# libraries (machine dependent)
cudaToolkitDir
=
'/work/breuera/software/cuda'
cudaSDKDir
=
'/work/breuera/workspace/NVIDIA_GPU_Computing_SDK'
asagiDir
=
'/work/breuera/software/asagi_nompi'
netCDFDir
=
'/home_local/breuera/software/netcdf/netcdf-4.1.3/'
build/options/npsgpu_SWE_gnu_mpi_with_cuda_asagi.py
0 → 100644
View file @
f8767af5
#! /usr/bin/python
# @file
# This file is part of SWE.
#
# @author Alexander Breuer (breuera AT in.tum.de, http://www5.in.tum.de/wiki/index.php/Dipl.-Math._Alexander_Breuer)
#
# @section LICENSE
#
# SWE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SWE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SWE. If not, see <http://www.gnu.org/licenses/>.
#
#
# @section DESCRIPTION
#
# Example build parameters for the NPS GPU-cluster.
#
#build options
parallelization
=
'mpi_with_cuda'
computeCapability
=
'sm_20'
solver
=
'fwave'
asagi
=
'yes'
writeNetCDF
=
'yes'
# libraries (machine dependent)
compilerPath
=
'/usr/lib64/openmpi/bin/mpiCC'
linkerPath
=
'/usr/lib64/openmpi/bin/mpiCC'
cudaSDKDir
=
'/'
asagiDir
=
'/home/prof2/software/asagi/mpi'
netCDFDir
=
'/home/prof2/software/netcdf'
src/SConscript
View file @
f8767af5
...
...
@@ -57,7 +57,7 @@ sourceFiles = ['SWE_Block.cpp']
# netCDF writer
if
env
[
'writeNetCDF'
]
==
True
:
sourceFiles
.
append
(
[
'
io
/NetCdfWriter.cpp'
]
)
sourceFiles
.
append
(
[
'
tools
/NetCdfWriter.cpp'
]
)
# xml reader
if
env
[
'xmlRuntime'
]
==
True
:
...
...
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