DanRRight

Joined: 10 Mar 2008 Posts: 2777 Location: South Pole, Antarctica
|
Posted: Sat Jul 30, 2022 9:10 am Post subject: Never use C/C++ for scientific research |
|
|
Want the funny story on one glorified C/C++ failure ? There exist scientific visualization tool called Visit developed over decades. It shows you the results of large scale 3D simulations. I tried recently couple 3D PIC open source Fortran based codes, both after finishing their runs use C/C++ Visit. We had our own ones where we used 3D visualization made entirely in FTN95. Great about FTN95 is that it supports OpenGL natively and all is done in Fortran. The speed and simplicity of it is just amazing, enough for most of tasks. Obviously for 3D, if your tasks run for days you do not need infinitely fast postprocessing tool to create the image.
I spend last few days trying to visualize the files with Visit. Installed it as an executable on Windows machine. But it did not go, showing me nothing, not even its own demo files.
Then i got to Linux and cloned GitHub repo of it. Tried to compile - failed. Tried this, tried that, this, that, here, there, pushing this, pulling that, whole day - no success. Started reading their documentation a bit (you all probably know i never RTFM). Found that they do not have working build for the latest Linux Ubuntu which is already couple years old. Then i found in discussion forum they have problem with some library, and they use C/C++, Python, HDF5, Silo, HTML, Java, CMake for it. I was downloading, installing, downloading, updating, upgrading, whole day....no end. And the compilation process was spewing a hell lot of sh!t on your screen, you are just bombed, and bombed, and bombed, and bombed and bombed by the CMake process. This is one of main reasons why i hate multilanguage programming.
But what totally made my day today is the following paragraph from their documentation:
"When the "build_visit" script is run by default it will build the code using a single core. This may take a half a day or longer. Modern computers have anywhere from 4 to 80 cores at the time of the writing of this chapter. You can speed up the build process by specify that build_visit use more cores. If you are using a shared resource you probably shouldn’t use all the cores in consideration of other users of the system." Hahahaha...half a day for compilation....and do not use all your cores or you will put all your co-workers to bite the dust
This is the total halt of the development. Like wrote to the top officials one German commander in 1941 near Moscow: "My General, i have with the sorrow to report you that my tank army came to its final end..."
Yes, forgot to mention that compilation of our own FTN95-based visualization tool which is doing essentially the same things as Visit takes 5 seconds and only 2 short lines in batch file + 1 for linking.
The more i use Fortran the more i find that anyone who uses C/C++ for scientific research have to be simply avoided at any cost. It will take 3-10x more human resources to support the development and the problems with it will never end becoming only worse and worse |
|