Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easyWave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
geoperil
easyWave
Commits
23c9abaf
Commit
23c9abaf
authored
Apr 06, 2014
by
Johannes Spazier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor changes needed for interaction with tomcat server.
parent
04ef2c31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
11 deletions
+30
-11
code/branches/web/Makefile
code/branches/web/Makefile
+5
-8
code/branches/web/ewGpuNode.cu
code/branches/web/ewGpuNode.cu
+2
-0
code/branches/web/ewGrid.cpp
code/branches/web/ewGrid.cpp
+3
-3
code/branches/web/ewOut2D.cpp
code/branches/web/ewOut2D.cpp
+20
-0
No files found.
code/branches/web/Makefile
View file @
23c9abaf
...
@@ -4,8 +4,8 @@ CC=g++
...
@@ -4,8 +4,8 @@ CC=g++
NVCC
=
nvcc
NVCC
=
nvcc
CFLAGS
=
-O3
-I
.
CFLAGS
=
-O3
-I
.
ARCH
?=
compute_
20
ARCH
?=
compute_
13
CODE
?=
sm_
21
CODE
?=
sm_
13
NVFLAGS
=
$(CFLAGS)
-gencode
arch
=
$(ARCH)
,code
=
$(CODE)
NVFLAGS
=
$(CFLAGS)
-gencode
arch
=
$(ARCH)
,code
=
$(CODE)
CPPS
=
$(
wildcard
*
.cpp
)
CPPS
=
$(
wildcard
*
.cpp
)
...
@@ -17,17 +17,14 @@ OBJECTS=$(patsubst %.cpp, %.o, $(CPPS) ) $(patsubst %.cu,%.o,$(CUS) )
...
@@ -17,17 +17,14 @@ OBJECTS=$(patsubst %.cpp, %.o, $(CPPS) ) $(patsubst %.cu,%.o,$(CUS) )
all
:
EasyWave
all
:
EasyWave
EasyWave
:
$(OBJECTS)
link.o
EasyWave
:
$(OBJECTS)
$(NVCC)
-o
$@
$^
$(NVCC)
-o
$@
$^
-lrt
%.o
:
%.cpp *.h
%.o
:
%.cpp *.h
$(CC)
-c
$(CFLAGS)
-o
$@
$<
$(CC)
-c
$(CFLAGS)
-o
$@
$<
%.o
:
%.cu *.cuh *.h
%.o
:
%.cu *.cuh *.h
$(NVCC)
-dc
$(NVFLAGS)
-x
cu
-o
$@
$<
$(NVCC)
-c
$(NVFLAGS)
-x
cu
-o
$@
$<
link.o
:
$(CU_OBJS)
$(NVCC)
-dlink
$(NVFLAGS)
-o
$@
$^
clean
:
clean
:
rm
-f
EasyWave
*
.o
rm
-f
EasyWave
*
.o
code/branches/web/ewGpuNode.cu
View file @
23c9abaf
...
@@ -284,6 +284,8 @@ int CGpuNode::copyIntermediate() {
...
@@ -284,6 +284,8 @@ int CGpuNode::copyIntermediate() {
CUDA_CALL
(
cudaMemcpy2D
(
h
+
off
,
dp
.
nJ
*
sizeof
(
float
),
data
.
h
+
(
vgpu
.
gt
)
*
data
.
params
.
pI
+
dp
.
lpad
,
pitch
,
dp
.
nJ
*
sizeof
(
float
),
vgpu
.
size
,
cudaMemcpyDeviceToHost
)
);
CUDA_CALL
(
cudaMemcpy2D
(
h
+
off
,
dp
.
nJ
*
sizeof
(
float
),
data
.
h
+
(
vgpu
.
gt
)
*
data
.
params
.
pI
+
dp
.
lpad
,
pitch
,
dp
.
nJ
*
sizeof
(
float
),
vgpu
.
size
,
cudaMemcpyDeviceToHost
)
);
CUDA_CALL
(
cudaMemcpy2D
(
tArr
+
off
,
dp
.
nJ
*
sizeof
(
float
),
data
.
tArr
+
(
vgpu
.
gt
)
*
data
.
params
.
pI
+
dp
.
lpad
,
pitch
,
dp
.
nJ
*
sizeof
(
float
),
vgpu
.
size
,
cudaMemcpyDeviceToHost
)
);
}
}
/* copy finished */
/* copy finished */
...
...
code/branches/web/ewGrid.cpp
View file @
23c9abaf
...
@@ -104,8 +104,8 @@ int ewLoadBathymetry()
...
@@ -104,8 +104,8 @@ int ewLoadBathymetry()
int
rgL
,
rgR
,
rgT
,
rgB
;
int
rgL
,
rgR
,
rgT
,
rgB
;
/* TODO: How do we know how many steps are necessary? Assume one grid extension each
5
steps for now. */
/* TODO: How do we know how many steps are necessary? Assume one grid extension each
10
steps for now. */
int
numIter
=
ceil
(
Par
.
timeMax
/
Par
.
dt
/
5
.0
);
int
numIter
=
ceil
(
Par
.
timeMax
/
Par
.
dt
/
8
.0
);
rgL
=
My_max
(
0
,
Imin
-
numIter
);
rgL
=
My_max
(
0
,
Imin
-
numIter
);
rgR
=
My_min
(
Imax
+
numIter
,
NLon
-
1
);
rgR
=
My_min
(
Imax
+
numIter
,
NLon
-
1
);
...
@@ -133,7 +133,7 @@ int ewLoadBathymetry()
...
@@ -133,7 +133,7 @@ int ewLoadBathymetry()
LatMin
=
LatMinSec
;
LatMin
=
LatMinSec
;
LatMax
=
LatMaxSec
;
LatMax
=
LatMaxSec
;
printf_v
(
"r
gL, rgR, rgT, rgB: %u %u %u %u
\n
"
,
rgL
,
rgR
,
rgT
,
rgB
);
printf_v
(
"r
ange: %lf %lf %lf %lf
\n
"
,
LonMinSec
,
LonMaxSec
,
LatMinSec
,
LatMaxSec
);
/* upon here NLot and NLat are set according to the desired section */
/* upon here NLot and NLat are set according to the desired section */
int
NLonBase
=
NLon
;
int
NLonBase
=
NLon
;
...
...
code/branches/web/ewOut2D.cpp
View file @
23c9abaf
...
@@ -95,6 +95,26 @@ int ewOut2D()
...
@@ -95,6 +95,26 @@ int ewOut2D()
fwrite
(
&
ftmp
,
sizeof
(
float
),
1
,
fp
);
fwrite
(
&
ftmp
,
sizeof
(
float
),
1
,
fp
);
}
}
}
}
sprintf
(
record
,
"%s.2D.%5.5d.time"
,
Par
.
modelName
,
Par
.
time
);
fp
=
fopen
(
record
,
"wb"
);
fwrite
(
"DSBB"
,
4
,
1
,
fp
);
fwrite
(
&
nOutI
,
sizeof
(
short
),
1
,
fp
);
fwrite
(
&
nOutJ
,
sizeof
(
short
),
1
,
fp
);
fwrite
(
&
lonOutMin
,
sizeof
(
double
),
1
,
fp
);
fwrite
(
&
lonOutMax
,
sizeof
(
double
),
1
,
fp
);
fwrite
(
&
latOutMin
,
sizeof
(
double
),
1
,
fp
);
fwrite
(
&
latOutMax
,
sizeof
(
double
),
1
,
fp
);
dtmp
=
-
1.
;
fwrite
(
&
dtmp
,
sizeof
(
double
),
1
,
fp
);
dtmp
=
+
1.
;
fwrite
(
&
dtmp
,
sizeof
(
double
),
1
,
fp
);
for
(
j
=
Jmin
;
j
<=
Jmax
;
j
++
)
{
for
(
i
=
Imin
;
i
<=
Imax
;
i
++
)
{
ftmp
=
(
float
)
Node
(
idx
(
j
,
i
),
iTime
)
/
60
;
if
(
ftmp
<
0
)
ftmp
=
NAN
;
fwrite
(
&
ftmp
,
sizeof
(
float
),
1
,
fp
);
}
}
fclose
(
fp
);
fclose
(
fp
);
// updating contents file
// updating contents file
...
...
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