Skip to content

MPI failed with 12 cores

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4495
    Eric
    Participant

    Hi there,
    I met the same problem as Laurent in this thread:
    https://www.openlb.net/forum/topic/pb-runmpi/

    I am running the example code “example/laminar/cylinder2d” with MPI on Ubuntu 16.04. The machine has 16 processors in total.
    Everything works fine if I type:
    mpiexec -n 8 ./cylinder
    But if I specify 12 threads the program terminates at the setup step. The output file is : https://textuploader.com/11heq

    Same problem was found when running in a cluster with 10G memory.
    Could you please help me handle this problem?

    Best regards,
    Eric

    #4499
    mathias
    Keymaster

    We have fixed that minor bug and we will release the fix in the next release. Meanwhile, please run the code only with as much cores as you have physically available in your system!

    #4501
    Eric
    Participant

    Hi Mathias,

    When will the next release be available? If easier, could you please briefly explain how to fix the bug? I’m running some cases on the cluster but facing the same problem. With OpenMP (shared-memory) it is okay but MPI (distributed-memory) failed.

    Best regards,
    Eric

    #4530
    Adrian
    Keymaster

    This is the patch that will be included in the next release:

    diff –git a/src/functors/lattice/indicator/blockIndicatorF2D.hh b/src/functors/lattice/indicator/blockIndicatorF2D.hh
    index 8d01a6b03c8cea37d1d9ec05033d1bda4a616efa..f52a48a3ec4b2b966e6341e186d253fe73bc453c 100644
    — a/src/functors/lattice/indicator/blockIndicatorF2D.hh
    +++ b/src/functors/lattice/indicator/blockIndicatorF2D.hh
    @@ -124,7 +124,7 @@ bool BlockIndicatorMaterial2D<T>::operator() (bool output[], const int input[])
    // of BlockGeometry2D<T>::get to avoid resetting geometry
    // statistics:
    const BlockGeometryStructure2D<T>& blockGeometry = this->_blockGeometryStructure;
    – const int current = blockGeometry.get(input[0], input[1]);
    + const int current = blockGeometry.getMaterial(input[0], input[1]);
    output[0] = std::any_of(_materials.cbegin(),
    _materials.cend(),
    [current](int material) { return current == material; });
    diff –git a/src/functors/lattice/indicator/blockIndicatorF3D.hh b/src/functors/lattice/indicator/blockIndicatorF3D.hh
    index dcf2f5fc0e7658c487d671a02322eea51669378f..60c00322c4f79dacf7cf88ab0687ee746f65bfb8 100644
    — a/src/functors/lattice/indicator/blockIndicatorF3D.hh
    +++ b/src/functors/lattice/indicator/blockIndicatorF3D.hh
    @@ -136,7 +136,7 @@ bool BlockIndicatorMaterial3D<T>::operator() (bool output[], const int input[])
    // of BlockGeometry3D<T>::get to avoid resetting geometry
    // statistics:
    const BlockGeometryStructure3D<T>& blockGeometry = this->_blockGeometryStructure;
    – const int current = blockGeometry.get(input[0], input[1], input[2]);
    + const int current = blockGeometry.getMaterial(input[0], input[1], input[2]);
    output[0] = std::any_of(_materials.cbegin(),
    _materials.cend(),
    [current](int material) { return current == material; });

    i.e. change BlockGeometry(2,3)D::get calls to BlockGeometry(2,3)D::getMaterial for the block indicators.

    #4531
    Eric
    Participant

    Hi Adrian,

    Thank you for your reply! The program works totally fine now.

    Best regards,
    Eric

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.