Changeset 153:81888f75e4f8

Show
Ignore:
Timestamp:
03/15/2012 04:02:13 AM (14 months ago)
Author:
Andreas Schaefer <gentryx@…>
Branch:
default
Message:
Location:
src/parallelization
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • src/parallelization/hiparsimulator.h

    r148 r153  
    9494        const Region<DIM> **validRegion)  
    9595    { 
    96         *grid = &updateGroup->grid(); 
    97         // fixme: we can't even guarantee this part 
    98         *validRegion = &partitionManager.ownRegion(); 
     96        *grid = currentGrid; 
     97        *validRegion = currentValidRegion; 
     98    } 
     99 
     100    /** 
     101     * Since HiParSimulator doesn't store any Grid fragments on its 
     102     * own, external objects need to configure the pointers. 
     103     */ 
     104    virtual void setGridFragment( 
     105        const GridType *grid, 
     106        const Region<DIM> *validRegion) 
     107    { 
     108        currentGrid = grid; 
     109        currentValidRegion = validRegion; 
    99110    } 
    100111 
     
    143154    typename UpdateGroupType::PatchAccepterVec writerAdaptersGhost; 
    144155    typename UpdateGroupType::PatchAccepterVec writerAdaptersInner; 
     156    const GridType *currentGrid; 
     157    const Region<DIM> *currentValidRegion; 
    145158 
    146159    SuperVector<long> initialWeights(const long& items, const long& size) const 
  • src/parallelization/hiparsimulator/parallelwriteradapter.h

    r146 r153  
    4545        this->requestedNanoSteps.erase_min(); 
    4646 
    47         // fixme: set simulator up to link to correct grid/validRegion 
     47        sim->setGridFragment(&grid, &validRegion); 
     48 
    4849        if (nanoStep == firstNanoStep) { 
    4950            writer->initialized(); 
     
    5556            } 
    5657        } 
     58 
     59        // delete the pointers from the Simulator to prevent accesses 
     60        // to stale pointers: 
     61        sim->setGridFragment(0, 0); 
    5762 
    5863        reload(); 
  • src/parallelization/hiparsimulator/patchlink.h

    r152 r153  
    113113            this->mpiLayer.send( 
    114114                &this->buffer[0], dest, this->buffer.size(), this->tag, cellMPIDatatype); 
     115 
    115116            long nextNanoStep = this->requestedNanoSteps.min() + this->stride; 
    116117            if ((this->lastNanoStep == ENDLESS) ||  
     
    159160            long nextNanoStep = this->storedNanoSteps.min() + this->stride; 
    160161            if ((this->lastNanoStep == ENDLESS) ||  
    161                 (nextNanoStep < this->lastNanoStep)) 
     162                (nextNanoStep < this->lastNanoStep)) { 
    162163                recv(nextNanoStep); 
    163             // fixme: extract method for this 
     164            } 
    164165            this->storedNanoSteps.erase_min(); 
    165166        } 
  • src/parallelization/hiparsimulator/test/parallel_mpi_4/vanillasteppertest.h

    r152 r153  
    160160 
    161161        int tag = 4711; 
    162  
    163         // fixme: once working, use this code to reimplement the 
    164         // update group 
    165162 
    166163        SuperVector<MyPatchProviderPtr> providers; 
     
    224221        // let's go 
    225222        checkInnerSet(0, 0); 
    226         //fixme: check rim, too 
     223 
    227224        stepper->update(1); 
    228225        checkInnerSet(1, 1); 
  • src/parallelization/test/parallel_mpi_1/hiparsimulatortest.h

    r148 r153  
    5252 
    5353        s->step(); 
    54         s->step(); 
    55         s->step(); 
     54        // s->step(); 
     55        // s->step(); 
     56        std::cout << "-----------got events : " << mockWriter->events() << "\n"; 
    5657    } 
    5758 
     
    5960    { 
    6061    //     std::cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"; 
    61         s->run(); 
     62        // s->run(); 
    6263        std::cout << "-----------got events : " << mockWriter->events() << "\n"; 
    6364    }