Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless code.
authorTom Cornebize <tom.cornebize@ensimag.grenoble-inp.fr>
Wed, 12 Apr 2017 21:19:41 +0000 (23:19 +0200)
committerTom Cornebize <tom.cornebize@ensimag.grenoble-inp.fr>
Wed, 12 Apr 2017 21:19:41 +0000 (23:19 +0200)
src/smpi/smpi_global.cpp
src/smpi/smpi_shared.cpp

index 3eb0216..fed7bca 100644 (file)
@@ -165,22 +165,9 @@ void smpi_comm_copy_buffer_callback(smx_activity_t synchro, void *buff, size_t b
     dst_private_blocks.clear();
     dst_private_blocks.push_back(std::make_pair(0, buff_size));
   }
-/*
-  fprintf(stderr, "size: 0x%x\n", buff_size);
-  fprintf(stderr, "src: ");
-  print(src_private_blocks);
-  fprintf(stderr, "src_offset = 0x%x\n", src_offset);
-  fprintf(stderr, "dst: ");
-  print(dst_private_blocks);
-  fprintf(stderr, "dst_offset = 0x%x\n", dst_offset);
-*/
   check_blocks(src_private_blocks, buff_size);
   check_blocks(dst_private_blocks, buff_size);
   auto private_blocks = merge_private_blocks(src_private_blocks, dst_private_blocks);
-/*
-  fprintf(stderr, "Private blocks: ");
-  print(private_blocks);
-*/
   check_blocks(private_blocks, buff_size);
   void* tmpbuff=buff;
   if((smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) && (static_cast<char*>(buff) >= smpi_start_data_exe)
index 39a3369..04c73f6 100644 (file)
@@ -244,12 +244,10 @@ void *smpi_shared_malloc_global__(size_t size, const char *file, int line, size_
     if(i_block < nb_shared_blocks-1)
       xbt_assert(stop_offset < shared_block_offsets[2*i_block+2],
               "stop_offset (%lu) should be lower than its successor start offset (%lu)", stop_offset, shared_block_offsets[2*i_block+2]);
-//    fprintf(stderr, "shared block 0x%x - 0x%x\n", start_offset, stop_offset);
     size_t start_block_offset = ALIGN_UP(start_offset, smpi_shared_malloc_blocksize);
     size_t stop_block_offset = ALIGN_DOWN(stop_offset, smpi_shared_malloc_blocksize);
     unsigned int i;
     for (i = start_block_offset / smpi_shared_malloc_blocksize; i < stop_block_offset / smpi_shared_malloc_blocksize; i++) {
-//      fprintf(stderr, "\tmmap:for  0x%x - 0x%x\n", i*smpi_shared_malloc_blocksize, smpi_shared_malloc_blocksize);
       void* pos = (void*)((unsigned long)mem + i * smpi_shared_malloc_blocksize);
       void* res = mmap(pos, smpi_shared_malloc_blocksize, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED | MAP_POPULATE,
                        smpi_shared_malloc_bogusfile, 0);
@@ -261,7 +259,6 @@ void *smpi_shared_malloc_global__(size_t size, const char *file, int line, size_
     size_t low_page_start_offset = ALIGN_UP(start_offset, PAGE_SIZE);
     size_t low_page_stop_offset = start_block_offset < ALIGN_DOWN(stop_offset, PAGE_SIZE) ? start_block_offset : ALIGN_DOWN(stop_offset, PAGE_SIZE);
     if(low_page_start_offset < low_page_stop_offset) {
-//      fprintf(stderr, "\tmmap:low  0x%x - 0x%x\n", low_page_start_offset, low_page_stop_offset-low_page_start_offset);
       void* pos = (void*)((unsigned long)mem + low_page_start_offset);
       void* res = mmap(pos, low_page_stop_offset-low_page_start_offset, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED | MAP_POPULATE,
                        smpi_shared_malloc_bogusfile, 0);
@@ -273,7 +270,6 @@ void *smpi_shared_malloc_global__(size_t size, const char *file, int line, size_
     if(low_page_stop_offset <= stop_block_offset) {
       size_t high_page_stop_offset = stop_offset == size ? size : ALIGN_DOWN(stop_offset, PAGE_SIZE);
       if(high_page_stop_offset > stop_block_offset) {
-//        fprintf(stderr, "\tmmap:high 0x%x - 0x%x\n", stop_block_offset, high_page_stop_offset-stop_block_offset);
         void* pos = (void*)((unsigned long)mem + stop_block_offset);
         void* res = mmap(pos, high_page_stop_offset-stop_block_offset, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED | MAP_POPULATE,
                          smpi_shared_malloc_bogusfile, 0);