#define FILENAME3 "/home/doc/simgrid/examples/platforms/g5k_cabinets.xml"
#define FILENAME4 "/home/doc/simgrid/examples/platforms/nancy.xml"
#define FILENAME3 "/home/doc/simgrid/examples/platforms/g5k_cabinets.xml"
#define FILENAME4 "/home/doc/simgrid/examples/platforms/nancy.xml"
-XBT_LOG_NEW_DEFAULT_CATEGORY(io_file,
- "Messages specific for this io example");
-
-int host(int argc, char *argv[])
+static int host(int argc, char *argv[])
/* Write 100KB in file from the current position, i.e, end of file or 10MB */
write = MSG_file_write(file, 100000);
/* Write 100KB in file from the current position, i.e, end of file or 10MB */
write = MSG_file_write(file, 100000);
- XBT_INFO("\tHave written %llu in '%s'. Size now is: %llu",write,filename,
- MSG_file_get_size(file));
+ XBT_INFO("\tHave written %llu in '%s'. Size now is: %llu",write,filename, MSG_file_get_size(file));
XBT_INFO("\tCapacity of the storage element '%s' is stored on: %llu / %llu",
filename, MSG_storage_get_used_size(st), MSG_storage_get_size(st));
/* rewind to the beginning of the file */
XBT_INFO("\tCapacity of the storage element '%s' is stored on: %llu / %llu",
filename, MSG_storage_get_used_size(st), MSG_storage_get_size(st));
/* rewind to the beginning of the file */
MSG_file_seek(file, 0, SEEK_SET);
/* Try to read 110KB */
read = MSG_file_read(file, 110000);
MSG_file_seek(file, 0, SEEK_SET);
/* Try to read 110KB */
read = MSG_file_read(file, 110000);
- XBT_INFO("\tHave read %llu from '%s' (of size %llu)",read,filename,
- MSG_file_get_size(file));
+ XBT_INFO("\tHave read %llu from '%s' (of size %llu)",read,filename, MSG_file_get_size(file));
MSG_file_seek(file, 0, SEEK_SET);
/* Write 110KB in file from the current position, i.e, end of file or 10MB */
write = MSG_file_write(file, 110000);
MSG_file_seek(file, 0, SEEK_SET);
/* Write 110KB in file from the current position, i.e, end of file or 10MB */
write = MSG_file_write(file, 110000);
- XBT_INFO("\tHave written %llu in '%s'. Size now is: %llu", write,filename,
- MSG_file_get_size(file));
+ XBT_INFO("\tHave written %llu in '%s'. Size now is: %llu", write,filename, MSG_file_get_size(file));
XBT_INFO("\tCapacity of the storage element '%s' is stored on: %llu / %llu",
filename, MSG_storage_get_used_size(st), MSG_storage_get_size(st));
XBT_INFO("\tCapacity of the storage element '%s' is stored on: %llu / %llu",
filename, MSG_storage_get_used_size(st), MSG_storage_get_size(st));
MSG_init(&argc, argv);
MSG_create_environment(argv[1]);
xbt_dynar_t hosts = MSG_hosts_as_dynar();
MSG_function_register("host", host);
unsigned long nb_hosts = xbt_dynar_length(hosts);
XBT_INFO("Number of host '%lu'",nb_hosts);
MSG_init(&argc, argv);
MSG_create_environment(argv[1]);
xbt_dynar_t hosts = MSG_hosts_as_dynar();
MSG_function_register("host", host);
unsigned long nb_hosts = xbt_dynar_length(hosts);
XBT_INFO("Number of host '%lu'",nb_hosts);
char* name_host = bprintf("%d",i);
MSG_process_create( name_host, host, NULL, xbt_dynar_get_as(hosts,i,msg_host_t) );
free(name_host);
}
xbt_dynar_free(&hosts);
char* name_host = bprintf("%d",i);
MSG_process_create( name_host, host, NULL, xbt_dynar_get_as(hosts,i,msg_host_t) );
free(name_host);
}
xbt_dynar_free(&hosts);