Quantcast

Repast HPC with OpenMpi

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Repast HPC with OpenMpi

Bilge Kaan Gorur
Hello all,

I have a problem with running Repast HPC in a Slurm environment. I am  
able to initialize my simulation on my laptop properly. However, I  
cannot do the same thing in Slurm. The problem occurs when I try to  
get ranks of the neighbor processes. So, I inspected Repast HPC code  
and realized MPI_Cart_shift that is in CartTopology::createNeighbors  
function works differently in my laptop and Slurm. In Slurm, it  
returns some ridicolous numbers instead of correct neighbors. By the  
way OpenMPI version 1.10 is installed in Slurm. Have you ever  
encountered this kind of problem?

Thanks in advance.


------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Repast HPC with OpenMpi

srcnick
I’m not sure why this would be the case. Its probably worth asking the cluster administrators if they are aware of the issue.

Nick

> On Aug 31, 2016, at 12:11 PM, Bilge Kaan Gorur <[hidden email]> wrote:
>
> Hello all,
>
> I have a problem with running Repast HPC in a Slurm environment. I am  
> able to initialize my simulation on my laptop properly. However, I  
> cannot do the same thing in Slurm. The problem occurs when I try to  
> get ranks of the neighbor processes. So, I inspected Repast HPC code  
> and realized MPI_Cart_shift that is in CartTopology::createNeighbors  
> function works differently in my laptop and Slurm. In Slurm, it  
> returns some ridicolous numbers instead of correct neighbors. By the  
> way OpenMPI version 1.10 is installed in Slurm. Have you ever  
> encountered this kind of problem?
>
> Thanks in advance.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Repast HPC with OpenMpi

Bilge Kaan Gorur
Hello again,

The ridicilous numbers that I've mentioned are like 2143712992,  
11683864, etc (and sometimes 0). I guess these are some numbers in  
somewhere in memory. The error occurs when I try to run these code  
lines:

        set<int> * neighbors = new set<int>;
        grid->getNghs().getNeighborRanks(*neighbors); // I have created grid  
object before

        for(set<int>::iterator it = neighbors->begin(); it !=  
neighbors->end(); it++){
                sendingNeighbors.push_back(*it);
        }
        for(vector<int>::iterator it = sendingNeighbors.begin(); it !=  
sendingNeighbors.end(); it++){
                cout << *it << "\n";  // This line prints those weird numbers  
instead of rank numbers.
        }

I have also tried it on my laptop with OpenMPI 1.4.3 and encountered  
the same error. Therefore, I think the error is about OpenMPI, not  
Slurm. So, I had to change CartTopology::createNeighbors function by  
removing MPI_Cart_shift function as below and it worked. Now, it is  
enough for me.

void CartTopology::createNeighbors(Neighbors& nghs) {
        int eRank, wRank, nRank, sRank;
        int rank = RepastProcess::instance()->rank();
        vector<int> pCoordinates;
        getCoordinates(rank, pCoordinates);

        createNeighbor(nghs, getRank(pCoordinates, 0, 1), Neighbors::E);
        createNeighbor(nghs, getRank(pCoordinates, 0, -1), Neighbors::W);
        createNeighbor(nghs, getRank(pCoordinates, -1, 0), Neighbors::N);
        createNeighbor(nghs, getRank(pCoordinates, 1, 0), Neighbors::S);
        createNeighbor(nghs, getRank(pCoordinates, -1, -1), Neighbors::NW);
        createNeighbor(nghs, getRank(pCoordinates, -1, 1), Neighbors::NE);
        createNeighbor(nghs, getRank(pCoordinates, 1, -1), Neighbors::SW);
        createNeighbor(nghs, getRank(pCoordinates, 1, 1), Neighbors::SE);
}

Thank you very much.

Alinti Nick Collier <[hidden email]>

> I?m not sure why this would be the case. Its probably worth asking  
> the cluster administrators if they are aware of the issue.
>
> Nick
>
>> On Aug 31, 2016, at 12:11 PM, Bilge Kaan Gorur <[hidden email]> wrote:
>>
>> Hello all,
>>
>> I have a problem with running Repast HPC in a Slurm environment. I am
>> able to initialize my simulation on my laptop properly. However, I
>> cannot do the same thing in Slurm. The problem occurs when I try to
>> get ranks of the neighbor processes. So, I inspected Repast HPC code
>> and realized MPI_Cart_shift that is in CartTopology::createNeighbors
>> function works differently in my laptop and Slurm. In Slurm, it
>> returns some ridicolous numbers instead of correct neighbors. By the
>> way OpenMPI version 1.10 is installed in Slurm. Have you ever
>> encountered this kind of problem?
>>
>> Thanks in advance.
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Repast-interest mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/repast-interest
>
>




------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...