- New property: watt_off to denote the disipation when the host is off
- New functions getWattMinAt and getWattMaxAt to retrieve the
dissipation of pstates that we are not currently at.
+ * Massive rename s/workstation/host/
+ - That's intrusive, but that's good for the project consistency. Sorry.
+ - Change config option "workstation/model" into "host/model"
XBT
* New functions
- Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use
(to complete)
+ * Surf internal cleanup: rename workstation into host.
+ Option "workstation/model" now reads "host/model"
_ _____ _ _
__ _____ _ __ ___(_) ___ _ __ |___ / / / |
\ \ / / _ \ '__/ __| |/ _ \| '_ \ |_ \ | | |
src/surf/surf_routing_vivaldi.hpp
src/surf/surfxml_parse.c
src/surf/trace_mgr_private.h
- src/surf/vm_workstation_hl13.hpp
- src/surf/vm_workstation_interface.hpp
- src/surf/workstation_clm03.hpp
- src/surf/workstation_interface.hpp
- src/surf/workstation_ptask_L07.hpp
+ src/surf/vm_hl13.hpp
+ src/surf/vm_interface.hpp
+ src/surf/host_clm03.hpp
+ src/surf/host_interface.hpp
+ src/surf/host_ptask_L07.hpp
src/win32/config.h
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/automaton/parserPromela.lex
src/surf/surfxml_parse.c
src/surf/surfxml_parseplatf.c
src/surf/trace_mgr.c
- src/surf/vm_workstation_hl13.cpp
- src/surf/vm_workstation_interface.cpp
- src/surf/workstation_clm03.cpp
- src/surf/workstation_interface.cpp
- src/surf/workstation_ptask_L07.cpp
+ src/surf/vm_hl13.cpp
+ src/surf/vm_interface.cpp
+ src/surf/host_clm03.cpp
+ src/surf/host_interface.cpp
+ src/surf/host_ptask_L07.cpp
src/xbt/xbt_sg_stubs.c
)
\section options_model Configuring the platform models
\anchor options_storage_model
-\anchor options_vm_workstation_model
+\anchor options_vm_model
\subsection options_model_select Selecting the platform models
SimGrid comes with several network, CPU and storage models built in, and you
should provide information about all models for all existing resources.
- \b network/model: specify the used network model
- \b cpu/model: specify the used CPU model
- - \b workstation/model: specify the used workstation model
+ - \b host/model: specify the used host model
- \b storage/model: specify the used storage model (there is currently only one such model - this option is hence only useful for future releases)
- \b vm_workstation/model: specify the workstation model for virtual machines (there is currently only one such model - this option is hence only useful for future releases)
Concerning the CPU, we have only one model for now:
- \b Cas01: Simplistic CPU model (time=size/power)
-The workstation concept is the aggregation of a CPU with a network
+The host concept is the aggregation of a CPU with a network
card. Three models exists, but actually, only 2 of them are
interesting. The "compound" one is simply due to the way our internal
code is organized, and can easily be ignored. So at the end, you have
-two workstation models: The default one allows to aggregate an
+two host models: The default one allows to aggregate an
existing CPU model with an existing network model, but does not allow
parallel tasks because these beasts need some collaboration between
the network and CPU model. That is why, ptask_07 is used by default
when using SimDag.
- - \b default: Default workstation model. Currently, CPU:Cas01 and
+ - \b default: Default host model. Currently, CPU:Cas01 and
network:LV08 (with cross traffic enabled)
- - \b compound: Workstation model that is automatically chosen if
+ - \b compound: Host model that is automatically chosen if
you change the network and CPU models
- - \b ptask_L07: Workstation model somehow similar to Cas01+CM02 but
+ - \b ptask_L07: Host model somehow similar to Cas01+CM02 but
allowing parallel tasks
\subsection options_generic_plugin Plugins
This is activated through the \b network/crosstraffic item, that
can be set to 0 (disable this feature) or 1 (enable it).
-Note that with the default workstation model this option is activated by default.
+Note that with the default host model this option is activated by default.
\subsubsection options_model_network_coord Coordinated-based network models
- \c gtnets/jitter: \ref options_pls
- \c gtnets/jitter_seed: \ref options_pls
+- \c host/model: \ref options_model_select
+
- \c maxmin/precision: \ref options_model_precision
- \c msg/debug_multiple_use: \ref options_msg_debug_multiple_use
- \c verbose-exit: \ref options_generic_exit
- \c vm_workstation/model: \ref options_vm_workstation_model
-- \c workstation/model: \ref options_model_select
\subsection options_index_smpi_coll Index of SMPI collective algorithms options
<config id="General">
<prop id="maxmin/precision" value="0.000010"></prop>
<prop id="cpu/optim" value="TI"></prop>
- <prop id="workstation/model" value="compound"></prop>
+ <prop id="host/model" value="compound"></prop>
<prop id="network/model" value="SMPI"></prop>
<prop id="path" value="~/"></prop>
<prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
pointer functions to some the right surf functions. Since there can be
more than one callback attached to the same event (if more than one
model is in use, for example), they are stored in a dynar. Example in
-workstation_ptask_L07.c:
+host_ptask_L07.c:
\verbatim
/* Adding callback functions */
surf_parse_reset_parser();
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% "(see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information)
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm0)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm1)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm2)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm3)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm4)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm5)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm6)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm7)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm8)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm9)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm10)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm11)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm12)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm0)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm1)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm2)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm3)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm4)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm5)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm6)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm7)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm8)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm9)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm10)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm11)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm12)@PM(host1) with 0 mounted disks
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Round trip of VM1 (load 90%)
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] - Launch migration from host 0 to host 1
> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Start migration of VM vm0 to host1
#! tesh
-$ java -classpath ${classpath:=.} surfCpuModel/TestCpuModel ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/surfCpuModel/surfCpuModelDeployment.xml --cfg=workstation/model:compound
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ java -classpath ${classpath:=.} surfCpuModel/TestCpuModel ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/surfCpuModel/surfCpuModelDeployment.xml --cfg=host/model:compound
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
> [0.000000] [jmsg/INFO] Initialize Cpu Constant Model
> [0.000000] [jmsg/INFO] New Cpu(Tremblay, 9.8095E7, 1.0)
MSG_init(&argc, argv);
- /*if (argc <= 3) {
- XBT_CRITICAL("Usage: %s platform_file deployment_file <model>\n",
- argv[0]);
- XBT_CRITICAL
- ("example: %s msg_platform.xml msg_deployment.xml KCCFLN05_Vegas\n",
- argv[0]);
- exit(1);
- }*/
-
- /* Options for the workstation/model:
-
- KCCFLN05 => for maxmin
- KCCFLN05_proportional => for proportional (Vegas)
- KCCFLN05_Vegas => for TCP Vegas
- KCCFLN05_Reno => for TCP Reno
- */
- //MSG_config("workstation/model", argv[3]);
-
res = test_all(argv[1], argv[2]);
XBT_INFO("Total simulation time: %e", MSG_get_clock());
$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
> [ 0.000000] (0:@) Configuration change: Set 'network/crosstraffic' to '0'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [ 0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [ 0.000000] (0:@) Switching host model to compound since you changed the network and/or cpu model(s)
> [ 0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
> [ 0.000000] (1:node@node-0.acme.org) My finger table:
> [ 0.000000] (1:node@node-0.acme.org) Start | Succ
! output sort
$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [ 0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [ 0.000000] (0:@) Switching host model to compound since you changed the network and/or cpu model(s)
> [ 0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
> [ 0.000000] (1:node@node-0.acme.org) My finger table:
> [ 0.000000] (1:node@node-0.acme.org) Start | Succ
$ $SG_TEST_EXENV ${bindir:=.}/master_worker_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../platforms/platform.xml
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] # Launch 2 VMs
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] create VM00 on PM(Intel)
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM00)@PM(Intel) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM00)@PM(Intel) with 0 mounted disks
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] put a process (WRK00) on VM00
> [VM00:WRK00:(2) 0.000000] [msg_test/INFO] WRK00 is listenning on mailbox(MBOX:WRK00)
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] create VM01 on PM(Provost)
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM01)@PM(Provost) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM01)@PM(Provost) with 0 mounted disks
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] put a process (WRK01) on VM01
> [VM01:WRK01:(3) 0.000000] [msg_test/INFO] WRK01 is listenning on mailbox(MBOX:WRK01)
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] # Send a task to 2 worker process
> [Fafard:master_:(1) 6.000000] [msg_test/INFO] ## Test 1 (ended)
> [Fafard:master_:(1) 6.000000] [msg_test/INFO] ## Test 2 (started): check impact of running a task inside a VM (there is no degradation for the moment)
> [Fafard:master_:(1) 6.000000] [msg_test/INFO] ### Put a VM on a PM, and put a task to the VM
-> [6.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [6.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
> [VM0:compute:(7) 6.013107] [msg_test/INFO] VM0:compute task executed 0.0131068
> [Fafard:master_:(1) 8.000000] [msg_test/INFO] ## Test 2 (ended)
> [Fafard:master_:(1) 8.000000] [msg_test/INFO] ## Test 3 (started): check impact of running a task collocated with a VM (there is no VM noise for the moment)
> [Fafard:master_:(1) 8.000000] [msg_test/INFO] ### Put a VM on a PM, and put a task to the PM
-> [8.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [8.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
> [Fafard:compute:(8) 8.013107] [msg_test/INFO] Fafard:compute task executed 0.0131068
> [Fafard:master_:(1) 10.000000] [msg_test/INFO] ## Test 3 (ended)
> [Fafard:master_:(1) 10.000000] [msg_test/INFO] ## Test 4 (started): compare the cost of running two tasks inside two different VMs collocated or not (for the moment, there is no degradation for the VMs. Hence, the time should be equals to the time of test 1
> [Fafard:master_:(1) 10.000000] [msg_test/INFO] ### Put two VMs on a PM, and put a task to each VM
-> [10.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [10.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Fafard) with 0 mounted disks
+> [10.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [10.000000] [surf_vm/INFO] Create VM(VM1)@PM(Fafard) with 0 mounted disks
> [VM0:compute:(9) 10.026214] [msg_test/INFO] VM0:compute task executed 0.0262137
> [VM1:compute:(10) 10.026214] [msg_test/INFO] VM1:compute task executed 0.0262137
> [Fafard:master_:(1) 12.000000] [msg_test/INFO] ### Put a VM on each PM, and put a task to each VM
-> [12.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [12.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
+> [12.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [12.000000] [surf_vm/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
> [VM1:compute:(12) 12.010194] [msg_test/INFO] VM1:compute task executed 0.0101942
> [VM0:compute:(11) 12.013107] [msg_test/INFO] VM0:compute task executed 0.0131068
> [Fafard:master_:(1) 14.000000] [msg_test/INFO] ## Test 4 (ended)
> [Tremblay:comm_rx:(18) 19.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
> [Tremblay:comm_rx:(16) 19.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
> [Fafard:master_:(1) 24.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM0
-> [24.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [24.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
> [VM0:comm_rx:(20) 24.002265] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.00226529 sec
> [Fafard:master_:(1) 29.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM1
-> [29.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [29.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
> [VM0:comm_rx:(22) 29.158397] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.158397 sec
> [Fafard:master_:(1) 34.000000] [msg_test/INFO] ### Make two connections between PM0 and VM0@PM1
-> [34.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [34.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
> [VM0:comm_rx:(26) 34.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
> [VM0:comm_rx:(24) 34.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
> [Fafard:master_:(1) 39.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM1, and also make a connection between PM0 and PM1
-> [39.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [39.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
> [Tremblay:comm_rx:(30) 39.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
> [VM0:comm_rx:(28) 39.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
> [Fafard:master_:(1) 44.000000] [msg_test/INFO] ### Make a connection between VM0@PM0 and PM1@PM1, and also make a connection between VM0@PM0 and VM1@PM1
-> [44.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [44.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
+> [44.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [44.000000] [surf_vm/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
> [VM1:comm_rx:(34) 44.291085] [msg_test/INFO] VM0:comm_tx to VM1:comm_rx => 0.291085 sec
> [VM1:comm_rx:(32) 44.291085] [msg_test/INFO] VM0:comm_tx to VM1:comm_rx => 0.291085 sec
> [Fafard:master_:(1) 49.000000] [msg_test/INFO] ## Test 5 (ended)
> [Fafard:master_:(1) 49.000000] [msg_test/INFO] ## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the network one
> [Fafard:master_:(1) 49.000000] [msg_test/INFO] ### Relocate VM0 between PM0 and PM1
-> [49.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [49.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/WARNING] use the default max_downtime value 30ms
> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/INFO] Stage 1: Gonna send 1073741824
> [Bourassa:comm_rx:(36) 49.204993] [msg_test/INFO] VM0:comm_tx to Bourassa:comm_rx => 0.204993 sec
> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/WARNING] use the default max_downtime value 30ms
> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/INFO] Stage 1: Gonna send 1073741824
-> [334.199056] [surf_vm_workstation/CRITICAL] FIXME: may need a proper handling, 1
+> [334.199056] [surf_vm/CRITICAL] FIXME: may need a proper handling, 1
> [Fafard:master_:(1) 339.199251] [msg_test/INFO] ## Test 6 (ended)
> [339.199251] [msg_test/INFO] Bye (simulation time 339.199)
p Testing a vm with two successive tasks
$ $SG_TEST_EXENV ${bindir:=.}/two_tasks_vm$EXEEXT ${srcdir:=.}/../../platforms/small_platform.xml
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
> [VM0:compute:(2) 0.000000] [msg_test/INFO] VM0:compute task 1 created 0
> [Fafard:master_:(1) 0.000000] [msg_test/INFO] aTask remaining duration: 1e+09
> [Fafard:master_:(1) 1.000000] [msg_test/INFO] aTask remaining duration: 9.23704e+08
p Testing dogbone communication pattern with GTNets model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
p Testing dogbone communication pattern with LV08 model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
> [C1:slave:(3) 0.342000] [msg_test/INFO] WARNING FLOW[0] is limited by latency!!
p Testing onelink communication pattern with GTNets model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
p Testing onelink communication pattern with LV08 model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
> [C1:slave:(2) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 9191.205854 ; message from S1 to C1 with remaining : 0.000000
p Testing waxman radom communication pattern with GTNets model, 200 nodes, 200 flows
! timeout 10
-$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model", "GTNETS"); */
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
p Testing dogbone communication pattern with GTNets model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'dogbone_gtnets.trace'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
p Testing dogbone communication pattern with LV08 model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'dogbone_lv08.trace'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
> [C1:slave:(3) 0.342000] [msg_test/INFO] WARNING FLOW[0] is limited by latency!!
p Testing onelink communication pattern with GTNets model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=host/model:GTNets
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'onelink_gtnets.trace'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
p Testing onelink communication pattern with LV08 model
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'onelink_lv08.trace'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
> [C1:slave:(2) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 9191.205854 ; message from S1 to C1 with remaining : 0.000000
p Testing waxman radom communication pattern with GTNets model, 200 nodes, 200 flows
! timeout 10
-$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'waxman_gtnets.trace'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
> [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
$ $SG_TEST_EXENV masterslave/masterslave_forwarder$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg=cpu_model:Cas01_IM
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slaves and 20 tasks to process
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" to "Jupiter"
> [Tremblay:master:(1) 0.165962] [msg_test/INFO] Sent
$ $SG_TEST_EXENV masterslave/masterslave_forwarder$EXEEXT ${srcdir:=.}/msg_platform.xml ${srcdir:=.}/masterslave/deployment_masterslave_forwarder.xml --cfg=cpu_model:Cas01_IM
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] Got 5 slaves and 20 tasks to process
> [Jacquelin:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" to "iRMX"
> [Jacquelin:master:(1) 4.772530] [msg_test/INFO] Sent
p Testing a simple master/slave example application handling failures
$ masterslave/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${srcdir:=.}/small_platform_with_failures.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg=path:${srcdir} --cfg=cpu_model:Cas01_IM
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.000000] [simix_process/WARNING] Cannot launch process 'slave' on failed host 'Fafard'
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slave(s) :
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Jupiter
$ $SG_TEST_EXENV masterslave/masterslave_bypass --log=no_loc --cfg=cpu_model:Cas01_IM
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.000000] [surf_parse/WARNING] Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
> [host A:master:(1) 0.000000] [msg_test/INFO] Got 1 slave(s) :
> [host A:master:(1) 0.000000] [msg_test/INFO] host B
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
$ $SG_TEST_EXENV ./masterslave/masterslave_mailbox ${srcdir:=.}/../platforms/multicore_machine.xml ${srcdir:=.}/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01 --cfg=cpu/optim:Full
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'Full'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 6 slaves and 20 tasks to process
> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
> [Tremblay:master:(1) 0.002203] [msg_test/INFO] Sending "Task_1" (of 20) to mailbox "slave-1"
{
msg_error_t res = MSG_OK;
- /* MSG_config("workstation/model", "GTNETS"); */
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Jupiter:slave:(2) 0.000249] [msg_test/INFO] FLOW[1] : Receive 100 bytes from Tremblay to Jupiter
p 6hosts 3links
$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
> [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
> [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
> [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
> [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
$ ns3/ns3 ${srcdir:=.}/examples/platforms/cluster.xml ${srcdir:=.}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [node-6.acme.org:slave:(2) 0.006755] [msg_test/INFO] FLOW[1] : Receive 100 bytes from node-2.acme.org to node-6.acme.org
p Two clusters
$ ns3/ns3 ${srcdir:=.}/examples/platforms/clusters_routing_full.xml ${srcdir:=.}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [c-16.me:slave:(2) 0.012729] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-3.me to c-16.me
xbt_dynar_t all_hosts;
msg_host_t first_host;
- MSG_config("workstation/model", "ptask_L07");
+ MSG_config("host/model", "ptask_L07");
MSG_create_environment(platform_file);
all_hosts = MSG_hosts_as_dynar();
! output sort
$ $SG_TEST_EXENV parallel_task/parallel_task$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [ 0.000000] (0:@) surf_host_model_init_ptask_L07
> [ 0.009378] (1:test@Fafard) Goodbye now!
> [ 0.009378] (0:@) Simulation time 0.00937836
! output sort
$ $SG_TEST_EXENV parallel_task/test_ptask$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/parallel_task/test_ptask_deployment.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [ 0.000000] (0:@) surf_host_model_init_ptask_L07
> [ 20.625396] (1:execute@Ginette) execution_time=20.6254
> [ 83.232398] (2:redistribute@Ginette) redistribution_time=83.2324
> [ 83.232398] (0:@) Simulation time 83.2324
msg_error_t res = MSG_OK;
- MSG_config("workstation/model", "ptask_L07");
+ MSG_config("host/model", "ptask_L07");
/* Simulation setting */
MSG_create_environment(platform_file);
! output sort
$ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [ 0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [ 0.000000] (0:@) Switching host model to compound since you changed the network and/or cpu model(s)
> [ 0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
> [ 0.000000] (1:node@node-0.acme.org) My finger table:
> [ 0.000000] (1:node@node-0.acme.org) Start | Succ
MSG_init(&argc, argv);
if (argc != 3) {
- XBT_CRITICAL("Usage: %s platform_file deployment_file <model>\n",
+ XBT_CRITICAL("Usage: %s platform_file deployment_file\n",
argv[0]);
- XBT_CRITICAL
- ("example: %s msg_platform.xml msg_deployment.xml KCCFLN05_Vegas\n",
- argv[0]);
- exit(1);
+ xbt_die("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
}
- /* Options for the workstation/model:
-
- KCCFLN05 => for maxmin
- KCCFLN05_proportional => for proportional (Vegas)
- KCCFLN05_Vegas => for TCP Vegas
- KCCFLN05_Reno => for TCP Reno
- */
- //MSG_config("workstation/model", argv[3]);
-
res = test_all(argv[1], argv[2]);
XBT_INFO("Total simulation time: %e", MSG_get_clock());
> [ 0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
> [ 0.000000] (0:@) test_all
-> [ 0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [ 0.000000] (0:@) Switching host model to compound since you changed the network and/or cpu model(s)
> [ 0.000000] (1:sender@Tremblay) sender
> [ 0.000000] (1:sender@Tremblay) host = Jupiter
> [ 0.000000] (1:sender@Tremblay) task_la->data = 0.000000e+00
p Testing the surf network Reno fairness model using lagrangian approach
! output sort
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'Reno'
> [ 0.000000] (0:@) test_all
p Testing the surf network Vegas fairness model using lagrangian approach
! output sort
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'Vegas'
> [ 0.000000] (0:@) test_all
<config id="General">
<prop id="maxmin/precision" value="0.000010"></prop>
<prop id="cpu/optim" value="TI"></prop>
- <prop id="workstation/model" value="compound"></prop>
+ <prop id="host/model" value="compound"></prop>
<prop id="network/model" value="SMPI"></prop>
<prop id="path" value="~/"></prop>
<prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
! expect return 255
$ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_daxparse/WARNING] the task root is not marked
> [0.000000] [sd_daxparse/WARNING] the task 1@task1 is in a cycle
> [0.000000] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
p Test the DAX loader on a small DAX instance
$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_daxparse/WARNING] Ignoring file o1 size redefinition from 1000000 to 304
> [0.000000] [sd_daxparse/WARNING] Ignoring file o2 size redefinition from 1000000 to 304
> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
p Test the loader of DAG written in the DOT format
$ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
> [0.000000] [sd_task/INFO] Displaying task root
> [0.000000] [sd_task/INFO] - state: schedulable not runnable
! expect return 2
$ $SG_TEST_EXENV ./simulate_dot --log=no_loc "--log=sd_dotparse.thres:verbose" ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_bad_schedule.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task end is not correctly scheduled
> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task 1 is not correctly scheduled
> [0.000000] [sd_dotparse/VERBOSE] The task 0 starts on the computer 1 at the position : 1 like the task 2
> [0.000000] [test/CRITICAL] The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose
$ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_good_schedule.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
> [0.000000] [sd_task/INFO] Displaying task root
> [0.000000] [sd_task/INFO] - state: runnable
! expect return 2
$ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_cycle.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_daxparse/WARNING] the task root is not marked
> [0.000000] [sd_daxparse/WARNING] the task 0 is in a cycle
> [0.000000] [sd_daxparse/WARNING] the task 1 is in a cycle
/* Set the workstation model to default, as storage is not supported by the
* ptask_L07 model yet.
*/
- SD_config("workstation/model", "default");
+ SD_config("host/model", "default");
SD_create_environment(argv[1]);
workstations = SD_workstation_get_list();
total_nworkstations = SD_workstation_get_number();
p Simple test of simdag with properties
$ $SG_TEST_EXENV properties/sd_prop ${srcdir:=.}/../platforms/prop.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [test/INFO] Property list for workstation host1
> [0.000000] [test/INFO] Property: mem has value: 4
> [0.000000] [test/INFO] Property: NewProp has value: newValue
p Simple test of simdag
$ $SG_TEST_EXENV ${bindir:=.}/minmin_test --log=sd_daxparse.thresh:critical ${srcdir:=.}/simulacrum_7_hosts.xml ${srcdir:=.}/Montage_25.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [test/INFO] Schedule ID00002@mProjectPP on Host 27
> [0.000105] [test/INFO] Schedule ID00000@mProjectPP on Host 26
> [0.000120] [test/INFO] Schedule ID00003@mProjectPP on Host 30
p Simple test of simdag
$ $SG_TEST_EXENV ./sd_test ${srcdir:=.}/../platforms/platform.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_test/INFO] Computation time for 2000000.000000 flops on Jacquelin: 0.014563
> [0.000000] [sd_test/INFO] Computation time for 1000000.000000 flops on Intel: 0.007282
> [0.000000] [sd_test/INFO] Route between Jacquelin and Intel:
p Simple test of simdag
$ $SG_TEST_EXENV ./sd_test2 ${srcdir:=.}/2clusters.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [3.251960] [sd_test/INFO] Simulation time: 3.251960
p Test of the management of availability traces with simdag
$ $SG_TEST_EXENV ${bindir:=.}/sd_avail two_hosts.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [1.000000] [sd_avail/INFO] link1: bw=125000000, lat=0.000100
> [1.000000] [sd_avail/INFO] Jupiter: power=12500000
> [1.000000] [sd_avail/INFO] Tremblay: power=12500000
$ $SG_TEST_EXENV ./sd_comm_throttling --cfg=network/TCP_gamma:4194304 ${srcdir:=.}/2clusters.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [1.000000] [sd_comm_throttling/INFO] Simulation stopped after 1.0000 seconds
> [1.000000] [sd_comm_throttling/INFO] Task 'Task A' start time: 0.000000, finish time: 1.000000
> [2.080300] [sd_comm_throttling/INFO] Simulation stopped after 2.0803 seconds
p Test of the management of failed tasks simdag
$ $SG_TEST_EXENV ${bindir:=.}/sd_fail
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_fail/INFO] First test: COMP_SEQ task
> [0.000000] [sd_fail/INFO] Schedule task 'Poor task' on workstation 'Faulty Host'
> [10.000000] [sd_task/INFO] Displaying task Poor task
p Simple test of simdag
$ $SG_TEST_EXENV ./sd_seq_access ${srcdir:=.}/2clusters.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
> [0.000000] [sd_workstation/INFO] - power: 5000000000
> [0.000000] [sd_workstation/INFO] - available power: 1.00
$ $SG_TEST_EXENV ./simdag_tracing --cfg=tracing:yes --cfg=tracing/categorized:yes ${srcdir:=.}/2clusters.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [0.000000] [sd_seq_access/INFO] Access mode of C2-05 is sequential
> [0.000000] [sd_seq_access/INFO] Access mode of C2-06 is sequential
> [0.000000] [sd_seq_access/INFO] Task A is currently running on C2-05 (SD_TASK_COMP_SEQ)
$ $SG_TEST_EXENV ./sd_typed_tasks_test --cfg=network/TCP_gamma:4194304 ${srcdir:=.}/2clusters.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
> [2.080300] [sd_typed_tasks_test/INFO] Task 'Seq. comp. 1' start time: 0.000000, finish time: 1.000000
> [2.080300] [sd_typed_tasks_test/INFO] Task 'Par. Comp. 1' start time: 0.000000, finish time: 0.080000
> [2.080300] [sd_typed_tasks_test/INFO] Task 'Par. Comp. 3' start time: 0.000000, finish time: 0.400000
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.000000] [rank 1] Pstates: 1; Powers: 100000000
> [0.000000] [rank 0] Pstates: 3; Powers: 100000000, 50000000, 20000000
> [0.000000] [rank 1] Current pstate: 0; Current power: 100000000
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules
> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 9000.000000 Joules
> [ 0.0000000000000000 ] [rank 0 ] 3 pstates available
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules
> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 9000.000000 Joules
> [ 0.0000000000000000 ] [rank 0 ] 3 pstates available
! timeout 60
$ ../../../smpi_script/bin/smpirun -wrapper ${bindir:=.}/../../../bin/simgrid-mc -hostfile ${srcdir:=.}/hostfile_non_deterministic -platform ${srcdir:=.}/../../platforms/cluster.xml --log=xbt_cfg.thresh:warning --cfg=model-check:1 --cfg=model-check/communications_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./smpi_non_deterministic
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.000000] [mc_global/INFO] Check communication determinism
> [0.000000] [mc_comm_determinism/INFO] The communications pattern of the process 1 is different! (Different communication : 1)
> [0.000000] [mc_comm_determinism/INFO] ****************************************************
! timeout 60
$ ../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" --log=xbt_cfg.thresh:warning -hostfile ${srcdir:=.}/hostfile_only_send_deterministic -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check:1 --cfg=model-check/communications_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./smpi_only_send_deterministic
> [0.000000] [mc_comm_determinism/INFO] Check communication determinism
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.000000] [mc_global/INFO] ******************************************************
> [0.000000] [mc_global/INFO] **** Only-send-deterministic communication pattern ****
> [0.000000] [mc_global/INFO] ******************************************************
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 0.000000] [smpi_replay/VERBOSE] 0 bcast 5e4 0.000000
> [Jupiter:1:(0) 0.015036] [smpi_replay/VERBOSE] 1 bcast 5e4 0.015036
> [Fafard:2:(0) 0.015676] [smpi_replay/VERBOSE] 2 bcast 5e4 0.015676
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.691622
$ rm -f replay/one_trace
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 0.164463] [smpi_replay/VERBOSE] 0 send 1 1e6 0.164463
> [Jupiter:1:(0) 0.164463] [smpi_replay/VERBOSE] 1 recv 0 1e6 0.164463
> [Jupiter:1:(0) 13.271310] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 1.491472] [smpi_replay/VERBOSE] 0 send 1 1e7 1.491472
> [Jupiter:1:(0) 1.491472] [smpi_replay/VERBOSE] 1 recv 0 1e7 1.491472
> [Tremblay:0:(0) 1.495453] [smpi_replay/VERBOSE] 0 barrier 0.003981
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Jupiter:1:(0) 0.000000] [smpi_replay/VERBOSE] 1 Irecv 0 1e6 0.000000
> [Jupiter:1:(0) 6.553424] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
> [Jupiter:1:(0) 6.553524] [smpi_replay/VERBOSE] 1 test 0.000100
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 5.112775] [smpi_replay/VERBOSE] 0 allReduce 5e4 5e8 5.112775
> [Jupiter:1:(0) 6.584135] [smpi_replay/VERBOSE] 1 allReduce 5e4 5e8 6.584135
> [Fafard:2:(0) 6.584775] [smpi_replay/VERBOSE] 2 allReduce 5e4 5e8 6.584775
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 0.004041] [smpi_replay/VERBOSE] 0 allToAll 500 500 0.004041
> [Fafard:2:(0) 0.006920] [smpi_replay/VERBOSE] 2 allToAll 500 500 0.006920
> [Jupiter:1:(0) 0.006920] [smpi_replay/VERBOSE] 1 allToAll 500 500 0.006920
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 0.003999] [smpi_replay/VERBOSE] 0 allToAllV 100 1 40 30 1000 1 80 100 0.003999
> [Jupiter:1:(0) 0.006934] [smpi_replay/VERBOSE] 1 allToAllV 1000 80 1 40 1000 40 1 30 0.006934
> [Fafard:2:(0) 0.006936] [smpi_replay/VERBOSE] 2 allToAllV 1000 100 30 1 1000 30 40 1 0.006936
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Tremblay:0:(0) 0.841244] [smpi_replay/VERBOSE] 0 allGatherV 275427 275427 275427 275427 204020 0 0 0.841244
> [Fafard:2:(0) 1.239482] [smpi_replay/VERBOSE] 2 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482
> [Jupiter:1:(0) 1.239482] [smpi_replay/VERBOSE] 1 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Irecv 1 3000 0.000000
> [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Isend 0 3000 0.000000
> [Jupiter:1:(0) 0.000000] [smpi_replay/VERBOSE] 1 Isend 0 2000 0.000000
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
p Another SMPI test
$ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
p Testing without trace parameters
$ ../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
p Testing grouped tracing
$ ../../smpi_script/bin/smpirun -trace -trace-grouped -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
p Testing generation of viva configuration files
$ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg --cfg=smpi/cpu_threshold:-1 -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> [0.007962] [instr_config/INFO] No categories declared, ignoring generation of viva graph configuration
p Testing with parameters but without activating them with the safe switch (-trace)
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
$ rm -f smpi_traced.trace smpi_uncat.plist smpi_cat.plist
XBT_PUBLIC_DATA(xbt_lib_t) host_lib;
XBT_PUBLIC_DATA(int) ROUTING_HOST_LEVEL; //Routing level
XBT_PUBLIC_DATA(int) SURF_CPU_LEVEL; //Surf cpu level
-XBT_PUBLIC_DATA(int) SURF_WKS_LEVEL; //Surf workstation level
+XBT_PUBLIC_DATA(int) SURF_HOST_LEVEL; //Surf workstation level
XBT_PUBLIC_DATA(int) SIMIX_HOST_LEVEL; //Simix host level
XBT_PUBLIC_DATA(int) SIMIX_STORAGE_LEVEL; //Simix storage level
XBT_PUBLIC_DATA(int) MSG_HOST_LEVEL; //Msg level
/* Initialize MSG and WKS hosts */
XBT_DEBUG("Initialize MSG and WKS hosts");
xbt_lib_foreach(host_lib, cursor, name, data) {
- if(data[SURF_WKS_LEVEL]){
+ if(data[SURF_HOST_LEVEL]){
XBT_DEBUG("\tSee surf host %s",name);
- SIMIX_host_create(name, data[SURF_WKS_LEVEL], NULL);
+ SIMIX_host_create(name, NULL);
__MSG_host_create((smx_host_t)data[SIMIX_HOST_LEVEL]);
}
}
XBT_PUBLIC(void) sg_platf_storage_type_add_cb(sg_platf_storage_type_cb_t fct);
XBT_PUBLIC(void) sg_platf_mount_add_cb(sg_platf_mount_cb_t fct);
-/** \brief Pick the right models for CPU, net and workstation, and call their model_init_preparse
+/** \brief Pick the right models for CPU, net and host, and call their model_init_preparse
*
* Must be called within parsing/creating the environment (after the <config>s, if any, and before <AS> or friends such as <cluster>)
*/
#ifdef __cplusplus
class Model;
class CpuModel;
-class WorkstationModel;
-class WorkstationVMModel;
+class HostModel;
+class VMModel;
class NetworkModel;
class StorageModel;
class Resource;
class ResourceLmm;
-class WorkstationCLM03;
+class HostCLM03;
class NetworkCm02Link;
class Cpu;
class Action;
#else
typedef struct Model Model;
typedef struct CpuModel CpuModel;
-typedef struct WorkstationModel WorkstationModel;
-typedef struct WorkstationVMModel WorkstationVMModel;
+typedef struct HostModel HostModel;
+typedef struct VMModel VMModel;
typedef struct NetworkModel NetworkModel;
typedef struct StorageModel StorageModel;
typedef struct Resource Resource;
typedef struct ResourceLmm ResourceLmm;
-typedef struct WorkstationCLM03 WorkstationCLM03;
+typedef struct HostCLM03 HostCLM03;
typedef struct NetworkCm02Link NetworkCm02Link;
typedef struct Cpu Cpu;
typedef struct Action Action;
/** @ingroup SURF_c_bindings
* \brief Model datatype
*
- * Generic data structure for a model. The workstations,
+ * Generic data structure for a model. The hosts,
* the CPUs and the network links are examples of models.
*/
typedef Model *surf_model_t;
typedef CpuModel *surf_cpu_model_t;
-typedef WorkstationModel *surf_workstation_model_t;
-typedef WorkstationVMModel *surf_vm_workstation_model_t;
+typedef HostModel *surf_host_model_t;
+typedef VMModel *surf_vm_model_t;
typedef NetworkModel *surf_network_model_t;
typedef StorageModel *surf_storage_model_t;
typedef xbt_dictelm_t surf_resource_t;
typedef Resource *surf_cpp_resource_t;
-typedef WorkstationCLM03 *surf_workstation_CLM03_t;
+typedef HostCLM03 *surf_host_CLM03_t;
typedef NetworkCm02Link *surf_network_link_t;
typedef Cpu *surf_cpu_t;
static inline void *surf_cpu_resource_priv(const void *host) {
return xbt_lib_get_level((xbt_dictelm_t)host, SURF_CPU_LEVEL);
}
-static inline void *surf_workstation_resource_priv(const void *host){
- return (void*)xbt_lib_get_level((xbt_dictelm_t)host, SURF_WKS_LEVEL);
+static inline void *surf_host_resource_priv(const void *host){
+ return (void*)xbt_lib_get_level((xbt_dictelm_t)host, SURF_HOST_LEVEL);
}
static inline void *surf_routing_resource_priv(const void *host){
return (void*)xbt_lib_get_level((xbt_dictelm_t)host, ROUTING_HOST_LEVEL);
static inline void *surf_cpu_resource_by_name(const char *name) {
return xbt_lib_get_elm_or_null(host_lib, name);
}
-static inline void *surf_workstation_resource_by_name(const char *name){
+static inline void *surf_host_resource_by_name(const char *name){
return xbt_lib_get_elm_or_null(host_lib, name);
}
static inline void *surf_storage_resource_by_name(const char *name){
* @details [long description]
*
* @param model The model which handle the parallelisation
- * @param workstation_nb The number of workstations
- * @param workstation_list The list of workstations on which the task is executed
+ * @param host_nb The number of hosts
+ * @param host_list The list of hosts on which the task is executed
* @param flops_amount The processing amount (in flop) needed to process
* @param bytes_amount The amount of data (in bytes) needed to transfer
* @param rate [description]
* @return The action corresponding to the parallele execution task
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
- int workstation_nb,
- void **workstation_list,
+XBT_PUBLIC(surf_action_t) surf_host_model_execute_parallel_task(surf_host_model_t model,
+ int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate);
* @param rate [description]
* @return The action corresponding to the communication
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate);
+XBT_PUBLIC(surf_action_t) surf_host_model_communicate(surf_host_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate);
/**
* @brief Get the route between two hosts
* @param dst The destination host
* @return The list of [TODO] from the source to the host
*/
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_model_get_route(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst);
+XBT_PUBLIC(xbt_dynar_t) surf_host_model_get_route(surf_host_model_t model, surf_resource_t src, surf_resource_t dst);
/**
* @brief Create a new VM on the specified host
*
- * @param name The name of the workstation
- * @param ind_phys_host The host on which the VM is created
+ * @param name The name of the VM
+ * @param host_PM The host on which the VM is created
*/
-XBT_PUBLIC(void) surf_vm_workstation_model_create(const char *name, surf_resource_t ind_phys_host);
+XBT_PUBLIC(void) surf_vm_model_create(const char *name, surf_resource_t host_PM);
/**
* @brief Create a communication between two routing edges [TODO]
XBT_PUBLIC(surf_action_t) surf_network_model_communicate(surf_network_model_t model, sg_routing_edge_t src, sg_routing_edge_t dst, double size, double rate);
/**
- * @brief Get the name of a surf resource (cpu, workstation, network, …)
+ * @brief Get the name of a surf resource (cpu, host, network, …)
*
* @param resource The surf resource
* @return The name of the surf resource
XBT_PUBLIC(const char * ) surf_resource_name(surf_cpp_resource_t resource);
/**
- * @brief Get the properties of a surf resource (cpu, workstation, network, …)
+ * @brief Get the properties of a surf resource (cpu, host, network, …)
*
* @param resource The surf resource
* @return The properties of the surf resource
XBT_PUBLIC(xbt_dict_t) surf_resource_get_properties(surf_cpp_resource_t resource);
/**
- * @brief Get the state of a surf resource (cpu, workstation, network, …)
+ * @brief Get the state of a surf resource (cpu, host, network, …)
*
* @param resource The surf resource
* @return The state of the surf resource
XBT_PUBLIC(e_surf_resource_state_t) surf_resource_get_state(surf_cpp_resource_t resource);
/**
- * @brief Set the state of a surf resource (cpu, workstation, network, …)
+ * @brief Set the state of a surf resource (cpu, host, network, …)
*
* @param resource The surf resource
* @param state The new state of the surf resource
XBT_PUBLIC(void) surf_resource_set_state(surf_cpp_resource_t resource, e_surf_resource_state_t state);
/**
- * @brief Get the speed of the cpu associtated to a workstation
+ * @brief Get the speed of the cpu associated to a host
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @param load [description]
*
* @return [description]
*/
-XBT_PUBLIC(double) surf_workstation_get_speed(surf_resource_t resource, double load);
+XBT_PUBLIC(double) surf_host_get_speed(surf_resource_t resource, double load);
/**
- * @brief Get the available speed of cpu associtated to a workstation
+ * @brief Get the available speed of cpu associated to a host
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @return [description]
*/
-XBT_PUBLIC(double) surf_workstation_get_available_speed(surf_resource_t resource);
+XBT_PUBLIC(double) surf_host_get_available_speed(surf_resource_t resource);
/**
- * @brief Get the number of cores of the cpu associated to a workstation
+ * @brief Get the number of cores of the cpu associated to a host
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @return The number of cores
*/
-XBT_PUBLIC(int) surf_workstation_get_core(surf_resource_t resource);
+XBT_PUBLIC(int) surf_host_get_core(surf_resource_t resource);
/**
* @brief Execute some quantity of computation
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @param size The value of the processing amount (in flop) needed to process
*
* @return The surf action corresponding to the processing
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_execute(surf_resource_t resource, double size);
+XBT_PUBLIC(surf_action_t) surf_host_execute(surf_resource_t resource, double size);
/**
- * @brief Make the workstation sleep
+ * @brief Make the host sleep
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @param duration The number of seconds to sleep
* @return The surf action corresponding to the sleep
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_sleep(surf_resource_t resource, double duration);
+XBT_PUBLIC(surf_action_t) surf_host_sleep(surf_resource_t resource, double duration);
/**
- * @brief Open a file on a workstation
+ * @brief Open a file on an host
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fullpath The path to the file
* @return The surf action corresponding to the openning
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_open(surf_resource_t workstation, const char* fullpath);
+XBT_PUBLIC(surf_action_t) surf_host_open(surf_resource_t host, const char* fullpath);
/**
- * @brief Close a file descriptor on a workstation
+ * @brief Close a file descriptor on an host
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
*
* @return The surf action corresponding to the closing
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_close(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(surf_action_t) surf_host_close(surf_resource_t host, surf_file_t fd);
/**
* @brief Read a file
*
- * @param resource The surf workstation
+ * @param host The surf host
* @param fd The file descriptor to read
* @param size The size in bytes to read
* @return The surf action corresponding to the reading
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_read(surf_resource_t resource, surf_file_t fd, sg_size_t size);
+XBT_PUBLIC(surf_action_t) surf_host_read(surf_resource_t host, surf_file_t fd, sg_size_t size);
/**
* @brief Write a file
*
- * @param resource The surf workstation
+ * @param host The surf host
* @param fd The file descriptor to write
* @param size The size in bytes to write
* @return The surf action corresponding to the writing
*/
-XBT_PUBLIC(surf_action_t) surf_workstation_write(surf_resource_t resource, surf_file_t fd, sg_size_t size);
+XBT_PUBLIC(surf_action_t) surf_host_write(surf_resource_t host, surf_file_t fd, sg_size_t size);
/**
* @brief Get the informations of a file descriptor
* - the storage typeId,
* - the storage content type
*
- * @param resource The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
* @return An xbt_dynar_t with the file informations
*/
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_info(surf_resource_t resource, surf_file_t fd);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_info(surf_resource_t host, surf_file_t fd);
/**
* @brief Get the available space of the storage at the mount point
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @param name The mount point
- * @return The amount of availble space in bytes
+ * @return The amount of available space in bytes
*/
-XBT_PUBLIC(sg_size_t) surf_workstation_get_free_size(surf_resource_t resource, const char* name);
+XBT_PUBLIC(sg_size_t) surf_host_get_free_size(surf_resource_t resource, const char* name);
/**
* @brief Get the used space of the storage at the mount point
*
- * @param resource The surf workstation
+ * @param resource The surf host
* @param name The mount point
* @return The amount of used space in bytes
*/
-XBT_PUBLIC(sg_size_t) surf_workstation_get_used_size(surf_resource_t resource, const char* name);
+XBT_PUBLIC(sg_size_t) surf_host_get_used_size(surf_resource_t resource, const char* name);
/**
- * @brief Get the VMs hosted on the workstation
+ * @brief Get the VMs hosted on the host
*
- * @param resource The surf workstation
- * @return The list of VMs on the workstation
+ * @param resource The surf host
+ * @return The list of VMs on the host
*/
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_vms(surf_resource_t resource);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_vms(surf_resource_t resource);
/**
* @brief [brief description]
* @param resource [description]
* @param params [description]
*/
-XBT_PUBLIC(void) surf_workstation_get_params(surf_resource_t resource, ws_params_t params);
+XBT_PUBLIC(void) surf_host_get_params(surf_resource_t resource, ws_params_t params);
/**
* @brief [brief description]
* @param resource [description]
* @param params [description]
*/
-XBT_PUBLIC(void) surf_workstation_set_params(surf_resource_t resource, ws_params_t params);
+XBT_PUBLIC(void) surf_host_set_params(surf_resource_t resource, ws_params_t params);
/**
- * @brief Destroy a Workstation VM
+ * @brief Destroy a VM
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
*/
-XBT_PUBLIC(void) surf_vm_workstation_destroy(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_destroy(surf_resource_t resource);
/**
- * @brief Suspend a Workstation VM
+ * @brief Suspend a VM
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
*/
-XBT_PUBLIC(void) surf_vm_workstation_suspend(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_suspend(surf_resource_t resource);
/**
- * @brief Resume a Workstation VM
+ * @brief Resume a VM
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
*/
-XBT_PUBLIC(void) surf_vm_workstation_resume(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_resume(surf_resource_t resource);
/**
- * @brief Save the Workstation VM (Not yet implemented)
+ * @brief Save the VM (Not yet implemented)
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
*/
-XBT_PUBLIC(void) surf_vm_workstation_save(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_save(surf_resource_t resource);
/**
- * @brief Restore the Workstation VM (Not yet implemented)
+ * @brief Restore the VM (Not yet implemented)
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
*/
-XBT_PUBLIC(void) surf_vm_workstation_restore(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_restore(surf_resource_t resource);
/**
* @brief Migrate the VM to the destination host
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
* @param ind_vm_ws_dest The destination host
*/
-XBT_PUBLIC(void) surf_vm_workstation_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest);
+XBT_PUBLIC(void) surf_vm_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest);
/**
* @brief Get the physical machine hosting the VM
*
- * @param resource The surf workstation vm
+ * @param resource The surf vm
* @return The physical machine hosting the VM
*/
-XBT_PUBLIC(surf_resource_t) surf_vm_workstation_get_pm(surf_resource_t resource);
+XBT_PUBLIC(surf_resource_t) surf_vm_get_pm(surf_resource_t resource);
/**
* @brief [brief description]
* @param resource [description]
* @param bound [description]
*/
-XBT_PUBLIC(void) surf_vm_workstation_set_bound(surf_resource_t resource, double bound);
+XBT_PUBLIC(void) surf_vm_set_bound(surf_resource_t resource, double bound);
/**
* @brief [brief description]
* @param cpu [description]
* @param mask [description]
*/
-XBT_PUBLIC(void) surf_vm_workstation_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask);
+XBT_PUBLIC(void) surf_vm_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask);
/**
* @brief Execute some quantity of computation
XBT_PUBLIC(surf_action_t) surf_cpu_sleep(surf_resource_t cpu, double duration);
/**
- * @brief Get the workstation power peak
+ * @brief Get the host power peak
* @details [long description]
*
- * @param host The surf workstation
+ * @param host The surf host
* @return The power peak
*/
-XBT_PUBLIC(double) surf_workstation_get_current_power_peak(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_current_power_peak(surf_resource_t host);
/**
* @brief [brief description]
*
* @return [description]
*/
-XBT_PUBLIC(double) surf_workstation_get_power_peak_at(surf_resource_t host, int pstate_index);
+XBT_PUBLIC(double) surf_host_get_power_peak_at(surf_resource_t host, int pstate_index);
/**
* @brief [brief description]
* @param host [description]
* @return [description]
*/
-XBT_PUBLIC(int) surf_workstation_get_nb_pstates(surf_resource_t host);
+XBT_PUBLIC(int) surf_host_get_nb_pstates(surf_resource_t host);
-XBT_PUBLIC(void) surf_workstation_set_pstate(surf_resource_t host, int pstate_index);
-XBT_PUBLIC(int) surf_workstation_get_pstate(surf_resource_t host);
-XBT_PUBLIC(double) surf_workstation_get_wattmin_at(surf_resource_t resource, int pstate);
-XBT_PUBLIC(double) surf_workstation_get_wattmax_at(surf_resource_t resource, int pstate);
+XBT_PUBLIC(void) surf_host_set_pstate(surf_resource_t host, int pstate_index);
+XBT_PUBLIC(int) surf_host_get_pstate(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_wattmin_at(surf_resource_t resource, int pstate);
+XBT_PUBLIC(double) surf_host_get_wattmax_at(surf_resource_t resource, int pstate);
/**
- * @brief Get the consumed energy (in joules) of a workstation
+ * @brief Get the consumed energy (in joules) of an host
*
- * @param host The surf workstation
+ * @param host The surf host
* @return The consumed energy
*/
-XBT_PUBLIC(double) surf_workstation_get_consumed_energy(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_consumed_energy(surf_resource_t host);
/**
- * @brief Get the list of storages mounted on a workstation
+ * @brief Get the list of storages mounted on an host
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @return Dictionary of mount point, Storage
*/
-XBT_PUBLIC(xbt_dict_t) surf_workstation_get_mounted_storage_list(surf_resource_t workstation);
+XBT_PUBLIC(xbt_dict_t) surf_host_get_mounted_storage_list(surf_resource_t host);
/**
- * @brief Get the list of storages attached to a workstation
+ * @brief Get the list of storages attached to an host
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @return Dictionary of storage
*/
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_attached_storage_list(surf_resource_t workstation);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_attached_storage_list(surf_resource_t host);
/**
* @brief Unlink a file descriptor
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
*
* @return 0 if failed to unlink, 1 otherwise
*/
-XBT_PUBLIC(int) surf_workstation_unlink(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(int) surf_host_unlink(surf_resource_t host, surf_file_t fd);
/**
- * @brief Get the size of a file on a workstation
+ * @brief Get the size of a file on a host
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
*
* @return The size in bytes of the file
*/
-XBT_PUBLIC(size_t) surf_workstation_get_size(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(size_t) surf_host_get_size(surf_resource_t host, surf_file_t fd);
/**
* @brief Get the current position of the file descriptor
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
* @return The current position of the file descriptor
*/
-XBT_PUBLIC(size_t) surf_workstation_file_tell(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(size_t) surf_host_file_tell(surf_resource_t host, surf_file_t fd);
/**
* @brief Move a file to another location on the *same mount point*.
* @details [long description]
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
* @param fullpath The new full path
*
* @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
*/
-XBT_PUBLIC(int) surf_workstation_file_move(surf_resource_t workstation, surf_file_t fd, const char* fullpath);
+XBT_PUBLIC(int) surf_host_file_move(surf_resource_t host, surf_file_t fd, const char* fullpath);
/**
* @brief Set the position indictator assiociated with the file descriptor to a new position
* @details [long description]
*
- * @param workstation The surf workstation
+ * @param host The surf host
* @param fd The file descriptor
* @param offset The offset from the origin
* @param origin Position used as a reference for the offset
* - SEEK_END: end of the file
* @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
*/
-XBT_PUBLIC(int) surf_workstation_file_seek(surf_resource_t workstation,
+XBT_PUBLIC(int) surf_host_file_seek(surf_resource_t host,
surf_file_t fd, sg_offset_t offset,
int origin);
* \brief The network model
*
* When creating a new API on top on SURF, you shouldn't use the
- * network model unless you know what you are doing. Only the workstation
+ * network model unless you know what you are doing. Only the host
* model should be accessed because depending on the platform model,
* the network model can be NULL.
*/
* size (< 1KiB, < 64KiB, >= 64KiB).
* See comments in the code for more information.
*
- * \see surf_workstation_model_init_SMPI()
+ * \see surf_host_model_init_SMPI()
*/
XBT_PUBLIC(void) surf_network_model_init_SMPI(void);
* This model impelments a variant of the contention model on Infinband networks based on
* the works of Jérôme Vienne : http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf
*
- * \see surf_workstation_model_init_IB()
+ * \see surf_host_model_init_IB()
*/
XBT_PUBLIC(void) surf_network_model_init_IB(void);
* the results obtained with the GTNets simulator for onelink and
* dogbone sharing scenarios. See comments in the code for more information.
*
- * \see surf_workstation_model_init_LegrandVelho()
+ * \see surf_host_model_init_LegrandVelho()
*/
XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void);
* constant, hence no need for a routing table. This is particularly
* usefull when simulating huge distributed algorithms where
* scalability is really an issue. This function is called in
- * conjunction with surf_workstation_model_init_compound.
+ * conjunction with surf_host_model_init_compound.
*
- * \see surf_workstation_model_init_compound()
+ * \see surf_host_model_init_compound()
*/
XBT_PUBLIC(void) surf_network_model_init_Constant(void);
* \brief Initializes the platform with the network model CM02
*
* You sould call this function by yourself only if you plan using
- * surf_workstation_model_init_compound.
+ * surf_host_model_init_compound.
* See comments in the code for more information.
*/
XBT_PUBLIC(void) surf_network_model_init_CM02(void);
* \brief Initializes the platform with the network model GTNETS
* \param filename XML platform file name
*
- * This function is called by surf_workstation_model_init_GTNETS
- * or by yourself only if you plan using surf_workstation_model_init_compound
+ * This function is called by surf_host_model_init_GTNETS
+ * or by yourself only if you plan using surf_host_model_init_compound
*
- * \see surf_workstation_model_init_GTNETS()
+ * \see surf_host_model_init_GTNETS()
*/
XBT_PUBLIC(void) surf_network_model_init_GTNETS(void);
#endif
* \brief Initializes the platform with the network model NS3
* \param filename XML platform file name
*
- * This function is called by surf_workstation_model_init_NS3
- * or by yourself only if you plan using surf_workstation_model_init_compound
+ * This function is called by surf_host_model_init_NS3
+ * or by yourself only if you plan using surf_host_model_init_compound
*
- * \see surf_workstation_model_init_NS3()
+ * \see surf_host_model_init_NS3()
*/
XBT_PUBLIC(void) surf_network_model_init_NS3(void);
#endif
* [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
* IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
*
- * Call this function only if you plan using surf_workstation_model_init_compound.
+ * Call this function only if you plan using surf_host_model_init_compound.
*
*/
XBT_PUBLIC(void) surf_network_model_init_Reno(void);
* [LOW01] S. H. Low. A duality model of TCP and queue management algorithms.
* IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
*
- * Call this function only if you plan using surf_workstation_model_init_compound.
+ * Call this function only if you plan using surf_host_model_init_compound.
*
*/
XBT_PUBLIC(void) surf_network_model_init_Reno2(void);
* [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
* IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
*
- * Call this function only if you plan using surf_workstation_model_init_compound.
+ * Call this function only if you plan using surf_host_model_init_compound.
*
*/
XBT_PUBLIC(void) surf_network_model_init_Vegas(void);
XBT_PUBLIC_DATA(surf_storage_model_t) surf_storage_model;
/** \ingroup SURF_models
- * \brief The workstation model
+ * \brief The host model
*
* Note that when you create an API on top of SURF,
- * the workstation model should be the only one you use
+ * the host model should be the only one you use
* because depending on the platform model, the network model and the CPU model
* may not exist.
*/
-XBT_PUBLIC_DATA(surf_workstation_model_t) surf_workstation_model;
+XBT_PUBLIC_DATA(surf_host_model_t) surf_host_model;
/** \ingroup SURF_models
- * \brief The vm_workstation model
+ * \brief The vm model
*
* Note that when you create an API on top of SURF,
- * the vm_workstation model should be the only one you use
+ * the vm model should be the only one you use
* because depending on the platform model, the network model and the CPU model
* may not exist.
*/
-XBT_PUBLIC_DATA(surf_vm_workstation_model_t) surf_vm_workstation_model;
+XBT_PUBLIC_DATA(surf_vm_model_t) surf_vm_model;
/** \ingroup SURF_models
- * \brief Initializes the platform with a compound workstation model
+ * \brief Initializes the platform with a compound host model
*
* This function should be called after a cpu_model and a
* network_model have been set up.
*
*/
-XBT_PUBLIC(void) surf_workstation_model_init_compound(void);
+XBT_PUBLIC(void) surf_host_model_init_compound(void);
/** \ingroup SURF_models
* \brief Initializes the platform with the current best network and cpu models at hand
*
- * This platform model seperates the workstation model and the network model.
- * The workstation model will be initialized with the model compound, the network
+ * This platform model separates the host model and the network model.
+ * The host model will be initialized with the model compound, the network
* model with the model LV08 (with cross traffic support) and the CPU model with
* the model Cas01.
* Such model is subject to modification with warning in the ChangeLog so monitor it!
*
*/
-XBT_PUBLIC(void) surf_workstation_model_init_current_default(void);
+XBT_PUBLIC(void) surf_host_model_init_current_default(void);
/** \ingroup SURF_models
- * \brief Initializes the platform with the model KCCFLN05
+ * \brief Initializes the platform with the model L07
*
* With this model, only parallel tasks can be used. Resource sharing
* is done by identifying bottlenecks and giving an equal share of
* the model to each action.
*
*/
-XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(void);
+XBT_PUBLIC(void) surf_host_model_init_ptask_L07(void);
/** \ingroup SURF_models
- * \brief The list of all available workstation model models
+ * \brief The list of all available host model models
*/
XBT_PUBLIC_DATA(s_surf_model_description_t)
- surf_workstation_model_description[];
+ surf_host_model_description[];
/** \ingroup SURF_models
* \brief Initializes the platform with the current best network and cpu models at hand
*
- * This platform model seperates the workstation model and the network model.
- * The workstation model will be initialized with the model compound, the network
+ * This platform model seperates the host model and the network model.
+ * The host model will be initialized with the model compound, the network
* model with the model LV08 (with cross traffic support) and the CPU model with
* the model Cas01.
* Such model is subject to modification with warning in the ChangeLog so monitor it!
*
*/
-XBT_PUBLIC(void) surf_vm_workstation_model_init_HL13(void);
+XBT_PUBLIC(void) surf_vm_model_init_HL13(void);
/** \ingroup SURF_models
- * \brief The list of all available vm workstation model models
+ * \brief The list of all available vm model models
*/
XBT_PUBLIC_DATA(s_surf_model_description_t)
- surf_vm_workstation_model_description[];
+ surf_vm_model_description[];
/*******************************************/
* This function has to be called to initialize the common
* structures. Then you will have to create the environment by
* calling
- * e.g. surf_workstation_model_init_CM02()
+ * e.g. surf_host_model_init_CM02()
*
- * \see surf_workstation_model_init_CM02(), surf_workstation_model_init_compound(), surf_exit()
+ * \see surf_host_model_init_CM02(), surf_host_model_init_compound(), surf_exit()
*/
XBT_PUBLIC(void) surf_init(int *argc, char **argv); /* initialize common structures */
void jedule_setup_platform()
{
AS_t root_comp;
- // e_surf_network_element_type_t type;
jed_simgrid_container_t root_container;
* Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
*
* Example:
- * MSG_config("workstation/model","ptask_L07");
+ * MSG_config("host/model","ptask_L07");
*/
void MSG_config(const char *key, const char *value){
xbt_assert(msg_global,"ERROR: Please call MSG_init() before using MSG_config()");
*/
/********************************* Host **************************************/
-msg_host_t __MSG_host_create(smx_host_t workstation)
+msg_host_t __MSG_host_create(smx_host_t host)
{
- const char *name = SIMIX_host_get_name(workstation);
+ const char *name = SIMIX_host_get_name(host);
msg_host_priv_t priv = xbt_new0(s_msg_host_priv_t, 1);
#ifdef MSG_USE_DEPRECATED
# define MSG_RETURN(val) return(val)
#endif
-msg_host_t __MSG_host_create(smx_host_t workstation);
+msg_host_t __MSG_host_create(smx_host_t host);
msg_storage_t __MSG_storage_create(smx_storage_t storage);
void __MSG_host_destroy(msg_host_t host);
void __MSG_storage_destroy(msg_storage_priv_t host);
surf_init(argc, argv);
- xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model",
+ xbt_cfg_setdefault_string(_sg_cfg_set, "host/model",
"ptask_L07");
#ifdef HAVE_JEDULE
* Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
*
* Example:
- * SD_config("workstation/model","default");
+ * SD_config("host/model","default");
*/
void SD_config(const char *key, const char *value){
xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
/* now let's create the SD wrappers for workstations, storages and links */
xbt_lib_foreach(host_lib, cursor, name, surf_workstation){
- if(surf_workstation[SURF_WKS_LEVEL])
- __SD_workstation_create(surf_workstation[SURF_WKS_LEVEL], NULL);
+ if(surf_workstation[SURF_HOST_LEVEL])
+ __SD_workstation_create(surf_workstation[SURF_HOST_LEVEL], NULL);
}
xbt_lib_foreach(link_lib, cursor, name, surf_link) {
{
int i;
- void **surf_workstations;
+ void **surf_hosts;
xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
"Task '%s' is not runnable or in a fifo! Task state: %d",
SD_task_get_name(task));
XBT_DEBUG("Really running task '%s'", SD_task_get_name(task));
- int workstation_nb = task->workstation_nb;
+ int host_nb = task->workstation_nb;
/* set this task as current task for the workstations in sequential mode */
- for (i = 0; i < workstation_nb; i++) {
+ for (i = 0; i < host_nb; i++) {
if (SD_workstation_get_access_mode(task->workstation_list[i]) ==
SD_WORKSTATION_SEQUENTIAL_ACCESS) {
SD_workstation_priv(task->workstation_list[i])->current_task = task;
/* we have to create a Surf workstation array instead of the SimDag
* workstation array */
- surf_workstations = xbt_new(void *, workstation_nb);
+ surf_hosts = xbt_new(void *, host_nb);
- for (i = 0; i < workstation_nb; i++)
- surf_workstations[i] = surf_workstation_resource_priv(task->workstation_list[i]);
+ for (i = 0; i < host_nb; i++)
+ surf_hosts[i] = surf_host_resource_priv(task->workstation_list[i]);
- double *flops_amount = xbt_new0(double, workstation_nb);
- double *bytes_amount = xbt_new0(double, workstation_nb * workstation_nb);
+ double *flops_amount = xbt_new0(double, host_nb);
+ double *bytes_amount = xbt_new0(double, host_nb * host_nb);
if(task->flops_amount)
memcpy(flops_amount, task->flops_amount, sizeof(double) *
- workstation_nb);
+ host_nb);
if(task->bytes_amount)
memcpy(bytes_amount, task->bytes_amount,
- sizeof(double) * workstation_nb * workstation_nb);
+ sizeof(double) * host_nb * host_nb);
- task->surf_action = surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
- workstation_nb,
- surf_workstations,
+ task->surf_action = surf_host_model_execute_parallel_task((surf_host_model_t)surf_host_model,
+ host_nb,
+ surf_hosts,
flops_amount,
bytes_amount,
task->rate);
*/
xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
{
- return surf_resource_get_properties(surf_workstation_resource_priv(workstation));
+ return surf_resource_get_properties(surf_host_resource_priv(workstation));
}
surf_src = src;
surf_dst = dst;
- surf_route = surf_workstation_model_get_route((surf_workstation_model_t)surf_workstation_model,
+ surf_route = surf_host_model_get_route((surf_host_model_t)surf_host_model,
surf_src, surf_dst);
xbt_dynar_foreach(surf_route, cpt, surf_link) {
*/
int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
{
- return xbt_dynar_length(surf_workstation_model_get_route(
- (surf_workstation_model_t)surf_workstation_model, src, dst));
+ return xbt_dynar_length(surf_host_model_get_route(
+ (surf_host_model_t)surf_host_model, src, dst));
}
/**
*/
double SD_workstation_get_power(SD_workstation_t workstation)
{
- return surf_workstation_get_speed(workstation, 1.0);
+ return surf_host_get_speed(workstation, 1.0);
}
/**
* \brief Returns the amount of cores of a workstation
* \return the amount of cores of this workstation
*/
int SD_workstation_get_cores(SD_workstation_t workstation) {
- return surf_workstation_get_core(workstation);
+ return surf_host_get_core(workstation);
}
/**
*/
double SD_workstation_get_available_power(SD_workstation_t workstation)
{
- return surf_workstation_get_available_speed(workstation);
+ return surf_host_get_available_speed(workstation);
}
/**
* \return a dynar containing all mounted storages on the workstation
*/
xbt_dict_t SD_workstation_get_mounted_storage_list(SD_workstation_t workstation){
- return surf_workstation_get_mounted_storage_list(workstation);
+ return surf_host_get_mounted_storage_list(workstation);
}
/**
* \return a dynar containing all mounted storages on the workstation
*/
xbt_dynar_t SD_workstation_get_attached_storage_list(SD_workstation_t workstation){
- return surf_workstation_get_attached_storage_list(workstation);
+ return surf_host_get_attached_storage_list(workstation);
}
/**
} else if (!strcmp(argv[i], "--help-models")) {
int k;
- model_help("workstation", surf_workstation_model_description);
+ model_help("host", surf_host_model_description);
printf("\n");
model_help("CPU", surf_cpu_model_description);
printf("\n");
surf_plugin_description[plugin_id].model_init_preparse();
}
-/* callback of the workstation/model variable */
-static void _sg_cfg_cb__workstation_model(const char *name, int pos)
+/* callback of the host/model variable */
+static void _sg_cfg_cb__host_model(const char *name, int pos)
{
char *val;
val = xbt_cfg_get_string(_sg_cfg_set, name);
if (!strcmp(val, "help")) {
- model_help("workstation", surf_workstation_model_description);
+ model_help("host", surf_host_model_description);
sg_cfg_exit_early();
}
/* Make sure that the model exists */
- find_model_description(surf_workstation_model_description, val);
+ find_model_description(surf_host_model_description, val);
}
-/* callback of the vm_workstation/model variable */
-static void _sg_cfg_cb__vm_workstation_model(const char *name, int pos)
+/* callback of the vm/model variable */
+static void _sg_cfg_cb__vm_model(const char *name, int pos)
{
char *val;
val = xbt_cfg_get_string(_sg_cfg_set, name);
if (!strcmp(val, "help")) {
- model_help("vm_workstation", surf_vm_workstation_model_description);
+ model_help("vm", surf_vm_model_description);
sg_cfg_exit_early();
}
/* Make sure that the model exists */
- find_model_description(surf_vm_workstation_model_description, val);
+ find_model_description(surf_vm_model_description, val);
}
/* callback of the cpu/model variable */
find_model_description(surf_storage_model_description, val);
}
-/* callback of the workstation_model variable */
+/* callback of the network_model variable */
static void _sg_cfg_cb__network_model(const char *name, int pos)
{
char *val;
xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__optimization_mode, NULL);
xbt_cfg_setdefault_string(_sg_cfg_set, "network/optim", "Lazy");
- describe_model(description, surf_workstation_model_description,
- "model", "The model to use for the workstation");
- xbt_cfg_register(&_sg_cfg_set, "workstation/model", description,
- xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__workstation_model, NULL);
- xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model", "default");
+ describe_model(description, surf_host_model_description,
+ "model", "The model to use for the host");
+ xbt_cfg_register(&_sg_cfg_set, "host/model", description,
+ xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__host_model, NULL);
+ xbt_cfg_setdefault_string(_sg_cfg_set, "host/model", "default");
- describe_model(description, surf_vm_workstation_model_description,
- "model", "The model to use for the vm workstation");
- xbt_cfg_register(&_sg_cfg_set, "vm_workstation/model", description,
- xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__vm_workstation_model, NULL);
- xbt_cfg_setdefault_string(_sg_cfg_set, "vm_workstation/model", "default");
+ describe_model(description, surf_vm_model_description,
+ "model", "The model to use for the vm");
+ xbt_cfg_register(&_sg_cfg_set, "vm/model", description,
+ xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__vm_model, NULL);
+ xbt_cfg_setdefault_string(_sg_cfg_set, "vm/model", "default");
xbt_cfg_register(&_sg_cfg_set, "network/TCP_gamma",
"Size of the biggest TCP window (cat /proc/sys/net/ipv4/tcp_[rw]mem for recv/send window; Use the last given value, which is the max window size)",
_sg_cfg_init_status = 0;
}
-/* Pick the right models for CPU, net and workstation, and call their model_init_preparse */
+/* Pick the right models for CPU, net and host, and call their model_init_preparse */
void surf_config_models_setup()
{
- const char *workstation_model_name;
- const char *vm_workstation_model_name;
- int workstation_id = -1;
- int vm_workstation_id = -1;
+ const char *host_model_name;
+ const char *vm_model_name;
+ int host_id = -1;
+ int vm_id = -1;
char *network_model_name = NULL;
char *cpu_model_name = NULL;
int storage_id = -1;
char *storage_model_name = NULL;
- workstation_model_name =
- xbt_cfg_get_string(_sg_cfg_set, "workstation/model");
- vm_workstation_model_name =
- xbt_cfg_get_string(_sg_cfg_set, "vm_workstation/model");
+ host_model_name = xbt_cfg_get_string(_sg_cfg_set, "host/model");
+ vm_model_name = xbt_cfg_get_string(_sg_cfg_set, "vm/model");
network_model_name = xbt_cfg_get_string(_sg_cfg_set, "network/model");
cpu_model_name = xbt_cfg_get_string(_sg_cfg_set, "cpu/model");
storage_model_name = xbt_cfg_get_string(_sg_cfg_set, "storage/model");
/* Check whether we use a net/cpu model differing from the default ones, in which case
- * we should switch to the "compound" workstation model to correctly dispatch stuff to
+ * we should switch to the "compound" host model to correctly dispatch stuff to
* the right net/cpu models.
*/
if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
!xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
- xbt_cfg_is_default_value(_sg_cfg_set, "workstation/model")) {
- XBT_INFO("Switching workstation model to compound since you changed the network and/or cpu model(s)");
- workstation_model_name = "compound";
- xbt_cfg_set_string(_sg_cfg_set, "workstation/model", workstation_model_name);
+ xbt_cfg_is_default_value(_sg_cfg_set, "host/model")) {
+ XBT_INFO("Switching host model to compound since you changed the network and/or cpu model(s)");
+ host_model_name = "compound";
+ xbt_cfg_set_string(_sg_cfg_set, "host/model", host_model_name);
}
- XBT_DEBUG("Workstation model: %s", workstation_model_name);
- workstation_id =
- find_model_description(surf_workstation_model_description,
- workstation_model_name);
- if (!strcmp(workstation_model_name, "compound")) {
+ XBT_DEBUG("host model: %s", host_model_name);
+ host_id = find_model_description(surf_host_model_description, host_model_name);
+ if (!strcmp(host_model_name, "compound")) {
int network_id = -1;
int cpu_id = -1;
xbt_assert(cpu_model_name,
- "Set a cpu model to use with the 'compound' workstation model");
+ "Set a cpu model to use with the 'compound' host model");
xbt_assert(network_model_name,
- "Set a network model to use with the 'compound' workstation model");
+ "Set a network model to use with the 'compound' host model");
if(surf_cpu_model_init_preparse){
surf_cpu_model_init_preparse();
surf_network_model_description[network_id].model_init_preparse();
}
- XBT_DEBUG("Call workstation_model_init");
- surf_workstation_model_description[workstation_id].model_init_preparse();
+ XBT_DEBUG("Call host_model_init");
+ surf_host_model_description[host_id].model_init_preparse();
- XBT_DEBUG("Call vm_workstation_model_init");
- vm_workstation_id = find_model_description(surf_vm_workstation_model_description,
- vm_workstation_model_name);
- surf_vm_workstation_model_description[vm_workstation_id].model_init_preparse();
+ XBT_DEBUG("Call vm_model_init");
+ vm_id = find_model_description(surf_vm_model_description, vm_model_name);
+ surf_vm_model_description[vm_id].model_init_preparse();
XBT_DEBUG("Call storage_model_init");
storage_id = find_model_description(surf_storage_model_description, storage_model_name);
void SIMIX_post_create_environment(void) {
- void **workstation = NULL;
+ void **host = NULL;
void **storage = NULL;
xbt_lib_cursor_t cursor = NULL;
char *name = NULL;
/* Create host at SIMIX level */
- xbt_lib_foreach(host_lib, cursor, name, workstation) {
- if(workstation[SURF_WKS_LEVEL])
- SIMIX_host_create(name, workstation[SURF_WKS_LEVEL], NULL);
+ xbt_lib_foreach(host_lib, cursor, name, host) {
+ if(host[SURF_HOST_LEVEL])
+ SIMIX_host_create(name, NULL);
}
/* Create storage at SIMIX level */
/**
* \brief Internal function to create a SIMIX host.
* \param name name of the host to create
- * \param workstation the SURF workstation to encapsulate
* \param data some user data (may be NULL)
*/
-smx_host_t SIMIX_host_create(const char *name,
- void *workstation, void *data)
+smx_host_t SIMIX_host_create(const char *name, void *data)
{
smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1);
s_smx_process_t proc;
xbt_assert((host != NULL), "Invalid parameters");
- if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_OFF) {
- surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_ON);
+ if (surf_resource_get_state(surf_host_resource_priv(h))==SURF_RESOURCE_OFF) {
+ surf_resource_set_state(surf_host_resource_priv(h), SURF_RESOURCE_ON);
unsigned int cpt;
smx_process_arg_t arg;
xbt_assert((host != NULL), "Invalid parameters");
- if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_ON) {
- surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_OFF);
+ if (surf_resource_get_state(surf_host_resource_priv(h))==SURF_RESOURCE_ON) {
+ surf_resource_set_state(surf_host_resource_priv(h), SURF_RESOURCE_OFF);
/* Clean Simulator data */
if (xbt_swag_size(host->process_list) != 0) {
}
xbt_dict_t SIMIX_host_get_properties(smx_host_t host){
- return surf_resource_get_properties(surf_workstation_resource_priv(host));
+ return surf_resource_get_properties(surf_host_resource_priv(host));
}
double SIMIX_host_get_speed(smx_host_t host){
- return surf_workstation_get_speed(host, 1.0);
+ return surf_host_get_speed(host, 1.0);
}
int SIMIX_host_get_core(smx_host_t host){
- return surf_workstation_get_core(host);
+ return surf_host_get_core(host);
}
xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
double SIMIX_host_get_available_speed(smx_host_t host){
- return surf_workstation_get_available_speed(host);
+ return surf_host_get_available_speed(host);
}
double SIMIX_host_get_current_power_peak(smx_host_t host) {
- return surf_workstation_get_current_power_peak(host);
+ return surf_host_get_current_power_peak(host);
}
double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) {
- return surf_workstation_get_power_peak_at(host, pstate_index);
+ return surf_host_get_power_peak_at(host, pstate_index);
}
int SIMIX_host_get_nb_pstates(smx_host_t host) {
- return surf_workstation_get_nb_pstates(host);
+ return surf_host_get_nb_pstates(host);
}
void SIMIX_host_set_pstate(smx_host_t host, int pstate_index) {
- surf_workstation_set_pstate(host, pstate_index);
+ surf_host_set_pstate(host, pstate_index);
}
int SIMIX_host_get_pstate(smx_host_t host) {
- return surf_workstation_get_pstate(host);
+ return surf_host_get_pstate(host);
}
double SIMIX_host_get_consumed_energy(smx_host_t host) {
- return surf_workstation_get_consumed_energy(host);
+ return surf_host_get_consumed_energy(host);
}
double SIMIX_host_get_wattmin_at(smx_host_t host,int pstate) {
- return surf_workstation_get_wattmin_at(host,pstate);
+ return surf_host_get_wattmin_at(host,pstate);
}
double SIMIX_host_get_wattmax_at(smx_host_t host,int pstate) {
- return surf_workstation_get_wattmax_at(host,pstate);
+ return surf_host_get_wattmax_at(host,pstate);
}
int SIMIX_host_get_state(smx_host_t host){
- return surf_resource_get_state(surf_workstation_resource_priv(host));
+ return surf_resource_get_state(surf_host_resource_priv(host));
}
void _SIMIX_host_free_process_arg(void *data)
/* set surf's action */
if (!MC_is_active() && !MC_record_replay_is_active()) {
- synchro->execution.surf_exec = surf_workstation_execute(host, flops_amount);
+ synchro->execution.surf_exec = surf_host_execute(host, flops_amount);
surf_action_set_data(synchro->execution.surf_exec, synchro);
surf_action_set_priority(synchro->execution.surf_exec, priority);
double *flops_amount, double *bytes_amount,
double amount, double rate){
- void **workstation_list = NULL;
+ void **surf_host_list = NULL;
int i;
/* alloc structures and initialize */
synchro->category = NULL;
/* set surf's synchro */
- workstation_list = xbt_new0(void *, host_nb);
+ surf_host_list = xbt_new0(void *, host_nb);
for (i = 0; i < host_nb; i++)
- workstation_list[i] = surf_workstation_resource_priv(host_list[i]);
+ surf_host_list[i] = surf_host_resource_priv(host_list[i]);
/* FIXME: what happens if host_list contains VMs and PMs. If
* execute_parallel_task() does not change the state of the model, we can mix
* them. */
- surf_model_t ws_model = surf_resource_model(host_list[0], SURF_WKS_LEVEL);
+ surf_model_t ws_model = surf_resource_model(host_list[0], SURF_HOST_LEVEL);
for (i = 1; i < host_nb; i++) {
- surf_model_t ws_model_tmp = surf_resource_model(host_list[i], SURF_WKS_LEVEL);
+ surf_model_t ws_model_tmp = surf_resource_model(host_list[i], SURF_HOST_LEVEL);
if (ws_model_tmp != ws_model) {
XBT_CRITICAL("mixing VMs and PMs is not supported");
DIE_IMPOSSIBLE;
/* set surf's synchro */
if (!MC_is_active() && !MC_record_replay_is_active()) {
synchro->execution.surf_exec =
- surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
- host_nb, workstation_list, flops_amount, bytes_amount, rate);
+ surf_host_model_execute_parallel_task((surf_host_model_t)surf_host_model,
+ host_nb, surf_host_list, flops_amount, bytes_amount, rate);
surf_action_set_data(synchro->execution.surf_exec, synchro);
}
(int)synchro->state);
}
/* check if the host is down */
- if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
{
if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
* for parallel tasks too */
- surf_resource_get_state(surf_workstation_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
+ surf_resource_get_state(surf_host_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
/* If the host running the synchro failed, notice it so that the asking
* process can be killed if it runs on that host itself */
synchro->state = SIMIX_FAILED;
void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params)
{
/* jump to ws_get_params(). */
- surf_workstation_get_params(ind_vm, params);
+ surf_host_get_params(ind_vm, params);
}
void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
{
/* jump to ws_set_params(). */
- surf_workstation_set_params(ind_vm, params);
+ surf_host_set_params(ind_vm, params);
}
xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){
xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return surf_workstation_get_mounted_storage_list(host);
+ return surf_host_get_mounted_storage_list(host);
}
xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host){
xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return surf_workstation_get_attached_storage_list(host);
+ return surf_host_get_attached_storage_list(host);
}
}
void _SIMIX_host_free_process_arg(void *);
-smx_host_t SIMIX_host_create(const char *name, void *workstation, void *data);
+smx_host_t SIMIX_host_create(const char *name, void *data);
void SIMIX_host_destroy(void *host);
void SIMIX_host_add_auto_restart_process(smx_host_t host,
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
+ synchro->io.surf_io = surf_host_read(host, fd->surf_file, size);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
+ synchro->io.surf_io = surf_host_write(host, fd->surf_file, size);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_open(host, fullpath);
+ synchro->io.surf_io = surf_host_open(host, fullpath);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
+ synchro->io.surf_io = surf_host_close(host, fd->surf_file);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
int SIMIX_file_unlink(smx_file_t fd, smx_host_t host)
{
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
- int res = surf_workstation_unlink(host, fd->surf_file);
+ int res = surf_host_unlink(host, fd->surf_file);
xbt_free(fd);
return !!res;
}
sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_get_size(host, fd->surf_file);
+ return surf_host_get_size(host, fd->surf_file);
}
sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd)
sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_tell(host, fd->surf_file);
+ return surf_host_file_tell(host, fd->surf_file);
}
xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_get_info(host, fd->surf_file);
+ return surf_host_get_info(host, fd->surf_file);
}
int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin)
int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_seek(host, fd->surf_file, offset, origin);
+ return surf_host_file_seek(host, fd->surf_file, offset, origin);
}
int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)
int SIMIX_file_move(smx_process_t process, smx_file_t file, const char* fullpath)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_move(host, file->surf_file, fullpath);
+ return surf_host_file_move(host, file->surf_file, fullpath);
}
sg_size_t SIMIX_storage_get_size(smx_storage_t storage){
(int)synchro->state);
}
- if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
SIMIX_comm_finish(synchro);
} else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
- sleep = surf_workstation_sleep(simcall->issuer->smx_host, timeout);
+ sleep = surf_host_sleep(simcall->issuer->smx_host, timeout);
surf_action_set_data(sleep, synchro);
if (simcall->issuer == synchro->comm.src_proc)
XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro,
SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
- synchro->comm.surf_comm = surf_workstation_model_communicate(surf_workstation_model,
+ synchro->comm.surf_comm = surf_host_model_communicate(surf_host_model,
sender, receiver,
synchro->comm.task_size, synchro->comm.rate);
/* Check out for errors */
- if (surf_resource_get_state(surf_workstation_resource_priv(
+ if (surf_resource_get_state(surf_host_resource_priv(
simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
}
}
- if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
smx_host_t host = process->smx_host;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->sleep.host = host;
- synchro->sleep.surf_sleep =
- surf_workstation_sleep(host, duration);
+ synchro->sleep.surf_sleep = surf_host_sleep(host, duration);
surf_action_set_data(synchro->sleep.surf_sleep, synchro);
XBT_DEBUG("Create sleep synchronization %p", synchro);
THROW_IMPOSSIBLE;
break;
}
- if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
simcall_process_sleep__set__result(simcall, state);
sync = xbt_mallocator_get(simix_global->synchro_mallocator);
sync->type = SIMIX_SYNC_SYNCHRO;
sync->name = xbt_strdup("synchro");
- sync->synchro.sleep =
- surf_workstation_sleep(smx_host, timeout);
+ sync->synchro.sleep = surf_host_sleep(smx_host, timeout);
surf_action_set_data(sync->synchro.sleep, sync);
XBT_OUT();
smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host)
{
/* Create surf associated resource */
- surf_vm_workstation_model_create(name, ind_phys_host);
+ surf_vm_model_create(name, ind_phys_host);
- smx_host_t smx_host = SIMIX_host_create(name, ind_phys_host, NULL);
+ smx_host_t smx_host = SIMIX_host_create(name, NULL);
/* We will be able to register the VM to its physical host, so that we can promptly
* retrieve the list VMs on the physical host. */
static long host_get_ramsize(smx_host_t vm, int *overcommit)
{
s_ws_params_t params;
- surf_workstation_get_params(vm, ¶ms);
+ surf_host_get_params(vm, ¶ms);
if (overcommit)
*overcommit = params.overcommit;
/* **** start a VM **** */
static int __can_be_started(smx_host_t vm)
{
- smx_host_t pm = surf_vm_workstation_get_pm(vm);
+ smx_host_t pm = surf_vm_get_pm(vm);
int pm_overcommit = 0;
long pm_ramsize = host_get_ramsize(pm, &pm_overcommit);
}
long total_ramsize_of_vms = 0;
- xbt_dynar_t dyn_vms = surf_workstation_get_vms(pm);
+ xbt_dynar_t dyn_vms = surf_host_get_vms(pm);
{
unsigned int cursor = 0;
smx_host_t another_vm;
void SIMIX_vm_start(smx_host_t ind_vm)
{
if (__can_be_started(ind_vm))
- surf_resource_set_state(surf_workstation_resource_priv(ind_vm),
+ surf_resource_set_state(surf_host_resource_priv(ind_vm),
(int)SURF_VM_STATE_RUNNING);
else
THROWF(vm_error, 0, "The VM %s cannot be started", SIMIX_host_get_name(ind_vm));
int SIMIX_vm_get_state(smx_host_t ind_vm)
{
- return surf_resource_get_state(surf_workstation_resource_priv(ind_vm));
+ return surf_resource_get_state(surf_host_resource_priv(ind_vm));
}
/**
xbt_assert(SIMIX_vm_get_state(ind_vm) == SURF_VM_STATE_SUSPENDED);
/* jump to vm_ws_xigrate(). this will update the vm location. */
- surf_vm_workstation_migrate(ind_vm, ind_dst_pm);
+ surf_vm_migrate(ind_vm, ind_dst_pm);
}
/**
void *SIMIX_vm_get_pm(smx_host_t ind_vm)
{
/* jump to vm_ws_get_pm(). this will return the vm name. */
- return surf_vm_workstation_get_pm(ind_vm);
+ return surf_vm_get_pm(ind_vm);
}
/**
void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound)
{
/* jump to vm_ws_set_vm_bound(). */
- surf_vm_workstation_set_bound(ind_vm, bound);
+ surf_vm_set_bound(ind_vm, bound);
}
/**
xbt_assert(SIMIX_vm_get_pm(ind_vm) == ind_pm);
/* jump to vm_ws_set_vm_affinity(). */
- surf_vm_workstation_set_affinity(ind_vm, ind_pm, mask);
+ surf_vm_set_affinity(ind_vm, ind_pm, mask);
}
XBT_DEBUG("suspend VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* jump to vm_ws_suspend. The state will be set. */
- surf_vm_workstation_suspend(ind_vm);
+ surf_vm_suspend(ind_vm);
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
XBT_DEBUG("resume VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* jump to vm_ws_resume() */
- surf_vm_workstation_resume(ind_vm);
+ surf_vm_resume(ind_vm);
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
XBT_DEBUG("save VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* jump to vm_ws_save() */
- surf_vm_workstation_save(ind_vm);
+ surf_vm_save(ind_vm);
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
XBT_DEBUG("restore VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* jump to vm_ws_restore() */
- surf_vm_workstation_resume(ind_vm);
+ surf_vm_resume(ind_vm);
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
}
/* FIXME: we may have to do something at the surf layer, e.g., vcpu action */
- surf_resource_set_state(surf_workstation_resource_priv(ind_vm),
+ surf_resource_set_state(surf_host_resource_priv(ind_vm),
(int)SURF_VM_STATE_CREATED);
}
xbt_lib_unset(host_lib, hostname, SIMIX_HOST_LEVEL, 1);
/* jump to vm_ws_destroy(). The surf level resource will be freed. */
- surf_vm_workstation_destroy(ind_vm);
+ surf_vm_destroy(ind_vm);
}
/** @ingroup SURF_cpu_interface
* @brief SURF cpu resource interface class
-* @details A Cpu represent a cpu associated to a workstation
+* @details A Cpu represent a cpu associated to a host
*/
XBT_PUBLIC_CLASS Cpu : public Resource {
public:
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "workstation_clm03.hpp"
-#include "vm_workstation_interface.hpp"
+#include "host_clm03.hpp"
+
#include "cpu_cas01.hpp"
#include "simgrid/sg_config.h"
+#include "vm_interface.hpp"
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
/*************
* CallBacks *
* Model *
*********/
-void surf_workstation_model_init_current_default(void)
+void surf_host_model_init_current_default(void)
{
- surf_workstation_model = new WorkstationCLM03Model();
+ surf_host_model = new HostCLM03Model();
xbt_cfg_setdefault_boolean(_sg_cfg_set, "network/crosstraffic", "yes");
surf_cpu_model_init_Cas01();
surf_network_model_init_LegrandVelho();
- surf_workstation_model->p_cpuModel = surf_cpu_model_pm;
+ surf_host_model->p_cpuModel = surf_cpu_model_pm;
- ModelPtr model = surf_workstation_model;
+ ModelPtr model = surf_host_model;
xbt_dynar_push(model_list, &model);
xbt_dynar_push(model_list_invoke, &model);
- sg_platf_host_add_cb(workstation_parse_init);
+ sg_platf_host_add_cb(host_parse_init);
}
-void surf_workstation_model_init_compound()
+void surf_host_model_init_compound()
{
xbt_assert(surf_cpu_model_pm, "No CPU model defined yet!");
xbt_assert(surf_network_model, "No network model defined yet!");
- surf_workstation_model = new WorkstationCLM03Model();
+ surf_host_model = new HostCLM03Model();
- ModelPtr model = surf_workstation_model;
+ ModelPtr model = surf_host_model;
xbt_dynar_push(model_list, &model);
xbt_dynar_push(model_list_invoke, &model);
- sg_platf_host_add_cb(workstation_parse_init);
+ sg_platf_host_add_cb(host_parse_init);
}
-WorkstationCLM03Model::WorkstationCLM03Model()
- : WorkstationModel("Workstation")
+HostCLM03Model::HostCLM03Model()
+ : HostModel("Host CLM03")
{
}
-WorkstationCLM03Model::~WorkstationCLM03Model()
+HostCLM03Model::~HostCLM03Model()
{}
-WorkstationPtr WorkstationCLM03Model::createWorkstation(const char *name){
- WorkstationPtr workstation = new WorkstationCLM03(surf_workstation_model, name, NULL,
+HostPtr HostCLM03Model::createHost(const char *name){
+ HostPtr host = new HostCLM03(surf_host_model, name, NULL,
(xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL),
(RoutingEdgePtr)xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL),
static_cast<CpuPtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL)));
- XBT_DEBUG("Create workstation %s with %ld mounted disks", name, xbt_dynar_length(workstation->p_storage));
- xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, workstation);
- return workstation;
+ XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_storage));
+ xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, host);
+ return host;
}
-double WorkstationCLM03Model::shareResources(double now){
+double HostCLM03Model::shareResources(double now){
adjustWeightOfDummyCpuActions();
double min_by_cpu = p_cpuModel->shareResources(now);
return res;
}
-void WorkstationCLM03Model::updateActionsState(double /*now*/, double /*delta*/){
+void HostCLM03Model::updateActionsState(double /*now*/, double /*delta*/){
return;
}
-ActionPtr WorkstationCLM03Model::executeParallelTask(int workstation_nb,
- void **workstation_list,
+ActionPtr HostCLM03Model::executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate){
#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
ActionPtr action =NULL;
- if ((workstation_nb == 1)
+ if ((host_nb == 1)
&& (cost_or_zero(bytes_amount, 0) == 0.0)){
- action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
- } else if ((workstation_nb == 1)
+ action = ((HostCLM03Ptr)host_list[0])->execute(flops_amount[0]);
+ } else if ((host_nb == 1)
&& (cost_or_zero(flops_amount, 0) == 0.0)) {
- action = communicate((WorkstationCLM03Ptr)workstation_list[0],
- (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
- } else if ((workstation_nb == 2)
+ action = communicate((HostCLM03Ptr)host_list[0],
+ (HostCLM03Ptr)host_list[0],bytes_amount[0], rate);
+ } else if ((host_nb == 2)
&& (cost_or_zero(flops_amount, 0) == 0.0)
&& (cost_or_zero(flops_amount, 1) == 0.0)) {
int i,nb = 0;
double value = 0.0;
- for (i = 0; i < workstation_nb * workstation_nb; i++) {
+ for (i = 0; i < host_nb * host_nb; i++) {
if (cost_or_zero(bytes_amount, i) > 0.0) {
nb++;
value = cost_or_zero(bytes_amount, i);
}
}
if (nb == 1){
- action = communicate((WorkstationCLM03Ptr)workstation_list[0],
- (WorkstationCLM03Ptr)workstation_list[1],value, rate);
+ action = communicate((HostCLM03Ptr)host_list[0],
+ (HostCLM03Ptr)host_list[1],value, rate);
}
} else
THROW_UNIMPLEMENTED; /* This model does not implement parallel tasks */
#undef cost_or_zero
- xbt_free((WorkstationCLM03Ptr)workstation_list);
+ xbt_free((HostCLM03Ptr)host_list);
return action;
}
-ActionPtr WorkstationCLM03Model::communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate){
+ActionPtr HostCLM03Model::communicate(HostPtr src, HostPtr dst, double size, double rate){
return surf_network_model->communicate(src->p_netElm, dst->p_netElm, size, rate);
}
/************
* Resource *
************/
-WorkstationCLM03::WorkstationCLM03(WorkstationModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
- : Workstation(model, name, properties, storage, netElm, cpu) {}
+HostCLM03::HostCLM03(HostModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
+ : Host(model, name, properties, storage, netElm, cpu) {}
-bool WorkstationCLM03::isUsed(){
+bool HostCLM03::isUsed(){
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
return -1;
}
-void WorkstationCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/){
+void HostCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/){
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
}
-ActionPtr WorkstationCLM03::execute(double size) {
+ActionPtr HostCLM03::execute(double size) {
return p_cpu->execute(size);
}
-ActionPtr WorkstationCLM03::sleep(double duration) {
+ActionPtr HostCLM03::sleep(double duration) {
return p_cpu->sleep(duration);
}
-e_surf_resource_state_t WorkstationCLM03::getState() {
+e_surf_resource_state_t HostCLM03::getState() {
return p_cpu->getState();
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "workstation_interface.hpp"
#include "storage_interface.hpp"
#include "cpu_interface.hpp"
+#include "host_interface.hpp"
#include "network_interface.hpp"
-#ifndef SURF_WORKSTATION_CLM03_HPP_
-#define SURF_WORKSTATION_CLM03_HPP_
+#ifndef SURF_HOST_CLM03_HPP_
+#define SURF_HOST_CLM03_HPP_
/***********
* Classes *
***********/
-class WorkstationCLM03Model;
-typedef WorkstationCLM03Model *WorkstationCLM03ModelPtr;
+class HostCLM03Model;
+typedef HostCLM03Model *HostCLM03ModelPtr;
-class WorkstationCLM03;
-typedef WorkstationCLM03 *WorkstationCLM03Ptr;
+class HostCLM03;
+typedef HostCLM03 *HostCLM03Ptr;
-class WorkstationCLM03Action;
-typedef WorkstationCLM03Action *WorkstationCLM03ActionPtr;
+class HostCLM03Action;
+typedef HostCLM03Action *HostCLM03ActionPtr;
/*********
* Model *
*********/
-class WorkstationCLM03Model : public WorkstationModel {
+class HostCLM03Model : public HostModel {
public:
- WorkstationCLM03Model();
- ~WorkstationCLM03Model();
- WorkstationPtr createWorkstation(const char *name);
+ HostCLM03Model();
+ ~HostCLM03Model();
+ HostPtr createHost(const char *name);
double shareResources(double now);
void updateActionsState(double now, double delta);
- ActionPtr executeParallelTask(int workstation_nb,
- void **workstation_list,
+ ActionPtr executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate);
- ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
+ ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
};
/************
* Resource *
************/
-class WorkstationCLM03 : public Workstation {
+class HostCLM03 : public Host {
public:
- WorkstationCLM03(WorkstationModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
+ HostCLM03(HostModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
void updateState(tmgr_trace_event_t event_type, double value, double date);
-#endif /* SURF_WORKSTATION_CLM03_HPP_ */
+#endif /* SURF_HOST_CLM03_HPP_ */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "host_interface.hpp"
+
#include "simix/smx_private.h"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
#include "cpu_cas01.hpp"
#include "simgrid/sg_config.h"
#include "network_interface.hpp"
+#include "vm_interface.hpp"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
- "Logging specific to the SURF workstation module");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_host, surf,
+ "Logging specific to the SURF host module");
-WorkstationModelPtr surf_workstation_model = NULL;
+HostModelPtr surf_host_model = NULL;
/*************
* Callbacks *
*************/
-surf_callback(void, WorkstationPtr) workstationCreatedCallbacks;
-surf_callback(void, WorkstationPtr) workstationDestructedCallbacks;
-surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t) workstationStateChangedCallbacks;
-surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t) workstationActionStateChangedCallbacks;
+surf_callback(void, HostPtr) hostCreatedCallbacks;
+surf_callback(void, HostPtr) hostDestructedCallbacks;
+surf_callback(void, HostPtr, e_surf_resource_state_t, e_surf_resource_state_t) hostStateChangedCallbacks;
+surf_callback(void, HostActionPtr, e_surf_action_state_t, e_surf_action_state_t) hostActionStateChangedCallbacks;
-void workstation_parse_init(sg_platf_host_cbarg_t host)
+void host_parse_init(sg_platf_host_cbarg_t host)
{
- surf_workstation_model->createWorkstation(host->id);
+ surf_host_model->createHost(host->id);
}
-void workstation_add_traces(){
- surf_workstation_model->addTraces();
+void host_add_traces(){
+ surf_host_model->addTraces();
}
/*********
* Model *
*********/
-WorkstationModel::WorkstationModel(const char *name)
+HostModel::HostModel(const char *name)
: Model(name)
{
p_cpuModel = surf_cpu_model_pm;
}
-WorkstationModel::WorkstationModel()
-: Model("Workstation") {
+HostModel::HostModel()
+: Model("Host") {
p_cpuModel = surf_cpu_model_pm;
}
-WorkstationModel::~WorkstationModel() {
+HostModel::~HostModel() {
}
/* Each VM has a dummy CPU action on the PM layer. This CPU action works as the
* constraint (capacity) of the VM in the PM layer. If the VM does not have any
* active task, the dummy CPU action must be deactivated, so that the VM does
* not get any CPU share in the PM layer. */
-void WorkstationModel::adjustWeightOfDummyCpuActions()
+void HostModel::adjustWeightOfDummyCpuActions()
{
/* iterate for all virtual machines */
- for (WorkstationVMModel::vm_list_t::iterator iter =
- WorkstationVMModel::ws_vms.begin();
- iter != WorkstationVMModel::ws_vms.end(); ++iter) {
+ for (VMModel::vm_list_t::iterator iter =
+ VMModel::ws_vms.begin();
+ iter != VMModel::ws_vms.end(); ++iter) {
- WorkstationVMPtr ws_vm = &*iter;
+ VMPtr ws_vm = &*iter;
CpuCas01Ptr cpu_cas01 = static_cast<CpuCas01Ptr>(ws_vm->p_cpu);
- xbt_assert(cpu_cas01, "cpu-less workstation");
+ xbt_assert(cpu_cas01, "cpu-less host");
int is_active = lmm_constraint_used(cpu_cas01->getModel()->getMaxminSystem(), cpu_cas01->getConstraint());
// int is_active_old = constraint_is_active(cpu_cas01);
/************
* Resource *
************/
-Workstation::Workstation()
+Host::Host()
{
- surf_callback_emit(workstationCreatedCallbacks, this);
+ surf_callback_emit(hostCreatedCallbacks, this);
}
-Workstation::Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+Host::Host(ModelPtr model, const char *name, xbt_dict_t props,
xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
: Resource(model, name, props)
, p_storage(storage), p_netElm(netElm), p_cpu(cpu)
{
p_params.ramsize = 0;
- surf_callback_emit(workstationCreatedCallbacks, this);
+ surf_callback_emit(hostCreatedCallbacks, this);
}
-Workstation::Workstation(ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
+Host::Host(ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
: Resource(model, name, props, constraint)
, p_storage(storage), p_netElm(netElm), p_cpu(cpu)
{
p_params.ramsize = 0;
- surf_callback_emit(workstationCreatedCallbacks, this);
+ surf_callback_emit(hostCreatedCallbacks, this);
}
-Workstation::~Workstation(){
- surf_callback_emit(workstationDestructedCallbacks, this);
+Host::~Host(){
+ surf_callback_emit(hostDestructedCallbacks, this);
}
-void Workstation::setState(e_surf_resource_state_t state){
+void Host::setState(e_surf_resource_state_t state){
e_surf_resource_state_t old = Resource::getState();
Resource::setState(state);
- surf_callback_emit(workstationStateChangedCallbacks, this, old, state);
+ surf_callback_emit(hostStateChangedCallbacks, this, old, state);
p_cpu->setState(state);
}
-int Workstation::getCore(){
+int Host::getCore(){
return p_cpu->getCore();
}
-double Workstation::getSpeed(double load){
+double Host::getSpeed(double load){
return p_cpu->getSpeed(load);
}
-double Workstation::getAvailableSpeed(){
+double Host::getAvailableSpeed(){
return p_cpu->getAvailableSpeed();
}
-double Workstation::getCurrentPowerPeak()
+double Host::getCurrentPowerPeak()
{
return p_cpu->getCurrentPowerPeak();
}
-double Workstation::getPowerPeakAt(int pstate_index)
+double Host::getPowerPeakAt(int pstate_index)
{
return p_cpu->getPowerPeakAt(pstate_index);
}
-int Workstation::getNbPstates()
+int Host::getNbPstates()
{
return p_cpu->getNbPstates();
}
-void Workstation::setPstate(int pstate_index)
+void Host::setPstate(int pstate_index)
{
p_cpu->setPstate(pstate_index);
}
-int Workstation::getPstate()
+int Host::getPstate()
{
return p_cpu->getPstate();
}
-xbt_dict_t Workstation::getProperties()
+xbt_dict_t Host::getProperties()
{
return p_cpu->getProperties();
}
-StoragePtr Workstation::findStorageOnMountList(const char* mount)
+StoragePtr Host::findStorageOnMountList(const char* mount)
{
StoragePtr st = NULL;
s_mount_t mnt;
return st;
}
-xbt_dict_t Workstation::getMountedStorageList()
+xbt_dict_t Host::getMountedStorageList()
{
s_mount_t mnt;
unsigned int i;
return storage_list;
}
-xbt_dynar_t Workstation::getAttachedStorageList()
+xbt_dynar_t Host::getAttachedStorageList()
{
xbt_lib_cursor_t cursor;
char *key;
return result;
}
-ActionPtr Workstation::open(const char* fullpath) {
+ActionPtr Host::open(const char* fullpath) {
StoragePtr st = NULL;
s_mount_t mnt;
return action;
}
-ActionPtr Workstation::close(surf_file_t fd) {
+ActionPtr Host::close(surf_file_t fd) {
StoragePtr st = findStorageOnMountList(fd->mount);
XBT_DEBUG("CLOSE %s on disk '%s'",fd->name, st->getName());
return st->close(fd);
}
-ActionPtr Workstation::read(surf_file_t fd, sg_size_t size) {
+ActionPtr Host::read(surf_file_t fd, sg_size_t size) {
StoragePtr st = findStorageOnMountList(fd->mount);
XBT_DEBUG("READ %s on disk '%s'",fd->name, st->getName());
return st->read(fd, size);
}
-ActionPtr Workstation::write(surf_file_t fd, sg_size_t size) {
+ActionPtr Host::write(surf_file_t fd, sg_size_t size) {
StoragePtr st = findStorageOnMountList(fd->mount);
XBT_DEBUG("WRITE %s on disk '%s'",fd->name, st->getName());
return st->write(fd, size);
}
-int Workstation::unlink(surf_file_t fd) {
+int Host::unlink(surf_file_t fd) {
if (!fd){
XBT_WARN("No such file descriptor. Impossible to unlink");
return -1;
}
}
-sg_size_t Workstation::getSize(surf_file_t fd){
+sg_size_t Host::getSize(surf_file_t fd){
return fd->size;
}
-xbt_dynar_t Workstation::getInfo( surf_file_t fd)
+xbt_dynar_t Host::getInfo( surf_file_t fd)
{
StoragePtr st = findStorageOnMountList(fd->mount);
sg_size_t *psize = xbt_new(sg_size_t, 1);
return info;
}
-sg_size_t Workstation::fileTell(surf_file_t fd){
+sg_size_t Host::fileTell(surf_file_t fd){
return fd->current_position;
}
-int Workstation::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
+int Host::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
switch (origin) {
case SEEK_SET:
}
}
-int Workstation::fileMove(surf_file_t fd, const char* fullpath){
+int Host::fileMove(surf_file_t fd, const char* fullpath){
/* Check if the new full path is on the same mount point */
if(!strncmp((const char*)fd->mount, fullpath, strlen(fd->mount))) {
sg_size_t *psize, *new_psize;
}
}
-xbt_dynar_t Workstation::getVms()
+xbt_dynar_t Host::getVms()
{
- xbt_dynar_t dyn = xbt_dynar_new(sizeof(WorkstationVMPtr), NULL);
+ xbt_dynar_t dyn = xbt_dynar_new(sizeof(VMPtr), NULL);
/* iterate for all virtual machines */
- for (WorkstationVMModel::vm_list_t::iterator iter =
- WorkstationVMModel::ws_vms.begin();
- iter != WorkstationVMModel::ws_vms.end(); ++iter) {
+ for (VMModel::vm_list_t::iterator iter =
+ VMModel::ws_vms.begin();
+ iter != VMModel::ws_vms.end(); ++iter) {
- WorkstationVMPtr ws_vm = &*iter;
+ VMPtr ws_vm = &*iter;
if (this == ws_vm->p_subWs)
xbt_dynar_push(dyn, &ws_vm);
}
return dyn;
}
-void Workstation::getParams(ws_params_t params)
+void Host::getParams(ws_params_t params)
{
*params = p_params;
}
-void Workstation::setParams(ws_params_t params)
+void Host::setParams(ws_params_t params)
{
/* may check something here. */
p_params = *params;
* Action *
**********/
-void WorkstationAction::setState(e_surf_action_state_t state){
+void HostAction::setState(e_surf_action_state_t state){
e_surf_action_state_t old = getState();
Action::setState(state);
- surf_callback_emit(workstationActionStateChangedCallbacks, this, old, state);
+ surf_callback_emit(hostActionStateChangedCallbacks, this, old, state);
}
#include "cpu_interface.hpp"
#include "network_interface.hpp"
-#ifndef SURF_WORKSTATION_INTERFACE_HPP_
-#define SURF_WORKSTATION_INTERFACE_HPP_
+#ifndef SURF_HOST_INTERFACE_HPP_
+#define SURF_HOST_INTERFACE_HPP_
/***********
* Classes *
***********/
-class WorkstationModel;
-typedef WorkstationModel *WorkstationModelPtr;
+class HostModel;
+typedef HostModel *HostModelPtr;
-class Workstation;
-typedef Workstation *WorkstationPtr;
+class Host;
+typedef Host *HostPtr;
-class WorkstationAction;
-typedef WorkstationAction *WorkstationActionPtr;
+class HostAction;
+typedef HostAction *HostActionPtr;
/*************
* Callbacks *
*************/
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation creation *
- * @details Callback functions have the following signature: `void(WorkstationPtr)`
+ * @brief Callbacks handler which emit the callbacks after Host creation *
+ * @details Callback functions have the following signature: `void(HostPtr)`
*/
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationCreatedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr)) hostCreatedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation destruction *
- * @details Callback functions have the following signature: `void(WorkstationPtr)`
+ * @brief Callbacks handler which emit the callbacks after Host destruction *
+ * @details Callback functions have the following signature: `void(HostPtr)`
*/
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationDestructedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr)) hostDestructedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation State changed *
- * @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks handler which emit the callbacks after Host State changed *
+ * @details Callback functions have the following signature: `void(HostActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
*/
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t)) workstationStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr, e_surf_resource_state_t, e_surf_resource_state_t)) hostStateChangedCallbacks;
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationAction State changed *
- * @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks handler which emit the callbacks after HostAction State changed *
+ * @details Callback functions have the following signature: `void(HostActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
*/
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t)) workstationActionStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostActionPtr, e_surf_action_state_t, e_surf_action_state_t)) hostActionStateChangedCallbacks;
/*********
* Tools *
*********/
-XBT_PUBLIC_DATA(WorkstationModelPtr) surf_workstation_model;
-XBT_PUBLIC(void) workstation_parse_init(sg_platf_host_cbarg_t host);
-XBT_PUBLIC(void) workstation_add_traces();
+XBT_PUBLIC_DATA(HostModelPtr) surf_host_model;
+XBT_PUBLIC(void) host_parse_init(sg_platf_host_cbarg_t host);
+XBT_PUBLIC(void) host_add_traces();
/*********
* Model *
*********/
-/** @ingroup SURF_workstation_interface
- * @brief SURF Workstation model interface class
+/** @ingroup SURF_host_interface
+ * @brief SURF Host model interface class
* @details A model is an object which handle the interactions between its Resources and its Actions
*/
-class WorkstationModel : public Model {
+class HostModel : public Model {
public:
/**
- * @brief WorkstationModel constructor
+ * @brief HostModel constructor
*
* @param name the name of the model
*/
- WorkstationModel(const char *name);
+ HostModel(const char *name);
- /**
- * @brief WorkstationModel constructor
- */
- WorkstationModel();
+ /** @brief HostModel constructor */
+ HostModel();
- /**
- * @brief WorkstationModel destructor
- */
- ~WorkstationModel();
+ /** @brief HostModel destructor */
+ ~HostModel();
- virtual WorkstationPtr createWorkstation(const char *name)=0;
+ virtual HostPtr createHost(const char *name)=0;
void addTraces(){DIE_IMPOSSIBLE;}
/**
* @brief [brief description]
* @details [long description]
*
- * @param workstation_nb [description]
- * @param workstation_list [description]
+ * @param host_nb [description]
+ * @param host_list [description]
* @param flops_amount [description]
* @param bytes_amount [description]
* @param rate [description]
* @return [description]
*/
- virtual ActionPtr executeParallelTask(int workstation_nb,
- void **workstation_list,
+ virtual ActionPtr executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate)=0;
* @param rate [description]
* @return [description]
*/
- virtual ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate)=0;
+ virtual ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate)=0;
CpuModelPtr p_cpuModel;
};
/************
* Resource *
************/
-/** @ingroup SURF_workstation_interface
- * @brief SURF Workstation interface class
- * @details A workstation VM represent an virtual machine with a aggregation of a Cpu, a NetworkLink and a Storage
+/** @ingroup SURF_host_interface
+ * @brief SURF Host interface class
+ * @details An host represents a machine with a aggregation of a Cpu, a NetworkLink and a Storage
*/
-class Workstation : public Resource {
+class Host : public Resource {
public:
/**
- * @brief Workstation constructor
+ * @brief Host constructor
*/
- Workstation();
+ Host();
/**
- * @brief Workstation constructor
+ * @brief Host constructor
*
- * @param model WorkstationModel associated to this Workstation
- * @param name The name of the Workstation
- * @param props Dictionary of properties associated to this Workstation
- * @param storage The Storage associated to this Workstation
- * @param netElm The RoutingEdge associated to this Workstation
- * @param cpu The Cpu associated to this Workstation
- */
- Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+ * @param model HostModel associated to this Host
+ * @param name The name of the Host
+ * @param props Dictionary of properties associated to this Host
+ * @param storage The Storage associated to this Host
+ * @param netElm The RoutingEdge associated to this Host
+ * @param cpu The Cpu associated to this Host
+ */
+ Host(ModelPtr model, const char *name, xbt_dict_t props,
xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
/**
- * @brief Workstation constructor
+ * @brief Host constructor
*
- * @param model WorkstationModel associated to this Workstation
- * @param name The name of the Workstation
- * @param props Dictionary of properties associated to this Workstation
- * @param constraint The lmm constraint associated to this Workstation if it is part of a LMM component
- * @param storage The Storage associated to this Workstation
- * @param netElm The RoutingEdge associated to this Workstation
- * @param cpu The Cpu associated to this Workstation
- */
- Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+ * @param model HostModel associated to this Host
+ * @param name The name of the Host
+ * @param props Dictionary of properties associated to this Host
+ * @param constraint The lmm constraint associated to this Host if it is part of a LMM component
+ * @param storage The Storage associated to this Host
+ * @param netElm The RoutingEdge associated to this Host
+ * @param cpu The Cpu associated to this Host
+ */
+ Host(ModelPtr model, const char *name, xbt_dict_t props,
lmm_constraint_t constraint, xbt_dynar_t storage, RoutingEdgePtr netElm,
CpuPtr cpu);
- /**
- * @brief Workstation destructor
- */
- ~ Workstation();
+ /** @brief Host destructor */
+ ~ Host();
void setState(e_surf_resource_state_t state);
/**
- * @brief Get the properties of the currenrt Workstation
+ * @brief Get the properties of the current Host
*
- * @return The properties of the current Workstation
+ * @return The properties of the current Host
*/
xbt_dict_t getProperties();
virtual xbt_dict_t getMountedStorageList();
/**
- * @brief Get the xbt_dynar_t of storages attached to the workstation
+ * @brief Get the xbt_dynar_t of storages attached to the Host
*
* @return The xbt_dynar_t of Storage names
*/
NetworkLinkPtr p_network;
/**
- * @brief Get the list of virtual machines on the current Workstation
+ * @brief Get the list of virtual machines on the current Host
*
* @return The list of VMs
*/
* Action *
**********/
-/** @ingroup SURF_workstation_interface
- * @brief SURF workstation action interface class
+/** @ingroup SURF_host_interface
+ * @brief SURF host action interface class
*/
-class WorkstationAction : public Action {
+class HostAction : public Action {
public:
/**
- * @brief WorkstationAction constructor
+ * @brief HostAction constructor
*
- * @param model The WorkstationModel associated to this WorkstationAction
- * @param cost The cost of this WorkstationAction in [TODO]
+ * @param model The HostModel associated to this HostAction
+ * @param cost The cost of this HostAction in [TODO]
* @param failed [description]
*/
- WorkstationAction(ModelPtr model, double cost, bool failed)
+ HostAction(ModelPtr model, double cost, bool failed)
: Action(model, cost, failed) {}
/**
- * @brief WorkstationAction constructor
+ * @brief HostAction constructor
*
- * @param model The WorkstationModel associated to this WorkstationAction
- * @param cost The cost of this WorkstationAction in [TODO]
+ * @param model The HostModel associated to this HostAction
+ * @param cost The cost of this HostAction in [TODO]
* @param failed [description]
* @param var The lmm variable associated to this StorageAction if it is part of a LMM component
*/
- WorkstationAction(ModelPtr model, double cost, bool failed, lmm_variable_t var)
+ HostAction(ModelPtr model, double cost, bool failed, lmm_variable_t var)
: Action(model, cost, failed, var) {}
void setState(e_surf_action_state_t state);
};
-#endif /* SURF_WORKSTATION_INTERFACE_HPP_ */
+#endif /* SURF_Host_INTERFACE_HPP_ */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "workstation_ptask_L07.hpp"
+#include "host_ptask_L07.hpp"
+
#include "cpu_interface.hpp"
#include "surf_routing.hpp"
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
static int ptask_host_count = 0;
static xbt_dict_t ptask_parallel_task_link_set = NULL;
static void ptask_define_callbacks()
{
sg_platf_host_add_cb(cpu_parse_init);
- sg_platf_host_add_cb(workstation_parse_init);
+ sg_platf_host_add_cb(host_parse_init);
sg_platf_link_add_cb(ptask_netlink_parse_init);
- sg_platf_postparse_add_cb(workstation_add_traces);
+ sg_platf_postparse_add_cb(host_add_traces);
}
-void surf_workstation_model_init_ptask_L07(void)
+void surf_host_model_init_ptask_L07(void)
{
- XBT_INFO("surf_workstation_model_init_ptask_L07");
+ XBT_INFO("surf_host_model_init_ptask_L07");
xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
xbt_assert(!surf_network_model, "network model type already defined");
ptask_define_callbacks();
- surf_workstation_model = new WorkstationL07Model();
- ModelPtr model = surf_workstation_model;
+ surf_host_model = new HostL07Model();
+ ModelPtr model = surf_host_model;
xbt_dynar_push(model_list, &model);
xbt_dynar_push(model_list_invoke, &model);
}
-WorkstationL07Model::WorkstationL07Model() : WorkstationModel("Workstation ptask_L07") {
+HostL07Model::HostL07Model() : HostModel("Host ptask_L07") {
if (!ptask_maxmin_system)
ptask_maxmin_system = lmm_system_new(1);
- surf_workstation_model = NULL;
+ surf_host_model = NULL;
surf_network_model = new NetworkL07Model();
surf_cpu_model_pm = new CpuL07Model();
routing_model_create(surf_network_model->createNetworkLink("__loopback__",
p_cpuModel = surf_cpu_model_pm;
}
-WorkstationL07Model::~WorkstationL07Model() {
+HostL07Model::~HostL07Model() {
xbt_dict_free(&ptask_parallel_task_link_set);
delete surf_cpu_model_pm;
}
}
-double WorkstationL07Model::shareResources(double /*now*/)
+double HostL07Model::shareResources(double /*now*/)
{
- WorkstationL07ActionPtr action;
+ HostL07ActionPtr action;
ActionListPtr running_actions = getRunningActionSet();
double min = this->shareResourcesMaxMin(running_actions,
for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end())
; it != itend ; ++it) {
- action = static_cast<WorkstationL07ActionPtr>(&*it);
+ action = static_cast<HostL07ActionPtr>(&*it);
if (action->m_latency > 0) {
if (min < 0) {
min = action->m_latency;
return min;
}
-void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
+void HostL07Model::updateActionsState(double /*now*/, double delta)
{
double deltap = 0.0;
- WorkstationL07ActionPtr action;
+ HostL07ActionPtr action;
ActionListPtr actionSet = getRunningActionSet();
for(ActionList::iterator it(actionSet->begin()), itNext = it, itend(actionSet->end())
; it != itend ; it=itNext) {
++itNext;
- action = static_cast<WorkstationL07ActionPtr>(&*it);
+ action = static_cast<HostL07ActionPtr>(&*it);
deltap = delta;
if (action->m_latency > 0) {
if (action->m_latency > deltap) {
i++))) {
constraint_id = lmm_constraint_id(cnst);
- if (static_cast<WorkstationPtr>(constraint_id)->getState() == SURF_RESOURCE_OFF) {
+ if (static_cast<HostPtr>(constraint_id)->getState() == SURF_RESOURCE_OFF) {
XBT_DEBUG("Action (%p) Failed!!", action);
action->finish();
action->setState(SURF_ACTION_FAILED);
return;
}
-ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
- void **workstation_list,
+ActionPtr HostL07Model::executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate)
{
- WorkstationL07ActionPtr action;
+ HostL07ActionPtr action;
int i, j;
unsigned int cpt;
int nb_link = 0;
xbt_dict_reset(ptask_parallel_task_link_set);
/* Compute the number of affected resources... */
- for (i = 0; i < workstation_nb; i++) {
- for (j = 0; j < workstation_nb; j++) {
+ for (i = 0; i < host_nb; i++) {
+ for (j = 0; j < host_nb; j++) {
xbt_dynar_t route=NULL;
- if (bytes_amount[i * workstation_nb + j] > 0) {
+ if (bytes_amount[i * host_nb + j] > 0) {
double lat=0.0;
unsigned int cpt;
void *_link;
LinkL07Ptr link;
- routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
- static_cast<WorkstationL07Ptr>(workstation_list[j])->p_netElm,
+ routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(host_list[i])->p_netElm,
+ static_cast<HostL07Ptr>(host_list[j])->p_netElm,
&route,
&lat);
latency = MAX(latency, lat);
nb_link = xbt_dict_length(ptask_parallel_task_link_set);
xbt_dict_reset(ptask_parallel_task_link_set);
- for (i = 0; i < workstation_nb; i++)
+ for (i = 0; i < host_nb; i++)
if (flops_amount[i] > 0)
nb_host++;
- action = new WorkstationL07Action(this, 1, 0);
+ action = new HostL07Action(this, 1, 0);
XBT_DEBUG("Creating a parallel task (%p) with %d cpus and %d links.",
- action, workstation_nb, nb_link);
+ action, host_nb, nb_link);
action->m_suspended = 0; /* Should be useless because of the
calloc but it seems to help valgrind... */
- action->m_workstationNb = workstation_nb;
- action->p_workstationList = (WorkstationPtr *) workstation_list;
+ action->m_hostNb = host_nb;
+ action->p_hostList = (HostPtr *) host_list;
action->p_computationAmount = flops_amount;
action->p_communicationAmount = bytes_amount;
action->m_latency = latency;
action->p_variable = lmm_variable_new(ptask_maxmin_system, action, 1.0,
(action->m_rate > 0) ? action->m_rate : -1.0,
- workstation_nb + nb_link);
+ host_nb + nb_link);
if (action->m_latency > 0)
lmm_update_variable_weight(ptask_maxmin_system, action->getVariable(), 0.0);
- for (i = 0; i < workstation_nb; i++)
+ for (i = 0; i < host_nb; i++)
lmm_expand(ptask_maxmin_system,
- static_cast<WorkstationL07Ptr>(workstation_list[i])->p_cpu->getConstraint(),
+ static_cast<HostL07Ptr>(host_list[i])->p_cpu->getConstraint(),
action->getVariable(), flops_amount[i]);
- for (i = 0; i < workstation_nb; i++) {
- for (j = 0; j < workstation_nb; j++) {
+ for (i = 0; i < host_nb; i++) {
+ for (j = 0; j < host_nb; j++) {
void *_link;
LinkL07Ptr link;
xbt_dynar_t route=NULL;
- if (bytes_amount[i * workstation_nb + j] == 0.0)
+ if (bytes_amount[i * host_nb + j] == 0.0)
continue;
- routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
- static_cast<WorkstationL07Ptr>(workstation_list[j])->p_netElm,
+ routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(host_list[i])->p_netElm,
+ static_cast<HostL07Ptr>(host_list[j])->p_netElm,
&route, NULL);
xbt_dynar_foreach(route, cpt, _link) {
link = static_cast<LinkL07Ptr>(_link);
lmm_expand_add(ptask_maxmin_system, link->getConstraint(),
action->getVariable(),
- bytes_amount[i * workstation_nb + j]);
+ bytes_amount[i * host_nb + j]);
}
}
}
return action;
}
-WorkstationPtr WorkstationL07Model::createWorkstation(const char *name)
+HostPtr HostL07Model::createHost(const char *name)
{
- WorkstationL07Ptr wk = NULL;
- xbt_assert(!surf_workstation_resource_priv(surf_workstation_resource_by_name(name)),
+ HostL07Ptr wk = NULL;
+ xbt_assert(!surf_host_resource_priv(surf_host_resource_by_name(name)),
"Host '%s' declared several times in the platform file.",
name);
- wk = new WorkstationL07(this, name, NULL,
+ wk = new HostL07(this, name, NULL,
static_cast<RoutingEdgePtr>(xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL)),
static_cast<CpuPtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL)));
- xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, wk);
+ xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
return wk;//FIXME:xbt_lib_get_elm_or_null(host_lib, name);
}
-ActionPtr WorkstationL07Model::communicate(WorkstationPtr src, WorkstationPtr dst,
+ActionPtr HostL07Model::communicate(HostPtr src, HostPtr dst,
double size, double rate)
{
- void **workstation_list = xbt_new0(void *, 2);
+ void **host_list = xbt_new0(void *, 2);
double *flops_amount = xbt_new0(double, 2);
double *bytes_amount = xbt_new0(double, 4);
ActionPtr res = NULL;
- workstation_list[0] = src;
- workstation_list[1] = dst;
+ host_list[0] = src;
+ host_list[1] = dst;
bytes_amount[1] = size;
- res = executeParallelTask(2, workstation_list,
+ res = executeParallelTask(2, host_list,
flops_amount,
bytes_amount, rate);
return res;
}
-xbt_dynar_t WorkstationL07Model::getRoute(WorkstationPtr src, WorkstationPtr dst)
+xbt_dynar_t HostL07Model::getRoute(HostPtr src, HostPtr dst)
{
xbt_dynar_t route=NULL;
routing_platf->getRouteAndLatency(src->p_netElm, dst->p_netElm, &route, NULL);
double power_initial = xbt_dynar_get_as(powerPeak, pstate, double);
xbt_dynar_free(&powerPeak); // kill memory leak
- xbt_assert(!surf_workstation_resource_priv(surf_workstation_resource_by_name(name)),
+ xbt_assert(!surf_host_resource_priv(surf_host_resource_by_name(name)),
"Host '%s' declared several times in the platform file.",
name);
return nw_link;
}
-void WorkstationL07Model::addTraces()
+void HostL07Model::addTraces()
{
xbt_dict_cursor_t cursor = NULL;
char *trace_name, *elm;
* Resource *
************/
-WorkstationL07::WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
- : Workstation(model, name, props, NULL, netElm, cpu)
+HostL07::HostL07(HostModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
+ : Host(model, name, props, NULL, netElm, cpu)
{
}
-double WorkstationL07::getPowerPeakAt(int /*pstate_index*/)
+double HostL07::getPowerPeakAt(int /*pstate_index*/)
{
THROW_UNIMPLEMENTED;
}
-int WorkstationL07::getNbPstates()
+int HostL07::getNbPstates()
{
THROW_UNIMPLEMENTED;
}
-void WorkstationL07::setPstate(int /*pstate_index*/)
+void HostL07::setPstate(int /*pstate_index*/)
{
THROW_UNIMPLEMENTED;
}
-int WorkstationL07::getPstate()
+int HostL07::getPstate()
{
THROW_UNIMPLEMENTED;
}
-double WorkstationL07::getConsumedEnergy()
+double HostL07::getConsumedEnergy()
{
THROW_UNIMPLEMENTED;
}
return;
}
-e_surf_resource_state_t WorkstationL07::getState()
+e_surf_resource_state_t HostL07::getState()
{
return p_cpu->getState();
}
-ActionPtr WorkstationL07::execute(double size)
+ActionPtr HostL07::execute(double size)
{
- void **workstation_list = xbt_new0(void *, 1);
+ void **host_list = xbt_new0(void *, 1);
double *flops_amount = xbt_new0(double, 1);
double *bytes_amount = xbt_new0(double, 1);
- workstation_list[0] = this;
+ host_list[0] = this;
bytes_amount[0] = 0.0;
flops_amount[0] = size;
- return static_cast<WorkstationL07ModelPtr>(getModel())->executeParallelTask(1, workstation_list,
+ return static_cast<HostL07ModelPtr>(getModel())->executeParallelTask(1, host_list,
flops_amount,
bytes_amount, -1);
}
-ActionPtr WorkstationL07::sleep(double duration)
+ActionPtr HostL07::sleep(double duration)
{
- WorkstationL07ActionPtr action = NULL;
+ HostL07ActionPtr action = NULL;
XBT_IN("(%s,%g)", getName(), duration);
- action = static_cast<WorkstationL07ActionPtr>(execute(1.0));
+ action = static_cast<HostL07ActionPtr>(execute(1.0));
action->m_maxDuration = duration;
action->m_suspended = 2;
lmm_update_variable_weight(ptask_maxmin_system, action->getVariable(), 0.0);
void LinkL07::updateLatency(double value, double date)
{
lmm_variable_t var = NULL;
- WorkstationL07ActionPtr action;
+ HostL07ActionPtr action;
lmm_element_t elem = NULL;
m_latCurrent = value;
while ((var = lmm_get_var_from_cnst(ptask_maxmin_system, getConstraint(), &elem))) {
- action = (WorkstationL07ActionPtr) lmm_variable_id(var);
+ action = (HostL07ActionPtr) lmm_variable_id(var);
action->updateBound();
}
}
* Action *
**********/
-WorkstationL07Action::~WorkstationL07Action(){
- free(p_workstationList);
+HostL07Action::~HostL07Action(){
+ free(p_hostList);
free(p_communicationAmount);
free(p_computationAmount);
}
-void WorkstationL07Action::updateBound()
+void HostL07Action::updateBound()
{
double lat_current = 0.0;
double lat_bound = -1.0;
int i, j;
- for (i = 0; i < m_workstationNb; i++) {
- for (j = 0; j < m_workstationNb; j++) {
+ for (i = 0; i < m_hostNb; i++) {
+ for (j = 0; j < m_hostNb; j++) {
xbt_dynar_t route=NULL;
- if (p_communicationAmount[i * m_workstationNb + j] > 0) {
+ if (p_communicationAmount[i * m_hostNb + j] > 0) {
double lat = 0.0;
- routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(((void**)p_workstationList)[i])->p_netElm,
- static_cast<WorkstationL07Ptr>(((void**)p_workstationList)[j])->p_netElm,
+ routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(((void**)p_hostList)[i])->p_netElm,
+ static_cast<HostL07Ptr>(((void**)p_hostList)[j])->p_netElm,
&route, &lat);
- lat_current = MAX(lat_current, lat * p_communicationAmount[i * m_workstationNb + j]);
+ lat_current = MAX(lat_current, lat * p_communicationAmount[i * m_hostNb + j]);
}
}
}
}
}
-int WorkstationL07Action::unref()
+int HostL07Action::unref()
{
m_refcount--;
if (!m_refcount) {
return 0;
}
-void WorkstationL07Action::cancel()
+void HostL07Action::cancel()
{
setState(SURF_ACTION_FAILED);
return;
}
-void WorkstationL07Action::suspend()
+void HostL07Action::suspend()
{
XBT_IN("(%p))", this);
if (m_suspended != 2) {
XBT_OUT();
}
-void WorkstationL07Action::resume()
+void HostL07Action::resume()
{
XBT_IN("(%p)", this);
if (m_suspended != 2) {
XBT_OUT();
}
-bool WorkstationL07Action::isSuspended()
+bool HostL07Action::isSuspended()
{
return m_suspended == 1;
}
-void WorkstationL07Action::setMaxDuration(double duration)
+void HostL07Action::setMaxDuration(double duration)
{ /* FIXME: should inherit */
XBT_IN("(%p,%g)", this, duration);
m_maxDuration = duration;
XBT_OUT();
}
-void WorkstationL07Action::setPriority(double priority)
+void HostL07Action::setPriority(double priority)
{ /* FIXME: should inherit */
XBT_IN("(%p,%g)", this, priority);
m_priority = priority;
XBT_OUT();
}
-double WorkstationL07Action::getRemains()
+double HostL07Action::getRemains()
{
XBT_IN("(%p)", this);
XBT_OUT();
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "workstation_interface.hpp"
+#include "host_interface.hpp"
-#ifndef WORKSTATION_L07_HPP_
-#define WORKSTATION_L07_HPP_
+#ifndef HOST_L07_HPP_
+#define HOST_L07_HPP_
/***********
* Classes *
***********/
-class WorkstationL07Model;
-typedef WorkstationL07Model *WorkstationL07ModelPtr;
+class HostL07Model;
+typedef HostL07Model *HostL07ModelPtr;
class CpuL07Model;
typedef CpuL07Model *CpuL07ModelPtr;
class NetworkL07Model;
typedef NetworkL07Model *NetworkL07ModelPtr;
-class WorkstationL07;
-typedef WorkstationL07 *WorkstationL07Ptr;
+class HostL07;
+typedef HostL07 *HostL07Ptr;
class CpuL07;
typedef CpuL07 *CpuL07Ptr;
class LinkL07;
typedef LinkL07 *LinkL07Ptr;
-class WorkstationL07Action;
-typedef WorkstationL07Action *WorkstationL07ActionPtr;
+class HostL07Action;
+typedef HostL07Action *HostL07ActionPtr;
/*********
* Tools *
/*********
* Model *
*********/
-class WorkstationL07Model : public WorkstationModel {
+class HostL07Model : public HostModel {
public:
- WorkstationL07Model();
- ~WorkstationL07Model();
+ HostL07Model();
+ ~HostL07Model();
double shareResources(double now);
void updateActionsState(double now, double delta);
- WorkstationPtr createWorkstation(const char *name);
- ActionPtr executeParallelTask(int workstation_nb,
- void **workstation_list,
+ HostPtr createHost(const char *name);
+ ActionPtr executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate);
- xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst);
- ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
+ xbt_dynar_t getRoute(HostPtr src, HostPtr dst);
+ ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
void addTraces();
NetworkModelPtr p_networkModel;
};
xbt_dict_t cpu_properties);
void addTraces() {DIE_IMPOSSIBLE;};
- WorkstationL07ModelPtr p_workstationModel;
+ HostL07ModelPtr p_hostModel;
};
class NetworkL07Model : public NetworkModel {
ActionPtr communicate(RoutingEdgePtr /*src*/, RoutingEdgePtr /*dst*/, double /*size*/, double /*rate*/) {DIE_IMPOSSIBLE;};
void addTraces() {DIE_IMPOSSIBLE;};
- WorkstationL07ModelPtr p_workstationModel;
+ HostL07ModelPtr p_hostModel;
};
/************
* Resource *
************/
-class WorkstationL07 : public Workstation {
+class HostL07 : public Host {
public:
- WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
+ HostL07(HostModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
//bool isUsed();
bool isUsed() {DIE_IMPOSSIBLE;};
void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {DIE_IMPOSSIBLE;};
};
class CpuL07 : public Cpu {
- friend void WorkstationL07Model::addTraces();
+ friend void HostL07Model::addTraces();
tmgr_trace_event_t p_stateEvent;
tmgr_trace_event_t p_powerEvent;
public:
/**********
* Action *
**********/
-class WorkstationL07Action : public WorkstationAction {
- friend ActionPtr WorkstationL07::execute(double size);
- friend ActionPtr WorkstationL07::sleep(double duration);
- friend ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
- void **workstation_list,
+class HostL07Action : public HostAction {
+ friend ActionPtr HostL07::execute(double size);
+ friend ActionPtr HostL07::sleep(double duration);
+ friend ActionPtr HostL07Model::executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate);
public:
- WorkstationL07Action(ModelPtr model, double cost, bool failed)
- : WorkstationAction(model, cost, failed) {};
- ~WorkstationL07Action();
+ HostL07Action(ModelPtr model, double cost, bool failed)
+ : HostAction(model, cost, failed) {};
+ ~HostL07Action();
void updateBound();
void setPriority(double priority);
double getRemains();
- int m_workstationNb;
- WorkstationPtr *p_workstationList;
+ int m_hostNb;
+ HostPtr *p_hostList;
double *p_computationAmount;
double *p_communicationAmount;
double m_latency;
double m_rate;
};
-#endif /* WORKSTATION_L07_HPP_ */
+#endif /* HOST_L07_HPP_ */
virtual void gapAppend(double /*size*/, const NetworkLinkPtr /*link*/, NetworkActionPtr /*action*/) {};
/**
- * @brief Create a communication between two workstations.
+ * @brief Create a communication between two hosts.
* @details It makes calls to the routing part, and execute the communication
* between the two end points.
*
************/
/** @ingroup SURF_network_interface
* @brief SURF network link interface class
- * @details A NetworkLink represents the link between two [Workstations](\ref Workstation)
+ * @details A NetworkLink represents the link between two [hosts](\ref Host)
*/
class NetworkLink : public Resource {
public:
/** @ingroup SURF_network_interface
* @brief SURF network action interface class
* @details A NetworkAction represents a communication between two
- * [Workstations](\ref Workstation)
+ * [hosts](\ref Host)
*/
class NetworkAction : public Action {
public:
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "host_interface.hpp"
#include "surf_interface.hpp"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
#include "network_interface.hpp"
#include "surf_routing_cluster.hpp"
#include "instr/instr_private.h"
#include "plugins/energy.hpp"
+#include "vm_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_kernel);
return static_cast<CpuPtr>(surf_cpu_resource_priv(resource));
}
-static WorkstationPtr get_casted_workstation(surf_resource_t resource){
- return static_cast<WorkstationPtr>(surf_workstation_resource_priv(resource));
+static HostPtr get_casted_host(surf_resource_t resource){
+ return static_cast<HostPtr>(surf_host_resource_priv(resource));
}
static RoutingEdgePtr get_casted_routing(surf_resource_t resource){
return static_cast<RoutingEdgePtr>(surf_routing_resource_priv(resource));
}
-static WorkstationVMPtr get_casted_vm_workstation(surf_resource_t resource){
- return static_cast<WorkstationVMPtr>(surf_workstation_resource_priv(resource));
+static VMPtr get_casted_vm(surf_resource_t resource){
+ return static_cast<VMPtr>(surf_host_resource_priv(resource));
}
char *surf_routing_edge_name(sg_routing_edge_t edge){
*********/
surf_model_t surf_resource_model(const void *host, int level) {
- /* If level is SURF_WKS_LEVEL, ws is a workstation_CLM03 object. It has
+ /* If level is SURF_WKS_LEVEL, ws is a host_CLM03 object. It has
* surf_resource at the generic_resource field. */
ResourcePtr ws = static_cast<ResourcePtr>(xbt_lib_get_level((xbt_dictelm_t) host, level));
return ws->getModel();
return model->getRunningActionSet()->size();
}
-surf_action_t surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
- int workstation_nb,
- void **workstation_list,
+surf_action_t surf_host_model_execute_parallel_task(surf_host_model_t model,
+ int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate){
- return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, flops_amount, bytes_amount, rate));
+ return static_cast<ActionPtr>(model->executeParallelTask(host_nb, host_list, flops_amount, bytes_amount, rate));
}
-surf_action_t surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
- return model->communicate(get_casted_workstation(src), get_casted_workstation(dst), size, rate);
+surf_action_t surf_host_model_communicate(surf_host_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
+ return model->communicate(get_casted_host(src), get_casted_host(dst), size, rate);
}
-xbt_dynar_t surf_workstation_model_get_route(surf_workstation_model_t /*model*/,
+xbt_dynar_t surf_host_model_get_route(surf_host_model_t /*model*/,
surf_resource_t src, surf_resource_t dst){
xbt_dynar_t route = NULL;
- routing_platf->getRouteAndLatency(get_casted_workstation(src)->p_netElm,
- get_casted_workstation(dst)->p_netElm, &route, NULL);
+ routing_platf->getRouteAndLatency(get_casted_host(src)->p_netElm,
+ get_casted_host(dst)->p_netElm, &route, NULL);
return route;
}
-void surf_vm_workstation_model_create(const char *name, surf_resource_t ind_phys_host){
- surf_vm_workstation_model->createWorkstationVM(name, ind_phys_host);
+void surf_vm_model_create(const char *name, surf_resource_t ind_phys_host){
+ surf_vm_model->createVM(name, ind_phys_host);
}
surf_action_t surf_network_model_communicate(surf_network_model_t model, sg_routing_edge_t src, sg_routing_edge_t dst, double size, double rate){
resource->setState(state);
}
-surf_action_t surf_workstation_sleep(surf_resource_t resource, double duration){
- return get_casted_workstation(resource)->sleep(duration);
+surf_action_t surf_host_sleep(surf_resource_t resource, double duration){
+ return get_casted_host(resource)->sleep(duration);
}
-double surf_workstation_get_speed(surf_resource_t resource, double load){
- return get_casted_workstation(resource)->getSpeed(load);
+double surf_host_get_speed(surf_resource_t resource, double load){
+ return get_casted_host(resource)->getSpeed(load);
}
-double surf_workstation_get_available_speed(surf_resource_t resource){
- return get_casted_workstation(resource)->getAvailableSpeed();
+double surf_host_get_available_speed(surf_resource_t resource){
+ return get_casted_host(resource)->getAvailableSpeed();
}
-int surf_workstation_get_core(surf_resource_t resource){
- return get_casted_workstation(resource)->getCore();
+int surf_host_get_core(surf_resource_t resource){
+ return get_casted_host(resource)->getCore();
}
-surf_action_t surf_workstation_execute(surf_resource_t resource, double size){
- return get_casted_workstation(resource)->execute(size);
+surf_action_t surf_host_execute(surf_resource_t resource, double size){
+ return get_casted_host(resource)->execute(size);
}
-double surf_workstation_get_current_power_peak(surf_resource_t resource){
- return get_casted_workstation(resource)->getCurrentPowerPeak();
+double surf_host_get_current_power_peak(surf_resource_t resource){
+ return get_casted_host(resource)->getCurrentPowerPeak();
}
-double surf_workstation_get_power_peak_at(surf_resource_t resource, int pstate_index){
- return get_casted_workstation(resource)->getPowerPeakAt(pstate_index);
+double surf_host_get_power_peak_at(surf_resource_t resource, int pstate_index){
+ return get_casted_host(resource)->getPowerPeakAt(pstate_index);
}
-int surf_workstation_get_nb_pstates(surf_resource_t resource){
- return get_casted_workstation(resource)->getNbPstates();
+int surf_host_get_nb_pstates(surf_resource_t resource){
+ return get_casted_host(resource)->getNbPstates();
}
-void surf_workstation_set_pstate(surf_resource_t resource, int pstate_index){
- get_casted_workstation(resource)->setPstate(pstate_index);
+void surf_host_set_pstate(surf_resource_t resource, int pstate_index){
+ get_casted_host(resource)->setPstate(pstate_index);
}
-int surf_workstation_get_pstate(surf_resource_t resource){
- return get_casted_workstation(resource)->getPstate();
+int surf_host_get_pstate(surf_resource_t resource){
+ return get_casted_host(resource)->getPstate();
}
-double surf_workstation_get_wattmin_at(surf_resource_t resource, int pstate){
+double surf_host_get_wattmin_at(surf_resource_t resource, int pstate){
xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
- std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+ std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
return cpuIt->second->getWattMinAt(pstate);
}
-double surf_workstation_get_wattmax_at(surf_resource_t resource, int pstate){
+double surf_host_get_wattmax_at(surf_resource_t resource, int pstate){
xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
- std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+ std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
return cpuIt->second->getWattMaxAt(pstate);
}
-double surf_workstation_get_consumed_energy(surf_resource_t resource){
+double surf_host_get_consumed_energy(surf_resource_t resource){
xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
- std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+ std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
return cpuIt->second->getConsumedEnergy();
}
-xbt_dict_t surf_workstation_get_mounted_storage_list(surf_resource_t workstation){
- return get_casted_workstation(workstation)->getMountedStorageList();
+xbt_dict_t surf_host_get_mounted_storage_list(surf_resource_t host){
+ return get_casted_host(host)->getMountedStorageList();
}
-xbt_dynar_t surf_workstation_get_attached_storage_list(surf_resource_t workstation){
- return get_casted_workstation(workstation)->getAttachedStorageList();
+xbt_dynar_t surf_host_get_attached_storage_list(surf_resource_t host){
+ return get_casted_host(host)->getAttachedStorageList();
}
-surf_action_t surf_workstation_open(surf_resource_t workstation, const char* fullpath){
- return get_casted_workstation(workstation)->open(fullpath);
+surf_action_t surf_host_open(surf_resource_t host, const char* fullpath){
+ return get_casted_host(host)->open(fullpath);
}
-surf_action_t surf_workstation_close(surf_resource_t workstation, surf_file_t fd){
- return get_casted_workstation(workstation)->close(fd);
+surf_action_t surf_host_close(surf_resource_t host, surf_file_t fd){
+ return get_casted_host(host)->close(fd);
}
-int surf_workstation_unlink(surf_resource_t workstation, surf_file_t fd){
- return get_casted_workstation(workstation)->unlink(fd);
+int surf_host_unlink(surf_resource_t host, surf_file_t fd){
+ return get_casted_host(host)->unlink(fd);
}
-size_t surf_workstation_get_size(surf_resource_t workstation, surf_file_t fd){
- return get_casted_workstation(workstation)->getSize(fd);
+size_t surf_host_get_size(surf_resource_t host, surf_file_t fd){
+ return get_casted_host(host)->getSize(fd);
}
-surf_action_t surf_workstation_read(surf_resource_t resource, surf_file_t fd, sg_size_t size){
- return get_casted_workstation(resource)->read(fd, size);
+surf_action_t surf_host_read(surf_resource_t host, surf_file_t fd, sg_size_t size){
+ return get_casted_host(host)->read(fd, size);
}
-surf_action_t surf_workstation_write(surf_resource_t resource, surf_file_t fd, sg_size_t size){
- return get_casted_workstation(resource)->write(fd, size);
+surf_action_t surf_host_write(surf_resource_t host, surf_file_t fd, sg_size_t size){
+ return get_casted_host(host)->write(fd, size);
}
-xbt_dynar_t surf_workstation_get_info(surf_resource_t resource, surf_file_t fd){
- return get_casted_workstation(resource)->getInfo(fd);
+xbt_dynar_t surf_host_get_info(surf_resource_t host, surf_file_t fd){
+ return get_casted_host(host)->getInfo(fd);
}
-size_t surf_workstation_file_tell(surf_resource_t workstation, surf_file_t fd){
- return get_casted_workstation(workstation)->fileTell(fd);
+size_t surf_host_file_tell(surf_resource_t host, surf_file_t fd){
+ return get_casted_host(host)->fileTell(fd);
}
-int surf_workstation_file_seek(surf_resource_t workstation, surf_file_t fd,
+int surf_host_file_seek(surf_resource_t host, surf_file_t fd,
sg_offset_t offset, int origin){
- return get_casted_workstation(workstation)->fileSeek(fd, offset, origin);
+ return get_casted_host(host)->fileSeek(fd, offset, origin);
}
-int surf_workstation_file_move(surf_resource_t workstation, surf_file_t fd, const char* fullpath){
- return get_casted_workstation(workstation)->fileMove(fd, fullpath);
+int surf_host_file_move(surf_resource_t host, surf_file_t fd, const char* fullpath){
+ return get_casted_host(host)->fileMove(fd, fullpath);
}
-xbt_dynar_t surf_workstation_get_vms(surf_resource_t resource){
- xbt_dynar_t vms = get_casted_workstation(resource)->getVms();
+xbt_dynar_t surf_host_get_vms(surf_resource_t host){
+ xbt_dynar_t vms = get_casted_host(host)->getVms();
xbt_dynar_t vms_ = xbt_dynar_new(sizeof(smx_host_t), NULL);
unsigned int cpt;
- WorkstationVMPtr vm;
+ VMPtr vm;
xbt_dynar_foreach(vms, cpt, vm) {
smx_host_t vm_ = xbt_lib_get_elm_or_null(host_lib, vm->getName());
xbt_dynar_push(vms_, &vm_);
return vms_;
}
-void surf_workstation_get_params(surf_resource_t resource, ws_params_t params){
- get_casted_workstation(resource)->getParams(params);
+void surf_host_get_params(surf_resource_t host, ws_params_t params){
+ get_casted_host(host)->getParams(params);
}
-void surf_workstation_set_params(surf_resource_t resource, ws_params_t params){
- get_casted_workstation(resource)->setParams(params);
+void surf_host_set_params(surf_resource_t host, ws_params_t params){
+ get_casted_host(host)->setParams(params);
}
-void surf_vm_workstation_destroy(surf_resource_t resource){
- /* ind_phys_workstation equals to smx_host_t */
- //surf_resource_t ind_vm_workstation = xbt_lib_get_elm_or_null(host_lib, getName());
-
+void surf_vm_destroy(surf_resource_t resource){
/* Before clearing the entries in host_lib, we have to pick up resources. */
CpuPtr cpu = get_casted_cpu(resource);
- WorkstationVMPtr vm = get_casted_vm_workstation(resource);
+ VMPtr vm = get_casted_vm(resource);
RoutingEdgePtr routing = get_casted_routing(resource);
char* name = xbt_dict_get_elm_key(resource);
/* We deregister objects from host_lib, without invoking the freeing callback
*/
xbt_lib_unset(host_lib, name, SURF_CPU_LEVEL, 0);
xbt_lib_unset(host_lib, name, ROUTING_HOST_LEVEL, 0);
- xbt_lib_unset(host_lib, name, SURF_WKS_LEVEL, 0);
+ xbt_lib_unset(host_lib, name, SURF_HOST_LEVEL, 0);
/* TODO: comment out when VM storage is implemented. */
// xbt_lib_unset(host_lib, name, SURF_STORAGE_LEVEL, 0);
delete routing;
}
-void surf_vm_workstation_suspend(surf_resource_t resource){
- get_casted_vm_workstation(resource)->suspend();
+void surf_vm_suspend(surf_resource_t vm){
+ get_casted_vm(vm)->suspend();
}
-void surf_vm_workstation_resume(surf_resource_t resource){
- get_casted_vm_workstation(resource)->resume();
+void surf_vm_resume(surf_resource_t vm){
+ get_casted_vm(vm)->resume();
}
-void surf_vm_workstation_save(surf_resource_t resource){
- get_casted_vm_workstation(resource)->save();
+void surf_vm_save(surf_resource_t vm){
+ get_casted_vm(vm)->save();
}
-void surf_vm_workstation_restore(surf_resource_t resource){
- get_casted_vm_workstation(resource)->restore();
+void surf_vm_restore(surf_resource_t vm){
+ get_casted_vm(vm)->restore();
}
-void surf_vm_workstation_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest){
- get_casted_vm_workstation(resource)->migrate(ind_vm_ws_dest);
+void surf_vm_migrate(surf_resource_t vm, surf_resource_t ind_vm_ws_dest){
+ get_casted_vm(vm)->migrate(ind_vm_ws_dest);
}
-surf_resource_t surf_vm_workstation_get_pm(surf_resource_t resource){
- return get_casted_vm_workstation(resource)->getPm();
+surf_resource_t surf_vm_get_pm(surf_resource_t vm){
+ return get_casted_vm(vm)->getPm();
}
-void surf_vm_workstation_set_bound(surf_resource_t resource, double bound){
- return get_casted_vm_workstation(resource)->setBound(bound);
+void surf_vm_set_bound(surf_resource_t vm, double bound){
+ return get_casted_vm(vm)->setBound(bound);
}
-void surf_vm_workstation_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask){
- return get_casted_vm_workstation(resource)->setAffinity(get_casted_cpu(cpu), mask);
+void surf_vm_set_affinity(surf_resource_t vm, surf_resource_t cpu, unsigned long mask){
+ return get_casted_vm(vm)->setAffinity(get_casted_cpu(cpu), mask);
}
int surf_network_link_is_shared(surf_cpp_resource_t link){
#include "surf_interface.hpp"
#include "network_interface.hpp"
#include "cpu_interface.hpp"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
+#include "host_interface.hpp"
#include "simix/smx_host_private.h"
#include "surf_routing.hpp"
#include "simgrid/sg_config.h"
#include "mc/mc.h"
+#include "vm_interface.hpp"
XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
xbt_dynar_free(&hosts);
}*/
-/* model_list_invoke contains only surf_workstation and surf_vm_workstation.
+/* model_list_invoke contains only surf_host and surf_vm.
* The callback functions of cpu_model and network_model will be called from
- * those of these workstation models. */
+ * those of these host models. */
xbt_dynar_t model_list = NULL; /* for destroying all models correctly */
xbt_dynar_t model_list_invoke = NULL; /* for invoking callbacks */
{NULL, NULL, NULL} /* this array must be NULL terminated */
};
-s_surf_model_description_t surf_workstation_model_description[] = {
+s_surf_model_description_t surf_host_model_description[] = {
{"default",
- "Default workstation model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)",
- surf_workstation_model_init_current_default},
+ "Default host model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)",
+ surf_host_model_init_current_default},
{"compound",
- "Workstation model that is automatically chosen if you change the network and CPU models",
- surf_workstation_model_init_compound},
- {"ptask_L07", "Workstation model somehow similar to Cas01+CM02 but allowing parallel tasks",
- surf_workstation_model_init_ptask_L07},
+ "Host model that is automatically chosen if you change the network and CPU models",
+ surf_host_model_init_compound},
+ {"ptask_L07", "Host model somehow similar to Cas01+CM02 but allowing parallel tasks",
+ surf_host_model_init_ptask_L07},
{NULL, NULL, NULL} /* this array must be NULL terminated */
};
-s_surf_model_description_t surf_vm_workstation_model_description[] = {
+s_surf_model_description_t surf_vm_model_description[] = {
{"default",
- "Default vm workstation model.",
- surf_vm_workstation_model_init_HL13},
+ "Default vm model.",
+ surf_vm_model_init_HL13},
{NULL, NULL, NULL} /* this array must be NULL terminated */
};
delete static_cast<NetworkLinkPtr>(r);
}
-static XBT_INLINE void surf_workstation_free(void *r)
+static XBT_INLINE void surf_host_free(void *r)
{
- delete static_cast<WorkstationPtr>(r);
+ delete static_cast<HostPtr>(r);
}
static XBT_INLINE void surf_storage_free(void *r)
XBT_DEBUG("Add SURF levels");
SURF_CPU_LEVEL = xbt_lib_add_level(host_lib,surf_cpu_free);
- SURF_WKS_LEVEL = xbt_lib_add_level(host_lib,surf_workstation_free);
+ SURF_HOST_LEVEL = xbt_lib_add_level(host_lib,surf_host_free);
SURF_LINK_LEVEL = xbt_lib_add_level(link_lib,surf_link_free);
SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free);
*
* @param model The Model associated to this Action
* @param cost The cost of the Action
- * @param failed If the action is impossible (e.g.: execute something on a switched off workstation)
+ * @param failed If the action is impossible (e.g.: execute something on a switched off host)
*/
Action(ModelPtr model, double cost, bool failed);
*
* @param model The Model associated to this Action
* @param cost The cost of the Action
- * @param failed If the action is impossible (e.g.: execute something on a switched off workstation)
+ * @param failed If the action is impossible (e.g.: execute something on a switched off host)
* @param var The lmm variable associated to this Action if it is part of a LMM component
*/
Action(ModelPtr model, double cost, bool failed, lmm_variable_t var);
/**
* @ingroup SURF_build_api
- * @brief A library containing all known workstations
+ * @brief A library containing all known hosts
*/
xbt_lib_t host_lib;
int ROUTING_HOST_LEVEL; //Routing level
int SURF_CPU_LEVEL; //Surf cpu level
-int SURF_WKS_LEVEL; //Surf workstation level
+int SURF_HOST_LEVEL; //Surf host level
int SIMIX_HOST_LEVEL; //Simix host level
int SIMIX_STORAGE_LEVEL; //Simix storage level
int MSG_HOST_LEVEL; //Msg host level
/** @brief Retrieve a routing edge from its name
*
- * Routing edges are either CPU/workstation and routers, whatever
+ * Routing edges are either host and routers, whatever
*/
RoutingEdgePtr sg_routing_edge_by_name_or_null(const char *name) {
RoutingEdgePtr net_elm = (RoutingEdgePtr) xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "vm_workstation_hl13.hpp"
#include "cpu_cas01.hpp"
+#include "vm_hl13.hpp"
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm);
-void surf_vm_workstation_model_init_HL13(void){
+void surf_vm_model_init_HL13(void){
if (surf_cpu_model_vm) {
- surf_vm_workstation_model = new WorkstationVMHL13Model();
- ModelPtr model = surf_vm_workstation_model;
+ surf_vm_model = new VMHL13Model();
+ ModelPtr model = surf_vm_model;
xbt_dynar_push(model_list, &model);
xbt_dynar_push(model_list_invoke, &model);
* Model *
*********/
-WorkstationVMHL13Model::WorkstationVMHL13Model() : WorkstationVMModel() {
+VMHL13Model::VMHL13Model() : VMModel() {
p_cpuModel = surf_cpu_model_vm;
}
-void WorkstationVMHL13Model::updateActionsState(double /*now*/, double /*delta*/){
+void VMHL13Model::updateActionsState(double /*now*/, double /*delta*/){
return;
}
-ActionPtr WorkstationVMHL13Model::communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate){
+ActionPtr VMHL13Model::communicate(HostPtr src, HostPtr dst, double size, double rate){
return surf_network_model->communicate(src->p_netElm, dst->p_netElm, size, rate);
}
/* ind means ''indirect'' that this is a reference on the whole dict_elm
* structure (i.e not on the surf_resource_private infos) */
-WorkstationVMPtr WorkstationVMHL13Model::createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation)
+VMPtr VMHL13Model::createVM(const char *name, surf_resource_t host_PM)
{
- WorkstationVMHL13Ptr ws = new WorkstationVMHL13(this, name, NULL, ind_phys_workstation);
+ VMHL13Ptr ws = new VMHL13(this, name, NULL, host_PM);
- xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, ws);
+ xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, ws);
/* TODO:
* - check how network requests are scheduled between distinct processes competing for the same card.
// const double virt_overhead = 0.95;
const double virt_overhead = 1;
-double WorkstationVMHL13Model::shareResources(double now)
+double VMHL13Model::shareResources(double now)
{
/* TODO: udpate action's cost with the total cost of processes on the VM. */
/* 0. Make sure that we already calculated the resource share at the physical
* machine layer. */
{
- _XBT_GNUC_UNUSED ModelPtr ws_model = surf_workstation_model;
- _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_workstation_model;
+ _XBT_GNUC_UNUSED ModelPtr ws_model = surf_host_model;
+ _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_model;
_XBT_GNUC_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
_XBT_GNUC_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
- xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_workstation_model comes before");
+ xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_host_model comes before");
/* Another option is that we call sub_ws->share_resource() here. The
* share_resource() function has no side-effect. We can call it here to
**/
/* iterate for all virtual machines */
- for (WorkstationVMModel::vm_list_t::iterator iter =
- WorkstationVMModel::ws_vms.begin();
- iter != WorkstationVMModel::ws_vms.end(); ++iter) {
+ for (VMModel::vm_list_t::iterator iter =
+ VMModel::ws_vms.begin();
+ iter != VMModel::ws_vms.end(); ++iter) {
- WorkstationVMPtr ws_vm = &*iter;
+ VMPtr ws_vm = &*iter;
CpuPtr cpu = ws_vm->p_cpu;
- xbt_assert(cpu, "cpu-less workstation");
+ xbt_assert(cpu, "cpu-less host");
double solved_value = get_solved_value(ws_vm->p_action);
XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value,
/* FIXME: 3. do we have to re-initialize our cpu_action object? */
#if 0
/* iterate for all virtual machines */
- for (WorkstationVMModel::vm_list_t::iterator iter =
- WorkstationVMModel::ws_vms.begin();
- iter != WorkstationVMModel::ws_vms.end(); ++iter) {
+ for (VMModel::vm_list_t::iterator iter =
+ VMModel::ws_vms.begin();
+ iter != VMModel::ws_vms.end(); ++iter) {
{
#if 0
- WorkstationVM2013Ptr ws_vm2013 = static_cast<WorkstationVM2013Ptr>(&*iter);
+ VM2013Ptr ws_vm2013 = static_cast<VM2013Ptr>(&*iter);
XBT_INFO("cost %f remains %f start %f finish %f", ws_vm2013->cpu_action->cost,
ws_vm2013->cpu_action->remains,
ws_vm2013->cpu_action->start,
return ret;
}
-ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
- void **workstation_list,
+ActionPtr VMHL13Model::executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate){
#define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
- if ((workstation_nb == 1)
+ if ((host_nb == 1)
&& (cost_or_zero(bytes_amount, 0) == 0.0))
- return ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
- else if ((workstation_nb == 1)
+ return ((HostCLM03Ptr)host_list[0])->execute(flops_amount[0]);
+ else if ((host_nb == 1)
&& (cost_or_zero(flops_amount, 0) == 0.0))
- return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
- else if ((workstation_nb == 2)
+ return communicate((HostCLM03Ptr)host_list[0], (HostCLM03Ptr)host_list[0],bytes_amount[0], rate);
+ else if ((host_nb == 2)
&& (cost_or_zero(flops_amount, 0) == 0.0)
&& (cost_or_zero(flops_amount, 1) == 0.0)) {
int i,nb = 0;
double value = 0.0;
- for (i = 0; i < workstation_nb * workstation_nb; i++) {
+ for (i = 0; i < host_nb * host_nb; i++) {
if (cost_or_zero(bytes_amount, i) > 0.0) {
nb++;
value = cost_or_zero(bytes_amount, i);
}
}
if (nb == 1)
- return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[1],value, rate);
+ return communicate((HostCLM03Ptr)host_list[0], (HostCLM03Ptr)host_list[1],value, rate);
}
#undef cost_or_zero
* Resource *
************/
-WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props,
- surf_resource_t ind_phys_workstation)
- : WorkstationVM(model, name, props, NULL, NULL)
+VMHL13::VMHL13(VMModelPtr model, const char* name, xbt_dict_t props,
+ surf_resource_t host_PM)
+ : VM(model, name, props, NULL, NULL)
{
- WorkstationPtr sub_ws = static_cast<WorkstationPtr>(surf_workstation_resource_priv(ind_phys_workstation));
+ HostPtr sub_ws = static_cast<HostPtr>(surf_host_resource_priv(host_PM));
/* Currently, we assume a VM has no storage. */
p_storage = NULL;
// //// CPU RELATED STUFF ////
// Roughly, create a vcpu resource by using the values of the sub_cpu one.
- CpuCas01Ptr sub_cpu = static_cast<CpuCas01Ptr>(surf_cpu_resource_priv(ind_phys_workstation));
+ CpuCas01Ptr sub_cpu = static_cast<CpuCas01Ptr>(surf_cpu_resource_priv(host_PM));
/* We can assume one core and cas01 cpu for the first step.
* Do xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu) if you get the resource. */
NULL); // host->properties,
/* We create cpu_action corresponding to a VM process on the host operating system. */
- /* FIXME: TODO: we have to peridocally input GUESTOS_NOISE to the system? how ? */
- // vm_ws->cpu_action = surf_cpu_model_pm->extension.cpu.execute(ind_phys_workstation, GUESTOS_NOISE);
+ /* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
+ // vm_ws->cpu_action = surf_cpu_model_pm->extension.cpu.execute(host_PM, GUESTOS_NOISE);
p_action = sub_cpu->execute(0);
- /* The SURF_WKS_LEVEL at host_lib saves workstation_CLM03 objects. Please
- * note workstation_VM2013 objects, inheriting the workstation_CLM03
- * structure, are also saved there.
- *
- * If you want to get a workstation_VM2013 object from host_lib, see
- * ws->generic_resouce.model->type first. If it is
- * SURF_MODEL_TYPE_VM_WORKSTATION, you can cast ws to vm_ws. */
XBT_INFO("Create VM(%s)@PM(%s) with %ld mounted disks", name, sub_ws->getName(), xbt_dynar_length(p_storage));
}
* A physical host does not disappear in the current SimGrid code, but a VM may
* disappear during a simulation.
*/
-WorkstationVMHL13::~WorkstationVMHL13()
+VMHL13::~VMHL13()
{
/* Free the cpu_action of the VM. */
_XBT_GNUC_UNUSED int ret = p_action->unref();
xbt_assert(ret == 1, "Bug: some resource still remains");
}
-void WorkstationVMHL13::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {
+void VMHL13::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
}
-bool WorkstationVMHL13::isUsed() {
+bool VMHL13::isUsed() {
THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */
return -1;
}
-e_surf_resource_state_t WorkstationVMHL13::getState()
+e_surf_resource_state_t VMHL13::getState()
{
return (e_surf_resource_state_t) p_currentState;
}
-void WorkstationVMHL13::setState(e_surf_resource_state_t state)
+void VMHL13::setState(e_surf_resource_state_t state)
{
p_currentState = (e_surf_vm_state_t) state;
}
-void WorkstationVMHL13::suspend()
+void VMHL13::suspend()
{
p_action->suspend();
p_currentState = SURF_VM_STATE_SUSPENDED;
}
-void WorkstationVMHL13::resume()
+void VMHL13::resume()
{
p_action->resume();
p_currentState = SURF_VM_STATE_RUNNING;
}
-void WorkstationVMHL13::save()
+void VMHL13::save()
{
p_currentState = SURF_VM_STATE_SAVING;
p_currentState = SURF_VM_STATE_SAVED;
}
-void WorkstationVMHL13::restore()
+void VMHL13::restore()
{
p_currentState = SURF_VM_STATE_RESTORING;
/*
* Update the physical host of the given VM
*/
-void WorkstationVMHL13::migrate(surf_resource_t ind_dst_pm)
+void VMHL13::migrate(surf_resource_t ind_dst_pm)
{
- /* ind_phys_workstation equals to smx_host_t */
- WorkstationPtr ws_dst = static_cast<WorkstationPtr>(surf_workstation_resource_priv(ind_dst_pm));
+ /* ind_dst_pm equals to smx_host_t */
+ HostPtr ws_dst = static_cast<HostPtr>(surf_host_resource_priv(ind_dst_pm));
const char *vm_name = getName();
const char *pm_name_src = p_subWs->getName();
const char *pm_name_dst = ws_dst->getName();
delete old_net_elm;
}
-void WorkstationVMHL13::setBound(double bound){
+void VMHL13::setBound(double bound){
p_action->setBound(bound);
}
-void WorkstationVMHL13::setAffinity(CpuPtr cpu, unsigned long mask){
+void VMHL13::setAffinity(CpuPtr cpu, unsigned long mask){
p_action->setAffinity(cpu, mask);
}
* A surf level object will be useless in the upper layer. Returning the
* dict_elm of the host.
**/
-surf_resource_t WorkstationVMHL13::getPm()
+surf_resource_t VMHL13::getPm()
{
return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
}
/* Adding a task to a VM updates the VCPU task on its physical machine. */
-ActionPtr WorkstationVMHL13::execute(double size)
+ActionPtr VMHL13::execute(double size)
{
double old_cost = p_action->getCost();
double new_cost = old_cost + size;
return p_cpu->execute(size);
}
-ActionPtr WorkstationVMHL13::sleep(double duration) {
+ActionPtr VMHL13::sleep(double duration) {
return p_cpu->sleep(duration);
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "vm_workstation_interface.hpp"
-#include "workstation_clm03.hpp"
+#include "host_clm03.hpp"
+#include "vm_interface.hpp"
-#ifndef VM_WORKSTATION_HPP_
-#define VM_WORKSTATION_HPP_
+#ifndef SURF_VM_HPP_
+#define SURF_VM_HPP_
#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
// It corresponds to the cost of a VM running no tasks.
* Classes *
***********/
-class WorkstationVMHL13Model;
-typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
+class VMHL13Model;
+typedef VMHL13Model *VMHL13ModelPtr;
-class WorkstationVMHL13;
-typedef WorkstationVMHL13 *WorkstationVMHL13Ptr;
+class VMHL13;
+typedef VMHL13 *VMHL13Ptr;
/*********
* Model *
*********/
-class WorkstationVMHL13Model : public WorkstationVMModel {
+class VMHL13Model : public VMModel {
public:
- WorkstationVMHL13Model();
- ~WorkstationVMHL13Model(){};
+ VMHL13Model();
+ ~VMHL13Model(){};
- WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation);
+ VMPtr createVM(const char *name, surf_resource_t host_PM);
double shareResources(double now);
void adjustWeightOfDummyCpuActions() {};
- ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
- ActionPtr executeParallelTask(int workstation_nb,
- void **workstation_list,
+ ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
+ ActionPtr executeParallelTask(int host_nb,
+ void **host_list,
double *flops_amount,
double *bytes_amount,
double rate);
* Resource *
************/
-class WorkstationVMHL13 : public WorkstationVM {
+class VMHL13 : public VM {
public:
- WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
- ~WorkstationVMHL13();
+ VMHL13(VMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t host_PM);
+ ~VMHL13();
void suspend();
void resume();
* Action *
**********/
-#endif /* VM_WORKSTATION_HPP_ */
+#endif /* SURF_VM_HPP_ */
--- /dev/null
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "cpu_cas01.hpp"
+#include "vm_interface.hpp"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm, surf,
+ "Logging specific to the SURF VM module");
+
+VMModelPtr surf_vm_model = NULL;
+
+/*************
+ * Callbacks *
+ *************/
+
+surf_callback(void, VMPtr) VMCreatedCallbacks;
+surf_callback(void, VMPtr) VMDestructedCallbacks;
+surf_callback(void, VMPtr) VMStateChangedCallbacks;
+
+/*********
+ * Model *
+ *********/
+
+VMModel::VMModel() : HostModel("Virtual Machine") {
+ p_cpuModel = surf_cpu_model_vm;
+}
+
+VMModel::vm_list_t VMModel::ws_vms;
+
+/************
+ * Resource *
+ ************/
+
+VM::VM(ModelPtr model, const char *name, xbt_dict_t props,
+ RoutingEdgePtr netElm, CpuPtr cpu)
+: Host(model, name, props, NULL, netElm, cpu)
+{
+ VMModel::ws_vms.push_back(*this);
+ surf_callback_emit(VMCreatedCallbacks, this);
+}
+
+/*
+ * A physical host does not disapper in the current SimGrid code, but a VM may
+ * disapper during a simulation.
+ */
+VM::~VM()
+{
+ surf_callback_emit(VMDestructedCallbacks, this);
+ VMModel::ws_vms.erase(VMModel::
+ vm_list_t::s_iterator_to(*this));
+}
+
+void VM::setState(e_surf_resource_state_t state){
+ Resource::setState(state);
+ surf_callback_emit(VMStateChangedCallbacks, this);
+}
+
+/*
+ * A surf level object will be useless in the upper layer. Returing the
+ * dict_elm of the host.
+ **/
+surf_resource_t VM::getPm()
+{
+ return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
+}
+
+/**********
+ * Action *
+ **********/
+
+//FIME:: handle action cancel
+
--- /dev/null
+/* Copyright (c) 2004-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "host_interface.hpp"
+
+#ifndef VM_INTERFACE_HPP_
+#define VM_INTERFACE_HPP_
+
+#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
+ // It corresponds to the cost of a VM running no tasks.
+
+/***********
+ * Classes *
+ ***********/
+
+class VMModel;
+typedef VMModel *VMModelPtr;
+
+class VM;
+typedef VM *VMPtr;
+
+class VMLmm;
+typedef VMLmm *VMLmmPtr;
+
+/*************
+ * Callbacks *
+ *************/
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM creation *
+ * @details Callback functions have the following signature: `void(VMPtr)`
+ */
+extern surf_callback(void, VMPtr) VMCreatedCallbacks;
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM destruction *
+ * @details Callback functions have the following signature: `void(VMPtr)`
+ */
+extern surf_callback(void, VMPtr) VMDestructedCallbacks;
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM State changed *
+ * @details Callback functions have the following signature: `void(VMActionPtr)`
+ */
+extern surf_callback(void, VMPtr) VMStateChangedCallbacks;
+
+/*********
+ * Model *
+ *********/
+/** @ingroup SURF_vm_interface
+ * @brief SURF VM model interface class
+ * @details A model is an object which handle the interactions between its Resources and its Actions
+ */
+class VMModel : public HostModel {
+public:
+ VMModel();
+ ~VMModel(){};
+
+ HostPtr createHost(const char *name){DIE_IMPOSSIBLE;}
+
+ /**
+ * @brief Create a new VM
+ *
+ * @param name The name of the new VM
+ * @param host_PM The real machine hosting the VM
+ *
+ */
+ virtual VMPtr createVM(const char *name, surf_resource_t host_PM)=0;
+ void adjustWeightOfDummyCpuActions() {};
+
+ typedef boost::intrusive::list<VM,
+ boost::intrusive::constant_time_size<false> >
+ vm_list_t;
+ static vm_list_t ws_vms;
+};
+
+/************
+ * Resource *
+ ************/
+
+/** @ingroup SURF_vm_interface
+ * @brief SURF VM interface class
+ * @details A VM represent a virtual machine
+ */
+class VM : public Host,
+ public boost::intrusive::list_base_hook<> {
+public:
+ /**
+ * @brief VM constructor
+ *
+ * @param model VMModel associated to this VM
+ * @param name The name of the VM
+ * @param props Dictionary of properties associated to this VM
+ * @param netElm The RoutingEdge associated to this VM
+ * @param cpu The Cpu associated to this VM
+ */
+ VM(ModelPtr model, const char *name, xbt_dict_t props,
+ RoutingEdgePtr netElm, CpuPtr cpu);
+
+ /**
+ * @brief WdorkstationVM destructor
+ */
+ ~VM();
+
+ void setState(e_surf_resource_state_t state);
+
+ /**
+ * @brief Suspend the VM
+ */
+ virtual void suspend()=0;
+
+ /**
+ * @brief Resume the VM
+ */
+ virtual void resume()=0;
+
+ /**
+ * @brief Save the VM (Not yet implemented)
+ */
+ virtual void save()=0;
+
+ /**
+ * @brief Restore the VM (Not yet implemented)
+ */
+ virtual void restore()=0;
+
+ /**
+ * @brief Migrate the VM to the destination host
+ *
+ * @param ind_vm_ws_dest The destination host
+ */
+ virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
+
+ /**
+ * @brief Get the physical machine hosting the VM
+ * @return The physical machine hosting the VM
+ */
+ virtual surf_resource_t getPm()=0;
+
+ virtual void setBound(double bound)=0;
+ virtual void setAffinity(CpuPtr cpu, unsigned long mask)=0;
+
+ /* The vm object of the lower layer */
+ CpuActionPtr p_action;
+ HostPtr p_subWs; // Pointer to the ''host'' OS
+ e_surf_vm_state_t p_currentState;
+};
+
+/**********
+ * Action *
+ **********/
+
+#endif /* VM_INTERFACE_HPP_ */
+++ /dev/null
-/* Copyright (c) 2013-2014. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "vm_workstation_interface.hpp"
-#include "cpu_cas01.hpp"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm_workstation, surf,
- "Logging specific to the SURF VM workstation module");
-
-WorkstationVMModelPtr surf_vm_workstation_model = NULL;
-
-/*************
- * Callbacks *
- *************/
-
-surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks;
-surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks;
-surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks;
-
-/*********
- * Model *
- *********/
-
-WorkstationVMModel::WorkstationVMModel() : WorkstationModel("Virtual Workstation") {
- p_cpuModel = surf_cpu_model_vm;
-}
-
-WorkstationVMModel::vm_list_t WorkstationVMModel::ws_vms;
-
-/************
- * Resource *
- ************/
-
-WorkstationVM::WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
- RoutingEdgePtr netElm, CpuPtr cpu)
-: Workstation(model, name, props, NULL, netElm, cpu)
-{
- WorkstationVMModel::ws_vms.push_back(*this);
- surf_callback_emit(workstationVMCreatedCallbacks, this);
-}
-
-/*
- * A physical host does not disapper in the current SimGrid code, but a VM may
- * disapper during a simulation.
- */
-WorkstationVM::~WorkstationVM()
-{
- surf_callback_emit(workstationVMDestructedCallbacks, this);
- WorkstationVMModel::ws_vms.erase(WorkstationVMModel::
- vm_list_t::s_iterator_to(*this));
-}
-
-void WorkstationVM::setState(e_surf_resource_state_t state){
- Resource::setState(state);
- surf_callback_emit(workstationVMStateChangedCallbacks, this);
-}
-
-/*
- * A surf level object will be useless in the upper layer. Returing the
- * dict_elm of the host.
- **/
-surf_resource_t WorkstationVM::getPm()
-{
- return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
-}
-
-/**********
- * Action *
- **********/
-
-//FIME:: handle action cancel
-
+++ /dev/null
-/* Copyright (c) 2004-2014. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "workstation_interface.hpp"
-
-#ifndef VM_WORKSTATION_INTERFACE_HPP_
-#define VM_WORKSTATION_INTERFACE_HPP_
-
-#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
- // It corresponds to the cost of a VM running no tasks.
-
-/***********
- * Classes *
- ***********/
-
-class WorkstationVMModel;
-typedef WorkstationVMModel *WorkstationVMModelPtr;
-
-class WorkstationVM;
-typedef WorkstationVM *WorkstationVMPtr;
-
-class WorkstationVMLmm;
-typedef WorkstationVMLmm *WorkstationVMLmmPtr;
-
-/*************
- * Callbacks *
- *************/
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM creation *
- * @details Callback functions have the following signature: `void(WorkstationVMPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks;
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM destruction *
- * @details Callback functions have the following signature: `void(WorkstationVMPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks;
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM State changed *
- * @details Callback functions have the following signature: `void(WorkstationVMActionPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks;
-
-/*********
- * Model *
- *********/
-/** @ingroup SURF_vm_workstation_interface
- * @brief SURF workstation VM model interface class
- * @details A model is an object which handle the interactions between its Resources and its Actions
- */
-class WorkstationVMModel : public WorkstationModel {
-public:
- /**
- * @brief WorkstationVMModel consrtuctor
- */
- WorkstationVMModel();
-
- /**
- * @brief WorkstationVMModel consrtuctor
- */
- ~WorkstationVMModel(){};
-
- WorkstationPtr createWorkstation(const char *name){DIE_IMPOSSIBLE;}
-
- /**
- * @brief Create a new WorkstationVM
- *
- * @param name The name of the new WorkstationVM
- * @param ind_phys_workstation The workstation hosting the VM
- *
- */
- virtual WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation)=0;
- void adjustWeightOfDummyCpuActions() {};
-
- typedef boost::intrusive::list<WorkstationVM,
- boost::intrusive::constant_time_size<false> >
- vm_list_t;
- static vm_list_t ws_vms;
-};
-
-/************
- * Resource *
- ************/
-
-/** @ingroup SURF_vm_workstation_interface
- * @brief SURF workstation VM interface class
- * @details A workstation VM represent an virtual machine
- */
-class WorkstationVM : public Workstation,
- public boost::intrusive::list_base_hook<> {
-public:
- /**
- * @brief WorkstationVM consrtructor
- *
- * @param model WorkstationModel associated to this Workstation
- * @param name The name of the Workstation
- * @param props Dictionary of properties associated to this Workstation
- * @param netElm The RoutingEdge associated to this Workstation
- * @param cpu The Cpu associated to this Workstation
- */
- WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
- RoutingEdgePtr netElm, CpuPtr cpu);
-
- /**
- * @brief WdorkstationVM destructor
- */
- ~WorkstationVM();
-
- void setState(e_surf_resource_state_t state);
-
- /**
- * @brief Suspend the VM
- */
- virtual void suspend()=0;
-
- /**
- * @brief Resume the VM
- */
- virtual void resume()=0;
-
- /**
- * @brief Save the VM (Not yet implemented)
- */
- virtual void save()=0;
-
- /**
- * @brief Restore the VM (Not yet implemented)
- */
- virtual void restore()=0;
-
- /**
- * @brief Migrate the VM to the destination host
- *
- * @param ind_vm_ws_dest The destination host
- */
- virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
-
- /**
- * @brief Get the physical machine hosting the VM
- * @return The physical machine hosting the VM
- */
- virtual surf_resource_t getPm()=0;
-
- virtual void setBound(double bound)=0;
- virtual void setAffinity(CpuPtr cpu, unsigned long mask)=0;
-
- /* The workstation object of the lower layer */
- CpuActionPtr p_action;
- WorkstationPtr p_subWs; // Pointer to the ''host'' OS
- e_surf_vm_state_t p_currentState;
-};
-
-/**********
- * Action *
- **********/
-
-#endif /* VM_WORKSTATION_INTERFACE_HPP_ */
XBT_LOG_CONNECT(surf_route_vivaldi);
XBT_LOG_CONNECT(surf_storage);
XBT_LOG_CONNECT(surf_trace);
- XBT_LOG_CONNECT(surf_vm_workstation);
- XBT_LOG_CONNECT(surf_workstation);
+ XBT_LOG_CONNECT(surf_vm);
+ XBT_LOG_CONNECT(surf_host);
#endif /* simgrid_EXPORTS */
}
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
+> [0.000000] [surf_config/INFO] Switching host model to compound since you changed the network and/or cpu model(s)
> Walltime = 0.37183
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
$ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_processes_d.xml 6 --log=no_loc --log=msg.thresh:error --log=surf_maxmin.thresh:error
> [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm0)@PM(Jupiter) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm0)@PM(Jupiter) with 0 mounted disks
> [vm0:process_daemon:(2) 0.000000] [msg_test/INFO] Start daemon on vm0 (76296000.000000)
> [vm0:process_daemon:(2) 0.000000] [msg_test/INFO] Execute deamon
> [Jupiter:process_daemonJUPI:(3) 0.000000] [msg_test/INFO] Start daemon on Jupiter (76296000.000000)
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
platform_file = argv[1];
application_file = argv[2];
- /* MSG_config("workstation/model","KCCFLN05"); */
{ /* Simulation setting */
MSG_create_environment(platform_file);
}
p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c0s1.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_0_step_1
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c0s1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c0s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
> [ 0.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
p Testing trace integration using trace_B.txt and test-hbp1-c0s1-c0s2.xml, test_trace:start == trace_cycle_0_step_1, test_trace:end < trace_cycle_0_step_2
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c0s2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c0s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
> [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s0.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_0
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
> [ 20.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c1s0.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_1_step_0
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c1s0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
> [ 0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
> [ 0.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s1.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_1
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
> [ 0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
>&n