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
53023e7a
Commit
53023e7a
authored
Jul 23, 2010
by
Anton Beloglazov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added ant build file
- Updated the readme files
parent
9de43c8d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
61 deletions
+168
-61
build.xml
documentation/src/main/resources/build.xml
+77
-0
examples.txt
documentation/src/main/resources/examples.txt
+44
-14
readme.txt
documentation/src/main/resources/readme.txt
+46
-46
VmAllocationPolicySimple.java
.../java/org/cloudbus/cloudsim/VmAllocationPolicySimple.java
+1
-1
No files found.
documentation/src/main/resources/build.xml
0 → 100644
View file @
53023e7a
<?xml version="1.0"?>
<!--
July 2010
Build file or Makefile for CloudSim.
Note:
Make sure you have installed 'ant' and put the location of it into
your path so you can access it anywhere.
'ant' can be downloadable from http://ant.apache.org/
Usage:
* Type 'ant' to compile all cloudsim source files, put them into the
classes/ directory and to create a cloudsim-new.jar file in the jars/ directory
* Type 'ant clean' to delete all the compiled classes and the classes/
directory itself. The generated cloudsim-new.jar is not deleted.
Note:
* You need to set up PATH for ant in Windows and/or Unix.
Acknowledgement:
Thank to Uros Cibej for providing this file and instruction on
how to use it.
-->
<project
name=
"CloudSim"
basedir=
"."
default=
"makejar"
>
<description>
This is the build file for CloudSim
</description>
<!-- location to store Java classes -->
<property
name=
"class.dir"
location=
"./classes"
/>
<!-- location to store CloudSim source files -->
<property
name=
"src.dir"
location=
"./sources"
/>
<!-- location to store jar files -->
<property
name=
"jar.dir"
location=
"./jars"
/>
<target
name=
"prepare"
>
<mkdir
dir=
"${class.dir}"
/>
</target>
<!-- rule to compile CloudSim source files -->
<target
name=
"build"
depends=
"prepare"
>
<javac
srcdir=
"${src.dir}"
destdir=
"${class.dir}"
classpath=
"${classpath}"
/>
</target>
<!-- Rule for making a jar file.
Note:
* The new jar file is named as "cloudsim-new.jar" to avoid overriding
the existing jar file.
* The new jar file only contains cloudsim classes only.
-->
<target
name=
"makejar"
depends=
"build"
>
<echo>
Compiling a new jar file, named: "cloudsim-new.jar".
</echo>
<echo>
This jar file contains CloudSim classes only.
</echo>
<jar
destfile=
"${jar.dir}/cloudsim-new.jar"
basedir=
"${class.dir}"
/>
</target>
<target
name=
"clean"
description=
"clean up"
>
<delete
dir=
"${class.dir}"
/>
</target>
</project>
documentation/src/main/resources/examples.txt
View file @
53023e7a
This directory contains examples in the use of CloudSim
Running the CloudSim examples
-----------------------------
To run the CloudSim examples you need to do the following steps.
To compile the example source code
s:
In Window
s:
In Unix/Linux: javac -classpath $CLOUDSIM/jar/cloudsim-2.0.jar:. cloudsim/examples/CloudSimExampleX.java
In Windows: javac -classpath %CLOUDSIM%\jar\cloudsim-2.0.jar;. cloudsim\examples\CloudSimExampleX.java
1. cd <PATH TO CLOUDSIM PACKAGE>\jars
2. java -classpath cloudsim-<VERSION>.jar;cloudsim-examples-<VERSION>.jar org.cloudbus.cloudsim.examples.CloudSimExample<EXAMPLE NUMBER>
To run the class file:
In Unix/Linux:
java -classpath $CLOUDSIM/jar/cloudsim-2.0.jar:. cloudsim.examples.CloudSimExampleX > file.txt
In Unix/Linux:
In Windows:
java -classpath %CLOUDSIM%\jar\cloudsim-2.0.jar;. cloudsim.examples.CloudSimExampleX > file.txt
1. cd <PATH TO CLOUDSIM PACKAGE>/jars
2. java -classpath cloudsim-<VERSION>.jar:cloudsim-examples-<VERSION>.jar org.cloudbus.cloudsim.examples.CloudSimExample<EXAMPLE NUMBER>
The above command means run the program and output the results into a file
named "file.txt" rather than into screen or standard output.
Where you need to replace:
<PATH TO CLOUDSIM PACKAGE> - by the path to a directory where you have unpacked the CloudSim package
<VERSION> - by the version of the downloaded CloudSim package
<EXAMPLE NUMBER> - by the of number of the example you want to run
Here are the summary of what each example does:
CloudSim examples source code
-----------------------------
You can find the source code of the examples in <PATH TO CLOUDSIM PACKAGE>/examples/org/cloudbus/cloudsim/examples/
Compiling and running examples
------------------------------
To compile and run an example (let's say org.cloudbus.cloudsim.examples.CloudSimExample1) you need to do the following steps:
In Windows:
1. cd <PATH TO CLOUDSIM PACKAGE>
2. javac -classpath jars\cloudsim-<VERSION>.jar examples\org\cloudbus\cloudsim\examples\CloudSimExample1.java
3. java -classpath jars\cloudsim-<VERSION>.jar;examples org.cloudbus.cloudsim.examples.CloudSimExample1
In Unix/Linux:
1. cd <PATH TO CLOUDSIM PACKAGE>
2. javac -classpath jars/cloudsim-<VERSION>.jar examples/org/cloudbus/cloudsim/examples/CloudSimExample1.java
3. java -classpath jars/cloudsim-<VERSION>.jar:examples org.cloudbus.cloudsim.examples.CloudSimExample1
Description of the CloudSim examples
------------------------------------
Here is the description of what each example does:
CloudSimExample1.java : shows how to create a datacenter with one host and run one cloudlet on it.
...
...
@@ -38,6 +68,6 @@ CloudSimExample7.java : shows how to pause simulations.
CloudSimExample8.java : shows how to add entities in run time.
network: this
directory
contains examples on how to run simulation with network simulation.
network: this
package
contains examples on how to run simulation with network simulation.
power: this directory contains examples on how to use CloudSim's power-aware features.
\ No newline at end of file
power: this package contains examples on how to use CloudSim's power-aware features.
\ No newline at end of file
documentation/src/main/resources/readme.txt
View file @
53023e7a
Directory
Structure of CloudSim Toolkit 2.0
---------------------------------------
$CLOUDSIM
/ -- top level CloudSim directory
classes/ -- The CloudSim class files
doc/ -- CloudSim API Documentation
examples/ -- CloudSim examples and Class Diagram
jar/ -- CloudSim jar archives
lib/ -- external librarie
s
src/ -- CloudSim source code
test -- CloudSim unit tests
Software Requirements : Java version 1.6 or newer
---------------------
Directory
structure of the CloudSim Toolkit
---------------------------------------
----
cloudsim
/ -- top level CloudSim directory
docs/ -- CloudSim API Documentation
examples/ -- CloudSim examples
jars/ -- CloudSim jar archives
sources/ -- CloudSim source code
tests/ -- CloudSim unit test
s
Software requirements: Java version 1.6 or newer
-------------------------------------------------
CloudSim has been tested and ran on Sun's Java version 1.6.0 or newer.
Older versions of Java are not compatible.
If you have non-Sun Java version, such as gcj or J++, they may not be compatible.
You also need to install Ant to compile CloudSim (explained in more details later).
Installation and Running CloudSim Toolkit
----------------------------------------
You just need to unpack the CloudSim file to install.
If you want to remove CloudSim, then remove the whole $CLOUDSIM directory.
NOTE: You do not need to compile CloudSim source code. The JAR file is
provided to compile and to run CloudSim applications.
Installation and running the CloudSim Toolkit
-----------------------------------------
* cloudsim.jar -- contains CloudSim class files only
You just need to unpack the CloudSim file to install.
If you want to remove CloudSim, then remove the whole cloudsim directory.
You do not need to compile CloudSim source code. The JAR files are
provided to compile and to run CloudSim applications:
To compile and run CloudSim applications, do the following step:
1) Go the directory where the CloudSim's Examples reside
In Unix or Linux: cd $CLOUDSIM/examples/
In Windows: cd %CLOUDSIM%\examples\
* jars/cloudsim-<VERSION>.jar -- contains the CloudSim class files
* jars/cloudsim-<VERSION>-sources.jar -- contains the CloudSim source code files
* jars/cloudsim-examples-<VERSION>.jar -- contains the CloudSim examples class files
* jars/cloudsim-examples-<VERSION>-sources.jar -- contains the CloudSim examples source code files
2) Compile the Java source file
In Unix or Linux: javac -classpath $CLOUDSIM/jar/cloudsim-2.0.jar:. cloudsim/examples/CloudSimExampleX.java
In Windows: javac -classpath %CLOUDSIM%\jar\cloudsim-2.0.jar;. cloudsim\examples\CloudSimExampleX.java
3) Running the Java class file
In Unix or Linux: java -classpath $CLOUDSIM/jar/cloudsim-2.0.jar:. cloudsim.examples.CloudSimExampleX
In Windows: java -classpath %CLOUDSIM%\jar\cloudsim-2.0.jar;. cloudsim.examples.CloudSimExampleX
Running the CloudSim examples
-----------------------------
NOTE:
* $CLOUDSIM or %CLOUDSIM% is the location of the CloudSim Toolkit package.
Please read how to run the CloudSim examples in examples.txt
Learning CloudSim
-----------------
To understand how to use CloudSim, please go through the examples provided
in the $CLOUDSIM/examples/ directory.
in the examples/ directory.
Compiling CloudSim: using Ant
-----------------------------
Compiling CloudSim : Using Ant
------------------
This release contains a simple buildfile for compiling CloudSim classes.
You need to have ant installed (http://ant.apache.org/).
Ant can be used in both Windows and Unix/Linux environment.
Usage:
* type 'ant' to compile all CloudSim source files and put them into
classes/ directory
* type 'ant makejar' to compile the source files (if necessary) and to create
a new jar file called "new_cloudsim.jar" into jars/ directory.
NOTE:
* You need to set up PATH for ant in Windows and/or Unix.
* rule for javadoc is not included yet. Use javadoc.sh script on Unix instead.
* Being in the CloudSim root directory (cloudsim/), type 'ant' to compile all
cloudsim source files, put them into the classes/ directory and to create
a cloudsim-new.jar file in the jars/ directory
* Being in the CloudSim root directory (cloudsim/), type 'ant clean' to delete
all the compiled classes and the classes/ directory itself. The generated
cloudsim-new.jar is not deleted.
Note:
* You need to set up PATH for ant in Windows and/or Unix.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/VmAllocationPolicySimple.java
View file @
53023e7a
...
...
@@ -79,7 +79,7 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy {
if
(!
getVmTable
().
containsKey
(
vm
.
getUid
()))
{
//if this vm was not created
do
{
//we still trying until we find a host or until
l
we try all of them
do
{
//we still trying until we find a host or until we try all of them
int
moreFree
=
Integer
.
MIN_VALUE
;
int
idx
=
-
1
;
...
...
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