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
327af640
Commit
327af640
authored
Oct 25, 2013
by
Johannes Spazier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated transfer of POIs from GPU to CPU. The different points are now copied individually.
parent
0a06e166
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
6 deletions
+43
-6
cpu/branches/multi-gpu/EasyWave.cu
cpu/branches/multi-gpu/EasyWave.cu
+2
-1
cpu/branches/multi-gpu/easywave.h
cpu/branches/multi-gpu/easywave.h
+3
-0
cpu/branches/multi-gpu/ewGpuNode.cu
cpu/branches/multi-gpu/ewGpuNode.cu
+31
-1
cpu/branches/multi-gpu/ewGpuNode.cuh
cpu/branches/multi-gpu/ewGpuNode.cuh
+2
-1
cpu/branches/multi-gpu/ewNode.h
cpu/branches/multi-gpu/ewNode.h
+3
-1
cpu/branches/multi-gpu/ewPOIs.cpp
cpu/branches/multi-gpu/ewPOIs.cpp
+2
-2
No files found.
cpu/branches/multi-gpu/EasyWave.cu
View file @
327af640
...
@@ -87,7 +87,7 @@ int main( int argc, char **argv )
...
@@ -87,7 +87,7 @@ int main( int argc, char **argv )
/* FIXME: check if Par.poiDt can be used for those purposes */
/* FIXME: check if Par.poiDt can be used for those purposes */
if
(
Par
.
filePOIs
&&
Par
.
poiDt
&&
((
Par
.
time
/
Par
.
poiDt
)
*
Par
.
poiDt
==
Par
.
time
)
)
{
if
(
Par
.
filePOIs
&&
Par
.
poiDt
&&
((
Par
.
time
/
Par
.
poiDt
)
*
Par
.
poiDt
==
Par
.
time
)
)
{
Node
.
copy
Intermediate
();
Node
.
copy
POIs
();
ewSavePOIs
();
ewSavePOIs
();
}
}
...
@@ -114,6 +114,7 @@ int main( int argc, char **argv )
...
@@ -114,6 +114,7 @@ int main( int argc, char **argv )
if
(
Par
.
outDump
)
{
if
(
Par
.
outDump
)
{
if
(
(
elapsed
-
lastDump
)
>=
Par
.
outDump
)
{
if
(
(
elapsed
-
lastDump
)
>=
Par
.
outDump
)
{
Node
.
copyIntermediate
();
Node
.
copyIntermediate
();
/* FIXME: needs tArr as well */
ewDumpPOIs
();
ewDumpPOIs
();
ewDump2D
();
ewDump2D
();
lastDump
=
elapsed
;
lastDump
=
elapsed
;
...
...
cpu/branches/multi-gpu/easywave.h
View file @
327af640
...
@@ -86,6 +86,9 @@ int ewSavePOIs();
...
@@ -86,6 +86,9 @@ int ewSavePOIs();
int
ewDumpPOIs
();
int
ewDumpPOIs
();
int
ewDumpPOIsCompact
(
int
istage
);
int
ewDumpPOIsCompact
(
int
istage
);
extern
int
NPOIs
;
extern
long
*
idxPOI
;
/* verbose printf: only executed if -verbose was set */
/* verbose printf: only executed if -verbose was set */
#define printf_v( Args, ... ) if( Par.verbose ) printf( Args, ##__VA_ARGS__);
#define printf_v( Args, ... ) if( Par.verbose ) printf( Args, ##__VA_ARGS__);
...
...
cpu/branches/multi-gpu/ewGpuNode.cu
View file @
327af640
...
@@ -248,7 +248,37 @@ int CGpuNode::copyIntermediate() {
...
@@ -248,7 +248,37 @@ int CGpuNode::copyIntermediate() {
return
0
;
return
0
;
}
}
clock_t
cdur
=
0
;
int
CGpuNode
::
copyPOIs
()
{
Params
&
dp
=
params
;
if
(
copied
)
return
0
;
VGpu
*
vgpu
;
for
(
int
n
=
0
;
n
<
NPOIs
;
n
++
)
{
int
i
=
idxPOI
[
n
]
/
dp
.
nJ
+
1
;
int
j
=
idxPOI
[
n
]
%
dp
.
nJ
+
1
;
for
(
int
id
=
0
;
id
<
num_virtual_gpus
;
id
++
)
{
if
(
vgpus
[
id
].
hasLine
(
i
)
)
{
vgpu
=
&
(
vgpus
[
id
]);
break
;
}
}
int
id
=
vgpu
->
data
.
idx
(
vgpu
->
getRel
(
i
),
j
);
CUDA_CALL
(
cudaSetDevice
(
vgpu
->
dev
)
)
CUDA_CALL
(
cudaMemcpy
(
h
+
idxPOI
[
n
],
vgpu
->
data
.
h
+
dp
.
lpad
+
id
,
sizeof
(
float
),
cudaMemcpyDeviceToHost
)
);
}
return
0
;
}
int
CGpuNode
::
freeMem
()
{
int
CGpuNode
::
freeMem
()
{
...
...
cpu/branches/multi-gpu/ewGpuNode.cuh
View file @
327af640
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
__device__
int
ri
(
int
ij
)
{
return
ij
+
params
.
pI
;
}
__device__
int
ri
(
int
ij
)
{
return
ij
+
params
.
pI
;
}
__device__
int
up
(
int
ij
)
{
return
ij
+
1
;
}
__device__
int
up
(
int
ij
)
{
return
ij
+
1
;
}
__device__
int
dn
(
int
ij
)
{
return
ij
-
1
;
}
__device__
int
dn
(
int
ij
)
{
return
ij
-
1
;
}
__device__
int
idx
(
int
i
,
int
j
)
{
return
(
j
-
1
)
+
(
i
-
1
)
*
params
.
pI
+
params
.
lpad
;
}
__
host__
__
device__
int
idx
(
int
i
,
int
j
)
{
return
(
j
-
1
)
+
(
i
-
1
)
*
params
.
pI
+
params
.
lpad
;
}
};
};
class
VGpu
{
class
VGpu
{
...
@@ -121,6 +121,7 @@ public:
...
@@ -121,6 +121,7 @@ public:
int
copyToGPU
();
int
copyToGPU
();
int
copyFromGPU
();
int
copyFromGPU
();
int
copyIntermediate
();
int
copyIntermediate
();
int
copyPOIs
();
int
freeMem
();
int
freeMem
();
int
run
();
int
run
();
...
...
cpu/branches/multi-gpu/ewNode.h
View file @
327af640
...
@@ -16,6 +16,7 @@ public:
...
@@ -16,6 +16,7 @@ public:
virtual
int
copyToGPU
()
=
0
;
virtual
int
copyToGPU
()
=
0
;
virtual
int
copyFromGPU
()
=
0
;
virtual
int
copyFromGPU
()
=
0
;
virtual
int
copyIntermediate
()
=
0
;
virtual
int
copyIntermediate
()
=
0
;
virtual
int
copyPOIs
()
=
0
;
virtual
int
freeMem
()
=
0
;
virtual
int
freeMem
()
=
0
;
virtual
int
run
()
=
0
;
virtual
int
run
()
=
0
;
};
};
...
@@ -68,7 +69,7 @@ public:
...
@@ -68,7 +69,7 @@ public:
int
copyToGPU
()
{
return
0
;
}
int
copyToGPU
()
{
return
0
;
}
int
copyFromGPU
()
{
return
0
;
}
int
copyFromGPU
()
{
return
0
;
}
int
copyIntermediate
()
{
return
0
;
}
int
copyIntermediate
()
{
return
0
;
}
int
copyPOIs
()
{
return
0
;
}
};
};
#pragma pack(push, 1)
#pragma pack(push, 1)
...
@@ -154,6 +155,7 @@ public:
...
@@ -154,6 +155,7 @@ public:
virtual
int
copyToGPU
()
{
return
0
;
}
virtual
int
copyToGPU
()
{
return
0
;
}
virtual
int
copyFromGPU
()
{
return
0
;
}
virtual
int
copyFromGPU
()
{
return
0
;
}
virtual
int
copyIntermediate
()
{
return
0
;
}
virtual
int
copyIntermediate
()
{
return
0
;
}
virtual
int
copyPOIs
()
{
return
0
;
}
};
};
#pragma pack(pop)
#pragma pack(pop)
...
...
cpu/branches/multi-gpu/ewPOIs.cpp
View file @
327af640
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
//#define SSHMAX_TO_SINGLE_FILE 0
//#define SSHMAX_TO_SINGLE_FILE 0
static
int
MaxPOIs
;
static
int
MaxPOIs
;
static
int
NPOIs
;
int
NPOIs
;
static
char
**
idPOI
;
static
char
**
idPOI
;
static
long
*
idxPOI
;
long
*
idxPOI
;
static
int
*
flagRunupPOI
;
static
int
*
flagRunupPOI
;
static
int
NtPOI
;
static
int
NtPOI
;
static
int
*
timePOI
;
static
int
*
timePOI
;
...
...
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