Mesh Partitioning Information

91 views
Skip to first unread message

Steven Brill

unread,
Jul 29, 2022, 2:59:58 PM7/29/22
to Nek5000
Hello,

Is there a way to output the mesh partition information when post processing results in Nek5000? I made some changes to some portions of the domain that increase the computational cost there, so depending on the partitioning strategy there could be load imbalance as a result. The second question is how would I go about modifying the partitioning algorithm if there is a problem, but I'm guessing that might be more trouble than it's worth for me at the moment.

Thank you,
Steven

YuHsiang Lan

unread,
Jul 29, 2022, 3:20:57 PM7/29/22
to Nek5000
Hi Steven,

You can dump the process id into field files to visualize which mpi ranks "own" that elements.

  real tmp(lx1,ly1,lz1,lelt)

  do e=1,nelv
    call cfill(tmp(1,1,1,e),real(nid),lx1*ly1*lz1)
  enddo
  call outpost(tmp,vy,vz,pr,t,'nid')

Actually, we do save this info into the binary field files "*0.f0*".
I think you could probably try to extract that in paraview.... Need to dig in on this.


As for your second question, you can try other algorithms.
Most of them are in PARRSB, which requires put PARRSB into PPLIST and remove the .map/ma2 files.

in .par file
  [MESH]
  partitioner = RSB
  partitioner = RCB
  partitioner = RCBRSB # default option
  partitioner = METIS

Or, set meshPartitioner in usrdat0 based on the following:
  c set partitioner options
        call finiparser_getString(c_out,'mesh:partitioner',ifnd)
        call capit(c_out,132)
        if(index(c_out,'RSB').eq.1) then
           meshPartitioner=1
        else if (index(c_out,'RCBRSB').eq.1) then
           meshPartitioner=3
        else if(index(c_out,'RCB').eq.1) then
           meshPartitioner=2
        else if (index(c_out,'METIS').eq.1) then
           meshPartitioner=4
        endif

You can also provide your own partitioning by setting DPROCMAP into PPLIST and re-order the elements yourself.
This will assign elements based on the global elements id.
For example, the first nelgv/np elements goes to rank 0.

Hope this helps,
Yu-Hsiang
--

Steven Brill

unread,
Jul 29, 2022, 4:14:41 PM7/29/22
to Nek5000
Yu-Hsiang,

This is very helpful. Thank you very much!

-Steven
Reply all
Reply to author
Forward
0 new messages