Changeset 3bd250


Ignore:
Timestamp:
Apr 25, 2012, 7:21:42 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
b2154a3
Parents:
d7de94
Message:

vmg: Fixed a bug where idling processes could cause a segfault.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1747 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/level/level_operator_cs.cpp

    rd7de94 r3bd250  
    3939  const Stencil& op = OperatorRestrict();
    4040
    41   const Index begin_f_global = rhs_f.Global().LocalBegin() + rhs_f.Global().LocalBegin() % 2;
    42   const Index end_f_global = rhs_f.Global().LocalEnd() - (rhs_f.Global().LocalEnd() - 1) % 2;
    43 
    44   assert(begin_f_global % 2 == 0);
    45   assert(end_f_global % 2 == 1);
     41  const Index begin_f_global = rhs_f.Global().LocalSize().Product() > 0
     42    ? rhs_f.Global().LocalBegin() + rhs_f.Global().LocalBegin() % 2
     43    : rhs_f.Global().LocalBegin();
     44  const Index end_f_global = rhs_f.Global().LocalSize().Product() > 0
     45    ? rhs_f.Global().LocalEnd() - (rhs_f.Global().LocalEnd() - 1) % 2
     46    : rhs_f.Global().LocalBegin();
    4647
    4748  Index begin_f = begin_f_global - rhs_f.Global().LocalBegin() + rhs_f.Local().Begin();
Note: See TracChangeset for help on using the changeset viewer.