Skip to content

Reply To: Multi GPUs Calculation


Thank you for kind replying.

To your the quetion, no. I meant that “.cpp file” has no MPI API in examples/laminar/cavity3d/cavity3d.cpp but it can caluclate with MPI(when set MPI PARARELL MODE in Makefile ).And I mean that “MPI API” are like below (these are my previous a part of CFD codes written by fortran90 )
#ifdef MPI
call mpi_comm_rank(icomm_xi,mpi_local_rank_xi,ierror)
call mpi_comm_size(icomm_xi,mpi_local_size_xi,ierror)
call mpi_comm_rank(icomm_et,mpi_local_rank_et,ierror)
call mpi_comm_size(icomm_et,mpi_local_size_et,ierror)
call mpi_comm_rank(icomm_zt,mpi_local_rank_zt,ierror)
call mpi_comm_size(icomm_zt,mpi_local_size_zt,ierror)
mpi_local_rank_xi = 0
mpi_local_rank_et = 0
mpi_local_rank_zt = 0
In my understasnding, when I used MPI, I always needed MPI instraction directly in my codes. However in openLB, MPI instraction is witten in src/core/platform and src/communication and we can use it through “olb3D.h” and “olb3D.hh”. Is my understandig right?

For your answer ( 3) No, same as 1 and 2. From the user side there is no MPI-related code difference between CPU-only and (multi)GPU mode.), I am confused because there are MPI APIs written in examples/laminar/cavity3dBenchmark.
If I delete MPI API, will this codes work well with GPUs as well.

I would you like to give me some time to understand openLB codes deeply because I don’t understand the point yet.I want to understand this code structures. I think bebugger(LLDB or GDB) in VS code can show the move of codes. How do you do to understand code structure at openLB team?
And as to parallel computing, I notice that I am lack of my knowledge. are there any recomendation web pages, books or papers to understand basic parallel computing?