CFD-GO / TCLB

TCLB - Templated MPI+CUDA/CPU Lattice Boltzmann code
https://tclb.io
GNU General Public License v3.0
180 stars 71 forks source link

Building and running on macOS #441

Open shkodm opened 1 year ago

shkodm commented 1 year ago

I fixed building TCLB on macOS. Main issues are related to sed, and find being non compatible between macOS and Linux's, so some options had to be adjusted.

The error is something like:

Error in `.rowNamesDF<-`(x, value = value) :
  duplicate 'row.names' are not allowed

The commit with fixed build (don't think the changes are needed in the main repo yet, because not many people are using it on Mac probably, but wanted to have it somewhere for people in the future) - https://github.com/shkodm/TCLB/commit/71ab67f12d07d7c9d6840402adb3054d62e3fc37

Apart from this everything worked smoothly, installed most of dependencies via homebrew via install.sh script.

With mpirun -np 4 CLB/d2q9/main flow/2d/karman.xml I get (on M2 chip)

  ]    ---- : Adding VTK to the solver hands
  1 [  ]    ---- : Setting action Solve at 10000.000000 iterations
75  [  ]    118.9 MLBUps     17.36 GB/s [                    ]  0s^M[  ]    ---- :    121.9 MLBUps     17.80 GB/s [====================]
  1 [  ]    ---- :     1000 it writing vtk
  2 [  ]    ---- :    120.9 MLBUps     17.65 GB/s [====================]
  3 [  ]    ---- :     2000 it writing vtk

around 120 MLBUps this is quite good actually. On the QuadroP200 I get 2000MLBUps

shkodm commented 1 year ago

Also remembered, that there was a problem with relative-to in rtemplate. I will fix it soon

shkodm commented 9 months ago

Should be resoled after https://github.com/llaniewski/rtemplate/pull/9 and https://github.com/CFD-GO/TCLB/pull/493 are merged.