<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage2">
<storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1353180652">
- <storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.base.1353180652_org.eclipse.cdt.core.settings" id="cdt.managedbuild.toolchain.gnu.base.1353180652" name="Default"/>
- <storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.base.1353180652_cdtBuildSystem" version="4.0.0"/>
- <storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.base.1353180652_org.eclipse.cdt.core.externalSettings"/>
+ <cconfiguration id="0.1454192080">
+ <storageModule externalCElementFile="0.1454192080_org.eclipse.cdt.core.settings" id="0.1454192080" name="Default"/>
+ <storageModule externalCElementFile="0.1454192080_cdtBuildSystem" version="4.0.0"/>
+ <storageModule externalCElementFile="0.1454192080_org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.pathentry">
- <pathentry kind="mac" name="main" path="" value="smpi_simulated_main"/>
- <pathentry include="/usr/include/lua5.1" kind="inc" path="" system="true"/>
- <pathentry include="/usr/include" kind="inc" path="" system="true"/>
- <pathentry base-path="simgrid" include="include" kind="inc" path="" system="true"/>
- <pathentry base-path="simgrid" include="src/include" kind="inc" path="" system="true"/>
- <pathentry base-path="simgrid" include="src" kind="inc" path="" system="true"/>
- <pathentry excluding="**/CMakeFiles/" kind="out" path=""/>
- <pathentry kind="src" path=""/>
- </storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="simgrid.null.697056024" name="simgrid"/>
- </storageModule>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Default">
- <resource resourceType="PROJECT" workspacePath="/simgrid"/>
- </configuration>
+ <project id="simgrid.null.1424519849" name="simgrid"/>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="/usr/bin/gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="makefileGenerator">
- <runAction arguments="-f ${project_name}_scd.mk" command="/usr/bin/make" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1353180652;cdt.managedbuild.toolchain.gnu.base.1353180652.1797514135;cdt.managedbuild.tool.gnu.c.compiler.base.2037544368;cdt.managedbuild.tool.gnu.c.compiler.input.1851803849">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="/usr/bin/gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="makefileGenerator">
- <runAction arguments="-f ${project_name}_scd.mk" command="/usr/bin/make" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1353180652;cdt.managedbuild.toolchain.gnu.base.1353180652.1797514135;cdt.managedbuild.tool.gnu.cpp.compiler.base.1129818443;cdt.managedbuild.tool.gnu.cpp.compiler.input.500761747">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="/usr/bin/gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="makefileGenerator">
- <runAction arguments="-f ${project_name}_scd.mk" command="/usr/bin/make" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="0.1454192080">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
public class Cloud {
public static final double task_comp_size = 10;
public static final double task_comm_size = 10;
- public static final int hostNB = 3 ;
+ public static final int hostNB = 500 ;
public static void main(String[] args) throws MsgException {
Msg.init(args);
Msg.run();
}
-}
\ No newline at end of file
+}
}
-}
\ No newline at end of file
+}
// TODO add VDI later
XBT_PUBLIC(msg_vm_t) MSG_vm_create_core(msg_host_t location, const char *name);
XBT_PUBLIC(msg_vm_t) MSG_vm_create(msg_host_t ind_pm, const char *name,
- int core_nb, long mem_cap, long net_cap, char *disk_path, long disk_size);
+ int core_nb, long mem_cap, long net_cap, char *disk_path, long disk_size, long dp_rate, long mig_netspeed);
XBT_PUBLIC(void) MSG_vm_destroy(msg_vm_t vm);
}
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
- jint jncore, jint jramsize, jint jnetcap, jstring jdiskpath, jint jdisksize) {
+ jint jncore, jlong jramsize, jlong jnetcap, jstring jdiskpath, jlong jdisksize, jlong jdprate, jlong jmig_netspeed) {
+
msg_host_t host = jhost_get_native(env, jhost);
const char *name;
// disk_path = (*env)->GetStringUTFChars(env, jdiskpath, 0);
// disk_path = xbt_strdup(disk_path);
- msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (int) jramsize,
- (int) jnetcap, NULL, (int) jdisksize);
+ msg_vm_t vm = MSG_vm_create(host, name, (int) jncore, (long) jramsize,
+ (long) jnetcap, NULL, (long) jdisksize, (long) jdprate, (long) jmig_netspeed);
jvm_bind(env,jvm,vm);
}
*/
JNIEXPORT void JNICALL
Java_org_simgrid_msg_VM_create(JNIEnv *env, jobject jvm, jobject jhost, jstring jname,
- jint jncore, jint jramsize, jint jnetcap, jstring jdiskpath, jint jdisksize);
+ jint jncore, jlong jramsize, jlong jnetcap, jstring jdiskpath, jlong jdisksize, jlong dprate, jlong mig_netspeed);
/**
* Class org_simgrid_msg_VM
* Create a `basic' VM (i.e. 1 core, 1GB of RAM, other values are not taken into account).
*/
public VM(Host host, String name) {
- this(host,name,1,1024*1024*1024, -1, null, -1);
+ this(host,name,1,1024, -1, null, -1,0 , 0);
}
/**
- * Create a `basic' VM (i.e. 1 core, 1GB of RAM, other values are not taken into account).
+ * Create a VM
+ * @param host, Host node
+ * @param name, name of the machine
+ * @param nCore, number of core
+ * @param ramSize, size of the RAM that should be allocated (in MBytes)
+ * @param netCap (not used for the moment)
+ * @param diskPath (not used for the moment)
+ * @param diskSize (not used for the moment)
+ * @param dpRate (dirty page rate MB/flop, if you don't know put zero ;))
+ * @param migNetSpeed (network bandwith allocated for migrations in MB/s, if you don't know put zero ;))
*/
+
public VM(Host host, String name, int nCore, long ramSize,
- long netCap, String diskPath, long diskSize){
+ long netCap, String diskPath, long diskSize, long dpRate,long migNetSpeed){
super();
super.name = name;
this.currentHost = host;
- create(host, name, nCore, ramSize, netCap, diskPath, diskSize);
+ create(host, name, nCore, ramSize, netCap, diskPath, diskSize, dpRate, migNetSpeed);
VM.addVM(this);
}
/**
* Natively implemented method create the VM.
* @param nCore, number of core
- * @param ramSize, size of the RAM that should be allocated
+ * @param ramSize, size of the RAM that should be allocated (in MB)
* @param netCap (not used for the moment)
* @param diskPath (not used for the moment)
* @param diskSize (not used for the moment)
+ * @param dpRate (dirty page rate in MB/flop, if you don't know put zero ;))
+ * @param migNetSpeed (network bandwith allocated for migrations in MB/s, if you don't know put zero ;))
*/
private native void create(Host host, String name, int nCore, long ramSize,
- long netCap, String diskPath, long diskSize);
+ long netCap, String diskPath, long diskSize, long dpRate, long migNetSpeed);
/**
* start the VM
/** @brief Create a new VM with specified parameters.
* @ingroup msg_VMs*
+ * All parameters are in MBytes
*
*/
-msg_vm_t MSG_vm_create(msg_host_t ind_pm, const char *name,
- int ncpus, long ramsize, long net_cap, char *disk_path, long disksize)
+msg_vm_t MSG_vm_create(msg_host_t ind_pm, const char *name, int ncpus, long ramsize,
+ long net_cap, char *disk_path, long disksize,
+ long dp_rate, long mig_netspeed)
{
- msg_vm_t vm = MSG_vm_create_core(ind_pm, name);
-
- {
- s_ws_params_t params;
- memset(¶ms, 0, sizeof(params));
- params.ramsize = ramsize;
- //params.overcommit = 0;
- simcall_host_set_params(vm, ¶ms);
- }
-
- /* TODO: Limit net capability, take into account disk considerations. */
-
- return vm;
+ msg_vm_t vm = MSG_vm_create_core(ind_pm, name);
+ s_ws_params_t params;
+ memset(¶ms, 0, sizeof(params));
+ params.ramsize = 1L * 1024 * 1024 * ramsize;
+ //params.overcommit = 0;
+ params.devsize = 0;
+ params.skip_stage2 = 0;
+ params.max_downtime = 0.03;
+ params.dp_rate = 1L * 1024 * 1024 * dp_rate;
+ params.dp_cap = params.ramsize / 0.9; // working set memory is 90%
+ params.mig_speed = 1L * 1024 * 1024 * mig_netspeed; // mig_speed
+
+ simcall_host_set_params(vm, ¶ms);
+
+ return vm;
}
double surf_solve(double max_date)
{
+
min = -1.0; /* duration */
double next_event_date = -1.0;
double model_next_action_end = -1.0;
surf_min_index = 0;
/* sequential version */
+ struct timeval bla;
+ gettimeofday(&bla, NULL);
+ //unsigned int t = end.tv_usec - begin.tv_usec;
+ XBT_INFO("Surf_solve : bla.before iteration:%lu/%lu",bla.tv_sec, bla.tv_usec);
xbt_dynar_foreach(model_list_invoke, iter, model) {
+ gettimeofday(&bla, NULL);
+ XBT_INFO("Surf_solve : iteration:%lu/%lu",bla.tv_sec, bla.tv_usec);
surf_share_resources(model);
}
-
+ gettimeofday(&bla, NULL);
+ XBT_INFO("Surf_solve : end before iteration:%lu/%lu",bla.tv_sec, bla.tv_usec);
unsigned i;
for (i = 0; i < xbt_dynar_length(model_list_invoke); i++) {
if ((min < 0.0 || surf_mins[i] < min)
double ws_share_resources(surf_model_t workstation_model, double now)
{
- if (workstation_model->type == SURF_MODEL_TYPE_WORKSTATION)
- adjust_weight_of_dummy_cpu_actions();
+ if (workstation_model->type == SURF_MODEL_TYPE_WORKSTATION)
+ adjust_weight_of_dummy_cpu_actions();
/* Invoke the share_resources() callback of the physical cpu model object and
* the network model objects. */