Disksim 4.0 + SSD-extention make编译时出现错误 “ **commands commence before first target. Stop.”

来源:互联网 发布:three.js obj模型 编辑:程序博客网 时间:2024/05/16 11:45

1、首先参考博文 http://blog.chinaunix.net/uid-28536106-id-3463775.html 安装Disksim 4.0 + SSD-extention

2、make的过程中出现错误,这是因为在 上述博文提到的

Step 3. Append SSD model library path to dixtrac.
add these lines to dixtrac/.paths

# path to ssdmodel
export SSDMODEL_PREFIX=../ssdmodel
export SSDMODEL_INCL=$(SSDMODEL_PREFIX)/include
export SSDMODEL_CFLAGS=-I$(SSDMODEL_INCL)
export SSDMODEL_LDPATH=$(SSDMODEL_PREFIX)/lib
export SSDMODEL_LDFLAGS=-L$(SSDMODEL_LDPATH) -lssdmodel
modify dixtrac/Makefile like this :
$(LIBDISKSIM_LDFLAGS) \
$(MEMSMODEL_LDFLAGS) \
$(DISKMODEL_LDFLAGS) \
$(SSDMODEL_LDFLAGS) \
$(LIBPARAM_LDFLAGS) \
$(LIBDDBG_LDFLAGS) \
$(ST_LDFLAGS)

CFLAGS = -Wall -g -MD -I. $(DEFINES) -I$(STHREADS) $(DMINCLUDES) \
$(LIBDISKSIM_CFLAGS) \
$(DISKMODEL_CFLAGS) $(LIBPARAM_CFLAGS) $(LIBDDBG_CFLAGS) \
$(SSDMODEL_CFLAGS)

问题就出来加粗斜线部分,makefile命令的第一个字符应该是[tab]键,但是我用了空格,所以会报错:**commands commence before first target.  Stop

备注:1、本人用的ubuntu 10.04 ,gcc 4.3.4,flex 2.5.4 ,bison 2.5.1

   2、按照参考博文所说,如果不用dixtrac版本,直接step1,2,4,5就能正常运行,跳过了step3,可以正确执行


运行disksim

Run DiskSim
disksim <parfile> <outfile> <tracetype> <tracefile> <synthgen> [p.o]
<parfile> : parameter file
<outfile> : output file (redirect ro terminal by ”stdout”)
<tracetype> : format of input trace file
<tracefile> : trace file used as inuput
<synthgen> : activate synthetic workload generator
[p.o] : allow parfile parameter override
Example :
$./disksim ssd-sr250k.parv ssd-sr250k.outv ascii 0 1


以下执行的部分结果:

Sequential read (250K I/Os): average SSD response time should be around 0.132 ms
ssd Response time average:      0.132511
Sequential write (250K I/Os): average SSD response time should be around 0.310 ms
ssd Response time average:      0.310895
Sequential write (5M I/Os): average SSD response time should be around 0.334 ms
ssd Response time average:      0.334365
Random read (250K I/Os): average SSD response time should be around 0.136 ms
ssd Response time average:      0.136118
Random write (250K I/Os): average SSD response time should be around 0.329 ms
ssd Response time average:      0.329458
Random write (5M I/Os): average SSD response time should be around 0.593 ms

参考文章:http://blog.chinaunix.net/uid-28536106-id-3463775.html

原创粉丝点击