xbt_die("Aborting.");
}
// Simulate the benchmarked computation unless disabled via command-line argument
- if (sg_cfg_get_boolean("smpi/simulate_computation")) {
+ if (xbt_cfg_get_boolean("smpi/simulate_computation")) {
smpi_execute(xbt_os_timer_elapsed(timer));
}
void *smpi_shared_malloc(size_t size, const char *file, int line)
{
void* mem;
- if (sg_cfg_get_boolean("smpi/use_shared_malloc")){
+ if (xbt_cfg_get_boolean("smpi/use_shared_malloc")){
int fd;
smpi_source_location loc(file, line);
auto res = allocs.insert(std::make_pair(loc, shared_data_t()));
{
char loc[PTR_STRLEN];
- if (sg_cfg_get_boolean("smpi/use_shared_malloc")){
+ if (xbt_cfg_get_boolean("smpi/use_shared_malloc")){
snprintf(loc, PTR_STRLEN, "%p", ptr);
auto meta = allocs_metadata.find(ptr);
if (meta == allocs_metadata.end()) {
if(smpi_size_data_exe == 0)//no need to switch
return;
-#ifdef HAVE_PRIVATIZATION
+#if HAVE_PRIVATIZATION
if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
for (int i=0; i< smpi_process_count(); i++){
memcpy(smpi_privatisation_regions[i].address, TOPAGE(smpi_start_data_exe), smpi_size_data_exe);
void smpi_initialize_global_memory_segments(){
-#ifndef HAVE_PRIVATIZATION
+#if !HAVE_PRIVATIZATION
smpi_privatize_global_variables=0;
xbt_die("You are trying to use privatization on a system that does not support it. Don't.");
return;
void smpi_destroy_global_memory_segments(){
if (smpi_size_data_exe == 0)//no need to switch
return;
-#ifdef HAVE_PRIVATIZATION
+#if HAVE_PRIVATIZATION
int i;
for (i=0; i< smpi_process_count(); i++){
if(munmap(smpi_privatisation_regions[i].address, smpi_size_data_exe) < 0) {