GridSim安装报告

时间:2024.4.27

GridSim安装报告

清华大学 朱穗晖 2004-5-19

GridSim是一个在Windows和Linux的平台上都可以运行的网格模拟器。这个模拟器是用Java编写的所以具有跨平台特性。GridSim可以进行网格调度算法的模拟、,可以通过提供的method来编写模拟文件,从而完成模拟的过程。 1 与其他模拟器的比较

在网格领域几个比较著名的模拟器有MicroGrid,SimGrid,和Bricks。与它们相比,GridSim对于人们来说是比较陌生的。下面先来简单总结一下我这段时间根据阅读的材料,得出对这几个模拟器的一些总结。

(1) MicroGrid

这个模拟器是最有名的模拟器,关于它的详细资料可以参阅刘鹏的网格信息中转站,上面有比较多的人研究这个。在这个网格中转站上有一个关于模拟器的虚拟学习组织,经过这几天的阅读获益匪浅。

从模拟器的意义上来说,MicroGrid是这几个模拟器中比较最接近真实的模拟器。它基于Linux,建立在Globus平台上,所有的程序都模拟在Globus的基础上运行。这个模拟器现在有比较多研究算法的人采用。

不过它有一个很致命的缺点,就是它要基于Globus,而且现在还没有支持Globus3的版本。只支持到Globus2.2,这也是我不选择这个模拟器的原因。

(2) SimGrid

这个模拟器也是一个工具包,准确来说是一个API包。SimGrid也属于比较有名的一个工具包。它也是基于Linux平台,使用C来开发模拟器。这是我觉得最理想的一个模拟器,无奈想尽办法也装不上。如果能够装上,也希望能够在这个平台上跑模拟程序。

2 GridSim简介

很多人将GridSim与SimGrid混淆起来。其实SimGrid完全是Linux下面用C开发的。而GridSim完全是用Java开发的,因此具有跨平台特性。我选择Windows作为我的测试平台。

GridSim也是一套API的工具包,它也可以产生资源如处理器,也可以产生计算任务。这些都由API来完成。使用J2SDK1.42编译。然后输出结果到文件中。 3 GridSim安装步骤

下面以Window版本为例说明GridSim的安装。

(1)安装准备工作

从网站http://www.cs.mu.oz.au/~raj/gridsim/ 上面下载gridsimtoolkit-2.2(现在的最新版本)。下来是一个Zip包。

首先确认机器上是否有J2SDK。可以从上下载J2SDK的最新版本。一般是exe文件,点击装上即可。

设置Java环境变量的时候要非常注意。下面是在Windows XP上的设置方法。

GridSim安装报告

GridSim安装报告

(2)GridSim安装 点击解压后的安装文件。解压文件夹结构如下:

gridsimtoolkit-2.2/

index.html -- This file

classes/ -- The .class files

doc/ -- API Documentation

eduni/

gridbroker/

gridsim/

visualmodeler/

examples/ -- Examples, see README.txt for details

jars/ -- jar archives

source/ -- The Java source code

gridbroker/*.java

gridsim/*.java

visualmodeler/*.java

(3) 编译与运行设置

这一部分在帮助文档上没有,但是为了编译方便我自己尝试加入如下内容。 在Classpath加入C:\gridsimtoolkit-2.2\jars\all.jar

这样可以在任意目录编译运行Gridsim的Java程序了。

(4) 测试运行结果

测试文件是软件包中的Example1

该文件显示了如何使用API来讲三台机器初始化为一个网路资源/

测试文件如下

Example1.java

/*

* Author: Anthony Sulistio

* Date: April 2003

* Description: A simple program to demonstrate of how to use GridSim package. * This example shows how to create one Grid resource with three * machines.

*

* NOTE: The values used from this example are taken from the GridSim paper. * /gridsim/

* $Id: Example1.java,v 1.5 2003/12/14 05:35:24 anthony Exp $

*/

import java.util.*;

import gridsim.*;

/**

* This class creates one Grid resource with three machines. Before creating * any of GridSim entities, you should remember to call

* <tt>GridSim.Init()</tt>.

*/

class Example1

{

/**

* Main function to run this example

*/

public static void main(String[] args)

{

System.out.println("Starting example of how to create one Grid " + "resource");

try

{

// First step: Initialize the GridSim package. It should be called // before creating any entities. We can't run GridResource

// entity without initializing GridSim first. We will get run-time // exception error.

int num_user = 0; // number of users need to be created Calendar calendar = Calendar.getInstance();

boolean trace_flag = true; // mean trace GridSim events/activities

// list of files or processing names to be excluded from any

//statistical measures

String[] exclude_from_file = { "" };

String[] exclude_from_processing = { "" };

// the name of a report file to be written. We don't want to write // anything here. See other examples of using the

// ReportWriter class

String report_name = null;

// Initialize the GridSim package

System.out.println("Initializing GridSim package");

GridSim.init(num_user, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);

// Second step: Create one Grid resource

GridResource gridResource = createGridResource();

System.out.println("Finish the 1st example");

}

catch (Exception e)

{

e.printStackTrace();

System.out.println("Unwanted error happens");

}

}

/**

* Creates one Grid resource. A Grid resource contains one or more * Machines. Similarly, a Machine contains one or more PEs (Processing * Elements or CPUs).

* <p>

* In this simple example, we are simulating one Grid resource with three * Machines that contains one or more PEs.

* @return a GridResource object

*/

private static GridResource createGridResource()

{

System.out.println("Starting to create one Grid resource with " + "3 Machines ...");

// Here are the steps needed to create a Grid resource:

// 1. We need to create an object of MachineList to store one or more // Machines

MachineList mList = new MachineList();

System.out.println("Creates a Machine list");

// 2. A Machine contains one or more PEs or CPUs. Therefore, should // create an object of PEList to store these PEs before creating // a Machine.

PEList peList1 = new PEList();

System.out.println("Creates a PE list for the 1st Machine");

// 3. Create PEs and add these into an object of PEList.

// In this example, we are using a resource from

// hpc420.hpcc.jp, AIST, Tokyo, Japan

// Note: these data are taken the from GridSim paper, page 25. // In this example, all PEs has the same MIPS (Millions // Instruction Per Second) Rating for a Machine.

int MIPSRating = 377;

peList1.add( new PE(0, MIPSRating) ); // store PE id and MIPS Rating peList1.add( new PE(1, MIPSRating) );

peList1.add( new PE(2, MIPSRating) );

peList1.add( new PE(3, MIPSRating) );

System.out.println("Creates 4 PEs with same MIPS Rating and put " + "them into the PE list");

// 4. Create one Machine with its id and list of PEs or CPUs

mList.add( new Machine(0, peList1) ); // First Machine

System.out.println("Creates the 1st Machine that has 4 PEs and " + "stores it into the Machine list");

// 5. Repeat the process from 2 if we want to create more Machines // In this example, the AIST in Japan has 3 Machines with same // MIPS Rating but different PEs.

// NOTE: if you only want to create one Machine for one Grid resource, // then you could skip this step.

PEList peList2 = new PEList();

System.out.println();

System.out.println("Creates a PE list for the 2nd Machine");

peList2.add( new PE(0, MIPSRating) );

peList2.add( new PE(1, MIPSRating) );

peList2.add( new PE(2, MIPSRating) );

peList2.add( new PE(3, MIPSRating) );

System.out.println("Creates 4 PEs with same MIPS Rating and put " + "them into the PE list");

mList.add( new Machine(1, peList2) ); // Second Machine

System.out.println("Creates the 2nd Machine that has 4 PEs and " + "stores it into the Machine list");

PEList peList3 = new PEList();

System.out.println();

System.out.println("Creates a PE list for the 3rd Machine");

peList3.add( new PE(0, MIPSRating) );

peList3.add( new PE(1, MIPSRating) );

System.out.println("Creates 2 PEs with same MIPS Rating and put " + "them into the PE list");

mList.add( new Machine(2, peList3) ); // Third Machine

System.out.println("Creates the 3rd Machine that has 2 PEs and " + "stores it into the Machine list");

// 6. Create a ResourceCharacteristics object that stores the // properties of a Grid resource: architecture, OS, list of

// Machines, allocation policy: time- or space-shared, time zone // and its price (G$/PE time unit).

String arch = "Sun Ultra"; // system architecture

更多相关推荐:
安装调试报告

密级内部公开文档编号xxPATEMPAZTSBG版本号V10安装调试报告xx有限公司xx有限公司对本文件资料享受著作权及其它专属权利未经书面许可不得将该等文件资料其全部或任何部分披露予任何第三方或进行修改后使用...

安装系统报告

辽宁工程技术大学上机实验报告

在线设备安装调试报告

XXX污水处理厂在线监控系统建设安装调试报告按照国家环保要求以及《在线监测系统的安装调试规范(试行)》,我公司在建厂后就在总进口和总排口安装在线监测系统各一套。一、安装系统包括:COD在线分析仪氨氮在线分析仪超…

设备安装报告

博科交换机安装验收报告合同号NKOBJ061225S建行北京分行订购博科交换机SW120xx升级模块两套SW4100升级模块两套分别安装于SW120xx及SW4100上兹与年月日已安装完成经测试运行状况良好建行...

网络设备与安装报告

第1页第2页第3页第4页第5页第6页第7页第8页第9页第10页第11页第12页第13页第14页第15页第16页第17页第18页第19页

设备安装后自检报告

安装单位青岛XXX起重机械安装有限公司单位公章安装负责人年月日

系统安装验收报告

密级内部公开文档编号SCPATEMPXTAZYSBG版本号V10系统安装验收报告某某某股份有限公司某某某股份有限公司对本文件资料享受著作权及其它专属权利未经书面许可不得将该等文件资料其全部或任何部分披露予任何第...

大数据安装报告

西南财经大学天府学院大数据时代的信息分析平台搭建安装报告学生姓名冉殊凡陈武扬徐瑞柯邓勇所在班级财务04班西南财经大学天府学院大数据时代的信息分析实训报告一平台搭建在本次平台搭建中本小组搭建的还算基本顺利搭建途中...

调试报告

ZJF127B型斜巷防跑车装置调试报告ZJF127B型斜巷防跑车装置现场安装调试报告一基本情况主提升绞车型号提升方式单钩提升绞车提升平均速度提升斜长240米斜巷坡度提升水平1个轨距提升总脉冲数56487个每个脉...

交换机的安装调试实验报告

实验报告课程名称网络工程设计与系统集成实验项目交换机的安装与调试专业班级指导教师姓名学号成绩日期一实验目的本实验主要用来练习交换机上VLANVTP配置交换机间TRUNK配置验证VLANVTPTRUNK的工作原理...

安装调试验收报告

物业安装调试验收报告

五防、后台调试报告

试验报告继字第20xx125号试验内容寨坡110kV变电站五防闭锁装臵微机监控系统装臵试验报告试验人员试验日期20xx年12月23日审核批准五防回路闭锁装臵调试在项目调试合格处划调试不合格处划并注明现象变电站微...

安装报告(39篇)