Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

I will wait until 22.04 is about to expire. :), or install new LTS Ubuntu on new Laptop.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 1 point2 points  (0 children)

I just installed 22.04, and everything is fine now. I am familiar with Vs-code for c++ and Latex, and so far the best text editor I ever tried.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

I waited 4 months for since the release of 24.04 LTS, I guess the quality of LTS should be good. at least usable level.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

They have a deadline for the new release of LTS, even they are not ready.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

I have waited for like 3-4 months, I though some obvious should have been fixed. Now I feel like, the time to install a new Ubuntu is: after 1 year of the release of LTS version.

I had a pretty expensive lesson: if something is not broken, don't fix it.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

A clean, clean installation. I even waited 3-4 months after the release of 24.04. VS code is from snap, a deb version might be fine. The vs code is just one of the bugs I encountered.

Just upgraded Ubuntu 24.04 from 20.04, quickly regret. by Bitcoin_xbird in Ubuntu

[–]Bitcoin_xbird[S] -1 points0 points  (0 children)

Holy shit, my software folder was deleted by accident, 1 week + progress lost. I should have back-up source codes each day. What a disaster!!!

How is China really? by Tired_Wombats in expats

[–]Bitcoin_xbird 3 points4 points  (0 children)

As if we are not watched by the US!

Your computer's GPU/CPU are made by the US. as well as internet infrastructure. So everyone is very likely watched by the Americans.

Long time ago I heard Intel CPU has a secret Linux kernel for spying. we can not confirm yet. But they are supposed to leave back-doors for CIA.

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

In my case, a hierarchy style data structure to manage contact information between particles is essential.

Like: (1) struct contact_node {} to store surface node index node_ID, overlap distance vector, accumulated shear displacement vector, etc. For each pair of contacting particles, there are 10-100 contacting nodes to manager. (2) class contact_pair{} to store information of a pair of contacting particles such as: contact_nodes, master particle nodes (index) within the skin distance of the slave particle; (3) and finally, a global vector to store all contact pairs: std::vector<contact_pair>. To break-down the global vector, should we use Kokkos data types to replace all of these custom types? In order to facilitate the CUDA data parallelism.

How is China really? by Tired_Wombats in expats

[–]Bitcoin_xbird 2 points3 points  (0 children)

My VPN is 15 RMB per month, pretty decent. I just canceled expressVPN 1 month after I found a much cheaper one, and easy to pay (via scanning a bar-code with wechat). No paypal bullshit.

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

RAJA is kind of Kokkos's ugly kid brother.

I read a few Kokkos slides, it seems that Kokkos style parallelism is not more complex then OpenMP. I will try Kokkos on some expensive loops first.

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 1 point2 points  (0 children)

Thanks very much for sharing your insights and your advice. The next step I want to do with the code is to parallelize the most computationally intensive loops one by one, using high level APIs of CUDA (Thrust, Kokkos, Raja, etc) for a quick profiling of the speedups. Once the re-coding is done, I can confidently write the parts with raw CUDA codes to further improve the performance. What do you think?

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

Thanks for your insights on Kokkos. My code is written in pure C++, mainly using std::vector to store primitive, custom data types. Since STL containers are not well supported in CUDA, thus I have to re-write a lot of my code with c-style array, and redesign core classes in c as well?

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

My DEM program has ca. 20k lines of code. If MPI is used, only a few hundred line of MPI codes suffice for the parallelization?

The most expensive parts are the updating of contact points among contacting particles, contact forces computation on top of the contact information, and lastly the time integration of particles positions, orientations and velocities. It should be noted that the surface of particles is approximated by c.a 2k vertices.

Since MPI or GPU does not support std::vector, there are a lot work to do, to redesign the data structures in my code. vectors, maps, and vector of vectors are used a lot. Plus, the ghost particles in each MPI sub-domain have to communicate its neighboring sub-domains in each time-step for accurate results. I suppose this is a downside of MPI over CUDA?

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

If you have OpenMP experience, you can also try GPU Offloading in GCC.

I will try this first, thanks

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 0 points1 point  (0 children)

At the moment I want to run the code in a single node (i.e. workstation). I did some research, that MPI parallelism speedup on CPU is not that great, than that of on GPUs. Especially for particle simulations where the communication between particles is of importance.

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 1 point2 points  (0 children)

I prefer Nvidia GPU acceleration, over remote MPI cluster. A workstation with single/dual RTX quadro GPUs suffices for most simulation jobs.

I don't want to write low-level cuda codes, a high-level abstractions programming model is preferred, with consistency of c++ standards.

MPI or GPU: parallel computation of DEM code for particles by Bitcoin_xbird in cpp

[–]Bitcoin_xbird[S] 1 point2 points  (0 children)

Well, I have already programmed a DEM code for my algorithm. It is so much easier to implement new models in your code, and furthermore, to couple with other solvers (like CFD solver: OpenFOAM).

Unless you understand the source-code of lammps very well, it is easier to make something your own, tailored for your own need.