Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
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
LPDS
gpucloudsim
Commits
65eb3e16
Commit
65eb3e16
authored
Jun 11, 2022
by
Ahmad Siavashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add isGpuEquipped method to GpuHost
Update classes to use isGpuEquipped method
parent
c3a72367
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
CloudSimGpuExample5.java
...g/cloudbus/cloudsim/examples/gpu/CloudSimGpuExample5.java
+1
-1
CloudSimGpuExample6.java
...g/cloudbus/cloudsim/examples/gpu/CloudSimGpuExample6.java
+1
-1
GpuHost.java
...dsim/src/main/java/org/cloudbus/cloudsim/gpu/GpuHost.java
+1
-1
PerformanceGpuHost.java
...cloudbus/cloudsim/gpu/performance/PerformanceGpuHost.java
+1
-1
PowerGpuDatacenter.java
...a/org/cloudbus/cloudsim/gpu/power/PowerGpuDatacenter.java
+1
-1
PowerGpuHost.java
...in/java/org/cloudbus/cloudsim/gpu/power/PowerGpuHost.java
+1
-1
No files found.
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/gpu/CloudSimGpuExample5.java
View file @
65eb3e16
...
@@ -443,7 +443,7 @@ public class CloudSimGpuExample5 {
...
@@ -443,7 +443,7 @@ public class CloudSimGpuExample5 {
at
.
addRow
(
"Host "
+
depth
,
dft
.
format
(
datacenter
.
getHostCpuEnergyMap
().
get
(
host
)).
toString
()
+
" / "
at
.
addRow
(
"Host "
+
depth
,
dft
.
format
(
datacenter
.
getHostCpuEnergyMap
().
get
(
host
)).
toString
()
+
" / "
+
dft
.
format
(
datacenter
.
getHostEnergyMap
().
get
(
host
)).
toString
());
+
dft
.
format
(
datacenter
.
getHostEnergyMap
().
get
(
host
)).
toString
());
at
.
addRule
();
at
.
addRule
();
if
(
host
.
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
host
.
isGpuEquipped
()
)
{
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
host
.
getVideoCardAllocationPolicy
()
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
host
.
getVideoCardAllocationPolicy
()
.
getVideoCards
())
{
.
getVideoCards
())
{
depth
=
"#"
+
videoCard
.
getId
()
+
" / "
+
depth
;
depth
=
"#"
+
videoCard
.
getId
()
+
" / "
+
depth
;
...
...
modules/cloudsim-examples/src/main/java/org/cloudbus/cloudsim/examples/gpu/CloudSimGpuExample6.java
View file @
65eb3e16
...
@@ -452,7 +452,7 @@ public class CloudSimGpuExample6 {
...
@@ -452,7 +452,7 @@ public class CloudSimGpuExample6 {
at
.
addRow
(
"Host "
+
depth
,
dft
.
format
(
datacenter
.
getHostCpuEnergyMap
().
get
(
host
)).
toString
()
+
" / "
at
.
addRow
(
"Host "
+
depth
,
dft
.
format
(
datacenter
.
getHostCpuEnergyMap
().
get
(
host
)).
toString
()
+
" / "
+
dft
.
format
(
datacenter
.
getHostEnergyMap
().
get
(
host
)).
toString
());
+
dft
.
format
(
datacenter
.
getHostEnergyMap
().
get
(
host
)).
toString
());
at
.
addRule
();
at
.
addRule
();
if
(
host
.
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
host
.
isGpuEquipped
()
)
{
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
host
.
getVideoCardAllocationPolicy
()
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
host
.
getVideoCardAllocationPolicy
()
.
getVideoCards
())
{
.
getVideoCards
())
{
depth
=
"#"
+
videoCard
.
getId
()
+
" / "
+
depth
;
depth
=
"#"
+
videoCard
.
getId
()
+
" / "
+
depth
;
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/GpuHost.java
View file @
65eb3e16
...
@@ -60,7 +60,7 @@ public class GpuHost extends Host {
...
@@ -60,7 +60,7 @@ public class GpuHost extends Host {
public
double
updateVgpusProcessing
(
double
currentTime
)
{
public
double
updateVgpusProcessing
(
double
currentTime
)
{
double
smallerTime
=
Double
.
MAX_VALUE
;
double
smallerTime
=
Double
.
MAX_VALUE
;
if
(
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
isGpuEquipped
()
)
{
// Update resident vGPUs
// Update resident vGPUs
for
(
Vgpu
vgpu
:
getVideoCardAllocationPolicy
().
getVgpuVideoCardMap
().
keySet
())
{
for
(
Vgpu
vgpu
:
getVideoCardAllocationPolicy
().
getVgpuVideoCardMap
().
keySet
())
{
double
time
=
vgpu
.
updateGpuTaskProcessing
(
currentTime
,
getVideoCardAllocationPolicy
()
double
time
=
vgpu
.
updateGpuTaskProcessing
(
currentTime
,
getVideoCardAllocationPolicy
()
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/performance/PerformanceGpuHost.java
View file @
65eb3e16
...
@@ -42,7 +42,7 @@ public class PerformanceGpuHost extends GpuHost {
...
@@ -42,7 +42,7 @@ public class PerformanceGpuHost extends GpuHost {
public
double
updateVgpusProcessing
(
double
currentTime
)
{
public
double
updateVgpusProcessing
(
double
currentTime
)
{
double
smallerTime
=
Double
.
MAX_VALUE
;
double
smallerTime
=
Double
.
MAX_VALUE
;
if
(
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
isGpuEquipped
()
)
{
List
<
Vgpu
>
runningVgpus
=
new
ArrayList
<
Vgpu
>();
List
<
Vgpu
>
runningVgpus
=
new
ArrayList
<
Vgpu
>();
for
(
Vgpu
vgpu
:
getVideoCardAllocationPolicy
().
getVgpuVideoCardMap
().
keySet
())
{
for
(
Vgpu
vgpu
:
getVideoCardAllocationPolicy
().
getVgpuVideoCardMap
().
keySet
())
{
if
(
vgpu
.
getGpuTaskScheduler
().
runningTasks
()
>
0
)
{
if
(
vgpu
.
getGpuTaskScheduler
().
runningTasks
()
>
0
)
{
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/PowerGpuDatacenter.java
View file @
65eb3e16
...
@@ -54,7 +54,7 @@ public class PowerGpuDatacenter extends GpuDatacenter {
...
@@ -54,7 +54,7 @@ public class PowerGpuDatacenter extends GpuDatacenter {
getHostCpuEnergyMap
().
put
(
powerGpuHost
,
0.0
);
getHostCpuEnergyMap
().
put
(
powerGpuHost
,
0.0
);
getHostVideoCardEnergyMap
().
put
(
powerGpuHost
,
new
HashMap
<
PowerVideoCard
,
Double
>());
getHostVideoCardEnergyMap
().
put
(
powerGpuHost
,
new
HashMap
<
PowerVideoCard
,
Double
>());
VideoCardAllocationPolicy
videoCardAllocationPolicy
=
powerGpuHost
.
getVideoCardAllocationPolicy
();
VideoCardAllocationPolicy
videoCardAllocationPolicy
=
powerGpuHost
.
getVideoCardAllocationPolicy
();
if
(
videoCardAllocationPolicy
!=
null
)
{
if
(
powerGpuHost
.
isGpuEquipped
()
)
{
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
videoCardAllocationPolicy
.
getVideoCards
())
{
for
(
PowerVideoCard
videoCard
:
(
List
<
PowerVideoCard
>)
videoCardAllocationPolicy
.
getVideoCards
())
{
getHostVideoCardEnergyMap
().
get
(
powerGpuHost
).
put
(
videoCard
,
0.0
);
getHostVideoCardEnergyMap
().
get
(
powerGpuHost
).
put
(
videoCard
,
0.0
);
}
}
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/PowerGpuHost.java
View file @
65eb3e16
...
@@ -125,7 +125,7 @@ public class PowerGpuHost extends PerformanceGpuHost {
...
@@ -125,7 +125,7 @@ public class PowerGpuHost extends PerformanceGpuHost {
*/
*/
public
Map
<
VideoCard
,
Double
>
getCurrentVideoCardsPower
()
{
public
Map
<
VideoCard
,
Double
>
getCurrentVideoCardsPower
()
{
Map
<
VideoCard
,
Double
>
videoCardsPower
=
new
HashMap
<
VideoCard
,
Double
>();
Map
<
VideoCard
,
Double
>
videoCardsPower
=
new
HashMap
<
VideoCard
,
Double
>();
if
(
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
isGpuEquipped
()
)
{
for
(
VideoCard
videoCard
:
getVideoCardAllocationPolicy
().
getVideoCards
())
{
for
(
VideoCard
videoCard
:
getVideoCardAllocationPolicy
().
getVideoCards
())
{
PowerVideoCard
powerVideoCard
=
(
PowerVideoCard
)
videoCard
;
PowerVideoCard
powerVideoCard
=
(
PowerVideoCard
)
videoCard
;
videoCardsPower
.
put
(
powerVideoCard
,
powerVideoCard
.
getPower
());
videoCardsPower
.
put
(
powerVideoCard
,
powerVideoCard
.
getPower
());
...
...
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