A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright notices
[simgrid.git]
/
src
/
smpi
/
smpi_bench.c
diff --git
a/src/smpi/smpi_bench.c
b/src/smpi/smpi_bench.c
index
35971e2
..
82a4190
100644
(file)
--- a/
src/smpi/smpi_bench.c
+++ b/
src/smpi/smpi_bench.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007, 2009-201
4
. The SimGrid Team.
+/* Copyright (c) 2007, 2009-201
5
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-13,6
+13,7
@@
#include "surf/surf.h"
#include "simgrid/sg_config.h"
#include "simgrid/modelchecker.h"
#include "surf/surf.h"
#include "simgrid/sg_config.h"
#include "simgrid/modelchecker.h"
+#include "mc/mc_replay.h"
#ifndef WIN32
#include <sys/mman.h>
#ifndef WIN32
#include <sys/mman.h>
@@
-152,12
+153,10
@@
void smpi_execute_(double *duration)
void smpi_execute_flops(double flops) {
smx_synchro_t action;
void smpi_execute_flops(double flops) {
smx_synchro_t action;
- smx_host_t host;
- host = SIMIX_host_self();
XBT_DEBUG("Handle real computation time: %f flops", flops);
XBT_DEBUG("Handle real computation time: %f flops", flops);
- action = simcall_
host_execute("computation", host
, flops, 1, 0, 0);
+ action = simcall_
process_execute("computation"
, flops, 1, 0, 0);
simcall_set_category (action, TRACE_internal_smpi_get_category());
simcall_set_category (action, TRACE_internal_smpi_get_category());
- simcall_
host
_execution_wait(action);
+ simcall_
process
_execution_wait(action);
smpi_switch_data_segment(smpi_process_index());
}
smpi_switch_data_segment(smpi_process_index());
}
@@
-459,7
+458,7
@@
void *smpi_shared_malloc(size_t size, const char *file, int line)
{
void* mem;
if (sg_cfg_get_boolean("smpi/use_shared_malloc")){
{
void* mem;
if (sg_cfg_get_boolean("smpi/use_shared_malloc")){
- char *loc = bprintf("%zu_%s_%d", (size_t)getpid(), file, line);
+ char *loc = bprintf("
/
%zu_%s_%d", (size_t)getpid(), file, line);
int fd;
shared_data_t *data;
loc = smpi_shared_alloc_hash(loc); /* hash loc, in order to have something
int fd;
shared_data_t *data;
loc = smpi_shared_alloc_hash(loc); /* hash loc, in order to have something
@@
-620,7
+619,7
@@
void smpi_really_switch_data_segment(int dest) {
if(smpi_size_data_exe == 0)//no need to switch
return;
if(smpi_size_data_exe == 0)//no need to switch
return;
-#ifdef HAVE_
MMAP
+#ifdef HAVE_
PRIVATIZATION
int i;
if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
for (i=0; i< SIMIX_process_count(); i++){
int i;
if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
for (i=0; i< SIMIX_process_count(); i++){
@@
-723,7
+722,7
@@
void smpi_get_executable_global_size(){
void smpi_initialize_global_memory_segments(){
void smpi_initialize_global_memory_segments(){
-#ifndef HAVE_
MMAP
+#ifndef HAVE_
PRIVATIZATION
smpi_privatize_global_variables=0;
return;
#else
smpi_privatize_global_variables=0;
return;
#else
@@
-797,7
+796,7
@@
Ask the Internet about tutorials on how to increase the files limit such as: htt
void smpi_destroy_global_memory_segments(){
if (smpi_size_data_exe == 0)//no need to switch
return;
void smpi_destroy_global_memory_segments(){
if (smpi_size_data_exe == 0)//no need to switch
return;
-#ifdef HAVE_
MMAP
+#ifdef HAVE_
PRIVATIZATION
int i;
for (i=0; i< smpi_process_count(); i++){
if(munmap(smpi_privatisation_regions[i].address, smpi_size_data_exe) < 0) {
int i;
for (i=0; i< smpi_process_count(); i++){
if(munmap(smpi_privatisation_regions[i].address, smpi_size_data_exe) < 0) {