> [ 0.000508] (2:1@alice) Have read 101663 on .\Windows\setupact.log
> [ 0.001752] (1:0@denise) Have written 100000 on ./doc/simgrid/examples/platforms/g5k.xml
> [ 0.002175] (2:1@alice) Have written 100000 on .\Windows\setupact.log
-> [ 0.002218] (1:0@denise) Have read 74609 on ./doc/simgrid/examples/platforms/g5k.xml (of size 74609)
-> [ 0.002218] (1:0@denise) Close file './doc/simgrid/examples/platforms/g5k.xml'
-> [ 0.002334] (2:1@alice) Have read 25390 on .\Windows\setupact.log (of size 25390)
-> [ 0.002334] (2:1@alice) Close file '.\Windows\setupact.log'
+> [ 0.002439] (1:0@denise) Have read 110000 on ./doc/simgrid/examples/platforms/g5k.xml (of size 117026)
+> [ 0.002439] (1:0@denise) Close file './doc/simgrid/examples/platforms/g5k.xml'
+> [ 0.002862] (2:1@alice) Have read 110000 on .\Windows\setupact.log (of size 201662)
+> [ 0.002862] (2:1@alice) Close file '.\Windows\setupact.log'
> [ 0.003374] (4:3@bob) Have written 100000 on ./doc/simgrid/examples/platforms/nancy.xml
> [ 0.003560] (3:2@carl) Have written 100000 on ./doc/simgrid/examples/platforms/g5k_cabinets.xml
-> [ 0.003622] (3:2@carl) Have read 5585 on ./doc/simgrid/examples/platforms/g5k_cabinets.xml (of size 5585)
-> [ 0.003622] (3:2@carl) Close file './doc/simgrid/examples/platforms/g5k_cabinets.xml'
-> [ 0.003720] (4:3@bob) Have read 31198 on ./doc/simgrid/examples/platforms/nancy.xml (of size 31198)
-> [ 0.003720] (4:3@bob) Close file './doc/simgrid/examples/platforms/nancy.xml'
-> [ 0.003720] (0:@) Simulation time 0.00372026
+> [ 0.004529] (4:3@bob) Have read 104023 on ./doc/simgrid/examples/platforms/nancy.xml (of size 104023)
+> [ 0.004529] (4:3@bob) Close file './doc/simgrid/examples/platforms/nancy.xml'
+> [ 0.004782] (3:2@carl) Have read 110000 on ./doc/simgrid/examples/platforms/g5k_cabinets.xml (of size 122641)
+> [ 0.004782] (3:2@carl) Close file './doc/simgrid/examples/platforms/g5k_cabinets.xml'
+> [ 0.004782] (0:@) Simulation time 0.00478201
$ ${bindir:=.}/io/file_unlink ${srcdir:=.}/examples/platforms/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (0:@) Number of host '4'
> [0.007917] (1@denise) Write 100000 bytes on ./tmp/data.txt
> [0.007917] (1@denise) File Descriptor information:
> Full name: './tmp/data.txt'
-> Size: 100000
+> Size: 300000
> Mount point: '/home'
> Storage Id: 'Disk4'
> Storage Type: 'single_SSD'
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/mc_bugged2.c size: 1387 bytes
> [0.007917] (1@denise) ./include/simdag/simdag.h size: 10325 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/sys/README size: 1461 bytes
-> [0.007917] (1@denise) ./tmp/simgrid.readme size: 100000 bytes
+> [0.007917] (1@denise) ./tmp/simgrid.readme size: 300000 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/common/randdp.c size: 1441 bytes
> [0.007917] (1@denise) ./include/msg/datatypes.h size: 4635 bytes
> [0.007917] (1@denise) ./doc/simgrid/examples/smpi/NAS/EP/randlc.c size: 3300 bytes
* (note that the next sizes are of type sg_size_t). */
long incr = delta * rate + MAXMIN_PRECISION;
action->p_storage->m_usedSize += (incr - action->p_file->size); // disk usage
- action->p_file->size = incr; // file size
+ action->p_file->size += incr; // file size
sg_size_t *psize = xbt_new(sg_size_t,1);
*psize = action->p_file->size;
<platform version="3">
<AS id="AS0" routing="Full">
<!-- STORAGE TYPES -->
- <storage_type id="crucial" model="SSD" size="500">
+ <storage_type id="crucial" model="SSD" size="500GiB">
<model_prop id="Bwrite" value="30000000" /> <!-- 30Mo/s -->
<model_prop id="Bread" value="100000000" /> <!-- 100Mo/s -->
<model_prop id="Bconnection" value="150000000" /> <!-- 150Mo/s -->
</storage_type>
- <storage_type id="single_HDD" model="linear_no_lat" size="500GiB" content_type="txt_unix">
+ <storage_type id="single_HDD" model="linear_no_lat" size="750GiB" content_type="txt_unix">
<model_prop id="Bwrite" value="30MBps" />
<model_prop id="Bread" value="100MBps" />
<model_prop id="Bconnection" value="150MBps" />
</storage_type>
<storage_type id="single_SSD" model="linear_no_lat"
- content="content/storage_content.txt" size="500GiB">
+ content="content/storage_content.txt" size="300GiB">
<model_prop id="Bwrite" value="30MBps" />
<model_prop id="Bread" value="100MBps" />
<model_prop id="Bconnection" value="150MBps" />
</storage_type>
<!-- DISKS -->
- <storage id="cdisk" typeId="single_HDD" content="msg/storage/storage_content_c.txt">
- <prop id="filename" value="prop.xml"/>
- <prop id="date" value="31-08-12"/>
- <prop id="author" value="pnavarro"/>
+ <storage id="cdisk" typeId="single_HDD" content="msg/storage/storage_content_c.txt" />
+
+ <storage id="sdisk1" typeId="single_SSD" content="msg/storage/storage_content_s1.txt">
+ <prop id="usage" value="File system"/>
+ </storage>
+
+ <storage id="sdisk2" typeId="single_HDD" content="msg/storage/storage_content_s2.txt" >
+ <prop id="usage" value="Cache"/>
</storage>
- <storage id="sdisk1" typeId="single_SSD" content="msg/storage/storage_content_s1.txt" />
- <storage id="sdisk2" typeId="single_HDD" content="msg/storage/storage_content_s2.txt" />
<!-- HOSTS -->
<host id="client" power="1000000000">
int hsm_put(const char *remote_host, const char *src, const char *dest);
sg_size_t write_local_file(char *dest, sg_size_t file_size);
sg_size_t read_local_file(const char *src);
-void display_storage_info(msg_host_t host);
void dump_storage_by_name(char *name);
void display_storage_content(msg_storage_t storage);
void get_set_storage_data(const char *storage_name);
void storage_info(msg_host_t host)
{
const char* host_name = MSG_host_get_name(host);
- XBT_INFO("*** Storage info on %s ***:", host_name);
+ XBT_INFO("*** Storage info on %s ***", host_name);
xbt_dict_cursor_t cursor = NULL;
char* mount_name;
xbt_dict_foreach(storage_list,cursor,mount_name,storage_name)
{
- XBT_INFO("Storage name: %s, mount name: %s", storage_name, mount_name);
+ XBT_INFO("\tStorage name: %s, mount name: %s", storage_name, mount_name);
sg_size_t free_size = MSG_storage_get_free_size(mount_name);
sg_size_t used_size = MSG_storage_get_used_size(mount_name);
- XBT_INFO("Free size: %llu bytes", free_size);
- XBT_INFO("Used size: %llu bytes", used_size);
+ XBT_INFO("\t\tFree size: %llu bytes", free_size);
+ XBT_INFO("\t\tUsed size: %llu bytes", used_size);
storage = MSG_storage_get_by_name(storage_name);
display_storage_properties(storage);
+ dump_storage_by_name(storage_name);
}
xbt_dict_free(&storage_list);
}
xbt_dict_cursor_t cursor = NULL;
char *key, *data;
xbt_dict_t props = MSG_storage_get_properties(storage);
- if (props){
- XBT_INFO("Properties of mounted storage: %s", MSG_storage_get_name(storage));
+ if (xbt_dict_length(props) > 0){
+ XBT_INFO("\tProperties of mounted storage: %s", MSG_storage_get_name(storage));
xbt_dict_foreach(props, cursor, key, data)
- XBT_INFO("'%s' -> '%s'", key, data);
+ XBT_INFO("\t\t'%s' -> '%s'", key, data);
}else{
- XBT_INFO("No property attached.");
+ XBT_INFO("\tNo property attached.");
}
}
XBT_INFO("%s sends %llu to %s",MSG_host_get_name(MSG_host_self()),read_size,remote_host);
msg_task_t to_execute = MSG_task_create((const char*)"hsm_put", 0, (double) read_size, (void*)dest);
MSG_task_send(to_execute, remote_host);
-
+ MSG_process_sleep(.4);
return 1;
}
sg_size_t write_local_file(char *dest, sg_size_t file_size)
{
- sg_size_t write;
+ sg_size_t written;
msg_file_t file = MSG_file_open("/sd1",dest, NULL);
- write = MSG_file_write(file, file_size);
+ written = MSG_file_write(file, file_size);
+ XBT_INFO("%llu bytes on %llu bytes have been written by %s on /sd1",written, file_size, MSG_host_get_name(MSG_host_self()));
MSG_file_close(file);
- return write;
+ return written;
}
sg_size_t read_local_file(const char *src)
return read;
}
-void display_storage_info(msg_host_t host)
-{
- const char* host_name = MSG_host_get_name(host);
- XBT_INFO("*** Storage info of: %s ***", host_name);
-
- xbt_dict_cursor_t cursor = NULL;
- char* mount_name;
- char* storage_name;
-
- xbt_dict_t storage_list = MSG_host_get_storage_list(host);
-
- xbt_dict_foreach(storage_list,cursor,mount_name,storage_name)
- {
- dump_storage_by_name(storage_name);
- }
- xbt_dict_free(&storage_list);
-}
-
void dump_storage_by_name(char *name){
XBT_INFO("*** Dump a storage element ***");
msg_storage_t storage = MSG_storage_get_by_name(name);
xbt_dict_t content = MSG_storage_get_content(storage);
if (content){
xbt_dict_foreach(content, cursor, file, psize)
- XBT_INFO("%s size: %llu bytes", file, *psize);
+ XBT_INFO("\t%s size: %llu bytes", file, *psize);
} else {
- XBT_INFO("No content.");
+ XBT_INFO("\tNo content.");
}
xbt_dict_free(&content);
}
MSG_storage_set_data(storage,strdup("Some data"));
data = MSG_storage_get_data(storage);
- XBT_INFO("Set and get data: '%s'", data);
+ XBT_INFO("\tSet and get data: '%s'", data);
}
int client(int argc, char *argv[])
{
- hsm_put("server","./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx","./scratch/toto.xml");
- hsm_put("server","./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml","./scratch/titi.cxx");
+ hsm_put("server","./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx","./scratch/toto.cxx");
+ hsm_put("server","./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml","./scratch/titi.xml");
hsm_put("server","./doc/simgrid/examples/cxx/autoDestination/Slave.cxx","./scratch/tata.cxx");
msg_task_t finalize = MSG_task_create("finalize", 0, 0, NULL);
MSG_task_send(finalize, "server");
get_set_storage_data("cdisk");
- display_storage_info(MSG_host_self());
return 1;
}
msg_task_t to_execute = NULL;
_XBT_GNUC_UNUSED int res;
- display_storage_info(MSG_host_self());
+ storage_info(MSG_host_self());
- XBT_INFO("Server waiting for transfers");
+ XBT_INFO("Server waiting for transfers ...");
while(1){
res = MSG_task_receive(&(to_execute), MSG_host_get_name(MSG_host_self()));
xbt_assert(res == MSG_OK, "MSG_task_get failed");
to_execute = NULL;
}
- display_storage_info(MSG_host_self());
+ storage_info(MSG_host_self());
return 1;
}
$ msg/storage/storage_basic --cfg=path:${srcdir:=.} ${srcdir:=.}/msg/storage/platform.xml ${srcdir:=.}/msg/storage/deployment.xml 0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:server@server) *** Storage info of: server ***
+> [ 0.000000] (1:server@server) *** Storage info on server ***
+> [ 0.000000] (1:server@server) Storage name: sdisk1, mount name: /sd1
+> [ 0.000000] (1:server@server) Free size: 322122547160 bytes
+> [ 0.000000] (1:server@server) Used size: 40 bytes
+> [ 0.000000] (1:server@server) Properties of mounted storage: sdisk1
+> [ 0.000000] (1:server@server) 'usage' -> 'File system'
> [ 0.000000] (1:server@server) *** Dump a storage element ***
> [ 0.000000] (1:server@server) Print the content of the storage element: sdisk1
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml size: 21339320000 bytes
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx size: 113700000 bytes
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Master.cxx size: 18910000 bytes
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx size: 710000000 bytes
-> [ 0.000000] (1:server@server) *** Dump a storage element ***
-> [ 0.000000] (1:server@server) Print the content of the storage element: sdisk2
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/basic/Slave.cxx size: 69300000 bytes
-> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/basic/Main.cxx size: 14800000 bytes
-> [ 0.000000] (1:server@server) Server waiting for transfers
-> [ 0.000710] (2:client@client) client has read 71000 on ./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx
-> [ 0.000710] (2:client@client) client sends 71000 to server
-> [ 0.014595] (2:client@client) client has read 1262000 on ./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml
-> [ 0.014595] (2:client@client) client sends 1262000 to server
-> [ 0.896175] (2:client@client) client has read 87000000 on ./doc/simgrid/examples/cxx/autoDestination/Slave.cxx
-> [ 0.896175] (2:client@client) client sends 87000000 to server
-> [ 4.550878] (2:client@client) *** GET/SET DATA for storage element: cdisk ***
-> [ 4.550878] (2:client@client) Get data: '(null)'
-> [ 4.550878] (2:client@client) Set and get data: 'Some data'
-> [ 4.550878] (2:client@client) *** Storage info of: client ***
-> [ 4.550878] (1:server@server) *** Storage info of: server ***
-> [ 4.550878] (2:client@client) *** Dump a storage element ***
-> [ 4.550878] (2:client@client) Print the content of the storage element: cdisk
-> [ 4.550878] (2:client@client) ./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx size: 71000 bytes
-> [ 4.550878] (2:client@client) ./doc/simgrid/examples/cxx/autoDestination/BasicTask.cxx size: 6500000 bytes
-> [ 4.550878] (2:client@client) ./doc/simgrid/examples/cxx/autoDestination/Main.cxx size: 1480000 bytes
-> [ 4.550878] (2:client@client) ./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml size: 1262000 bytes
-> [ 4.550878] (2:client@client) ./doc/simgrid/examples/cxx/autoDestination/Slave.cxx size: 87000000 bytes
-> [ 4.550878] (1:server@server) *** Dump a storage element ***
-> [ 4.550878] (1:server@server) Print the content of the storage element: sdisk1
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml size: 21339320000 bytes
-> [ 4.550878] (1:server@server) ./scratch/toto.xml size: 71000 bytes
-> [ 4.550878] (1:server@server) ./scratch/tata.cxx size: 87000000 bytes
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx size: 113700000 bytes
-> [ 4.550878] (1:server@server) ./scratch/titi.cxx size: 1262000 bytes
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Master.cxx size: 18910000 bytes
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx size: 710000000 bytes
-> [ 4.550878] (1:server@server) *** Dump a storage element ***
-> [ 4.550878] (1:server@server) Print the content of the storage element: sdisk2
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/basic/Slave.cxx size: 69300000 bytes
-> [ 4.550878] (1:server@server) ./doc/simgrid/examples/cxx/basic/Main.cxx size: 14800000 bytes
-> [ 4.550878] (0:@) Simulated time: 4.55088
+> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml size: 10 bytes
+> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx size: 10 bytes
+> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Master.cxx size: 10 bytes
+> [ 0.000000] (1:server@server) ./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx size: 10 bytes
+> [ 0.400000] (1:server@server) Storage name: sdisk2, mount name: /sd2
+> [ 0.400000] (1:server@server) Free size: 805306367980 bytes
+> [ 0.400000] (1:server@server) Used size: 20 bytes
+> [ 0.400000] (1:server@server) Properties of mounted storage: sdisk2
+> [ 0.400000] (1:server@server) 'usage' -> 'Cache'
+> [ 0.400000] (1:server@server) *** Dump a storage element ***
+> [ 0.400000] (1:server@server) Print the content of the storage element: sdisk2
+> [ 0.400000] (1:server@server) ./doc/simgrid/examples/cxx/basic/Slave.cxx size: 10 bytes
+> [ 0.400000] (1:server@server) ./doc/simgrid/examples/cxx/basic/Main.cxx size: 10 bytes
+> [ 0.800000] (1:server@server) Server waiting for transfers ...
+> [ 0.805000] (2:client@client) client has read 500001 on ./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx
+> [ 0.805000] (2:client@client) client sends 500001 to server
+> [ 0.826647] (1:server@server) 500001 bytes on 500001 bytes have been written by server on /sd1
+> [ 1.217980] (2:client@client) client has read 800000 on ./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml
+> [ 1.217980] (2:client@client) client sends 800000 to server
+> [ 1.252225] (1:server@server) 800000 bytes on 800000 bytes have been written by server on /sd1
+> [ 2.083559] (2:client@client) client has read 45800000 on ./doc/simgrid/examples/cxx/autoDestination/Slave.cxx
+> [ 2.083559] (2:client@client) client sends 45800000 to server
+> [ 4.007494] (1:server@server) 45800000 bytes on 45800000 bytes have been written by server on /sd1
+> [ 4.008145] (2:client@client) *** GET/SET DATA for storage element: cdisk ***
+> [ 4.008145] (2:client@client) Get data: '(null)'
+> [ 4.008145] (2:client@client) Set and get data: 'Some data'
+> [ 4.008145] (1:server@server) *** Storage info on server ***
+> [ 4.008145] (1:server@server) Storage name: sdisk1, mount name: /sd1
+> [ 4.008145] (1:server@server) Free size: 322087447159 bytes
+> [ 4.008145] (1:server@server) Used size: 35100041 bytes
+> [ 4.008145] (1:server@server) Properties of mounted storage: sdisk1
+> [ 4.008145] (1:server@server) 'usage' -> 'File system'
+> [ 4.008145] (1:server@server) *** Dump a storage element ***
+> [ 4.008145] (1:server@server) Print the content of the storage element: sdisk1
+> [ 4.008145] (1:server@server) ./scratch/titi.xml size: 800000 bytes
+> [ 4.008145] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml size: 10 bytes
+> [ 4.008145] (1:server@server) ./scratch/tata.cxx size: 45800000 bytes
+> [ 4.008145] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx size: 10 bytes
+> [ 4.008145] (1:server@server) ./scratch/toto.cxx size: 500001 bytes
+> [ 4.008145] (1:server@server) ./doc/simgrid/examples/cxx/autoDestination/Master.cxx size: 10 bytes
+> [ 4.008145] (1:server@server) ./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx size: 10 bytes
+> [ 4.408145] (1:server@server) Storage name: sdisk2, mount name: /sd2
+> [ 4.408145] (1:server@server) Free size: 805306367980 bytes
+> [ 4.408145] (1:server@server) Used size: 20 bytes
+> [ 4.408145] (1:server@server) Properties of mounted storage: sdisk2
+> [ 4.408145] (1:server@server) 'usage' -> 'Cache'
+> [ 4.408145] (1:server@server) *** Dump a storage element ***
+> [ 4.408145] (1:server@server) Print the content of the storage element: sdisk2
+> [ 4.408145] (1:server@server) ./doc/simgrid/examples/cxx/basic/Slave.cxx size: 10 bytes
+> [ 4.408145] (1:server@server) ./doc/simgrid/examples/cxx/basic/Main.cxx size: 10 bytes
+> [ 4.808145] (0:@) Simulated time: 4.80814
+
-./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx 71000
-./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml 1262000
-./doc/simgrid/examples/cxx/autoDestination/Main.cxx 1480000
-./doc/simgrid/examples/cxx/autoDestination/Slave.cxx 87000000
-./doc/simgrid/examples/cxx/autoDestination/BasicTask.cxx 6500000
+./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx 500001
+./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml 800000
+./doc/simgrid/examples/cxx/autoDestination/Main.cxx 75000000
+./doc/simgrid/examples/cxx/autoDestination/Slave.cxx 45800000
+./doc/simgrid/examples/cxx/autoDestination/BasicTask.cxx 400000
-./doc/simgrid/examples/cxx/autoDestination/Master.cxx 18910000
-./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml 21339320000
-./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx 113700000
-./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx 710000000
+./doc/simgrid/examples/cxx/autoDestination/Master.cxx 10
+./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml 10
+./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx 10
+./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx 10
-./doc/simgrid/examples/cxx/basic/Main.cxx 14800000
-./doc/simgrid/examples/cxx/basic/Slave.cxx 69300000
\ No newline at end of file
+./doc/simgrid/examples/cxx/basic/Main.cxx 10
+./doc/simgrid/examples/cxx/basic/Slave.cxx 10
\ No newline at end of file