Open Foadsf opened 4 years ago
I agree in large extent on the observations. However, all reorganization is not as easy and often falls down on resources. Also one main concern on reorganization is indeed the fact that are many branches that should be merged in the future. In ideal world branches would indeed be short-lived.
For me personally this does not always happen since some feature turns out to be take more work than anticipated and is left there there for longer times. However, there are also huge development branches related to novel developments in the size of a PhD thesis. Ideally these would also be frequently merged. However, I do have certain understanding why not to merge. These are often primarily research projects on the bleeding edge rather than software development projects. Still it would of course be good to merge at least devel to the feature branch frequently. I think that if there are conflicts many researchers rather opt not to mess with their branch and rather finish the next paper etc.
Also the cmake build system causes some inertia. If you reorganize the code tree you also need to address the cmake files ect. As an afterthought it would probably have been better to make the cmake very modular. This would also have helped in the compilation issues.
The bundled codes is also an issue. For example, Zoltan, Arpack and Lua have been edited and the code is not the same. At the time when they were included there were no readily available packages in all the platforms needed. At least there is a cmake, but there might be something else too. Lapack is only used if blas libraries are not present.
All this said, it would be easy to reorganize the stuff without dependencies. Take ElmerPost and ElmerParam out, maybe reorganize some directories etc. and rewrite the Readme's. I'm hesitant to put a lot of effort to fix things that are not really broken but just look bad from today's perspective. Of course, would there be a rapture in package management it would make sense to consider many of these choices.
I'll sum up my thoughts from a twitter thread.
After catching up on this discussion, here are my thoughts:
devel_refactor
and do this work on that, then post a notice on your main branch devel
far ahead of time that you're working on a new major refactor with potentially breaking changes. Subsequently, I'd have devel_refactor_directories
, devel_refactor_elmergui-dependency
, etc. I like prefixes. Much easier to follow.
I took a look at Elmer's codebase, and I should say, to be frank, it is not well organized at all. It seems more of a code dump written and patched over the years without proper organization. Many of the folders don't have README files and the ones which do, sometimes do not offer proper information about the content of that folder. Plain text has also been used instead of modern MarkUp languages such as MarkDown, AsciiDoc, or reStructuredText ...
I think the codebase should be split into several different repositories under the ElmerCSC GitHub organization:
Folders
ElmerGUI
,ElmerGUIlogger
, andElmerGUItester
should be in one repository called ElmerGUI and anything other than the GUI stuff should be scrapped out. I think there are some meshing modules sin the ElmerGUI which hasn't been integrated into the ElmerGrid for example, but I might be wrong on this.The folder
elmergrid
should obviously be an independent repo named ElmerGrid responsible for meshing the input geometries in different formats.The
fem
which is actually the ElmerSolver should be an independent repo called the same name. I think thefhutiter
folder containing the HUTIter iterative solver should also be placed in the same folder.The docker related files in
ci
anddocker
folders should be separated just like the HomeBrew which is independent already.There are two versions of MATC one in root
matc
and the other atpost/matc
where the later is specifically for MVS compilers. This seems bad practice to me. any module should be developed in one single place and we take care of the cross-platform ness in a canonical way.the
post
folder can be taken out and deprecated. It is important this package is maintained so the people who just start with the software can follow the existing tutorials. we can warn them whenever they open the app that they should use decent alternatives like ParaView instead.the
elmerice
folder should also be modularized. A great portion of Elmer users have no idea what it is and might never use it, though it is funding wise a big player in the project.I see that there are third party libraries such as
contrib/Zoltan
,umfpack
, and evencontrib/lua
embedded into the project. This is in my humble opinion again a bad practice. We should use a decent package manager like Conan, to list all the dependencies and if any of them are not available write Cmake or even bash/batch scripts to download and locate and link against them properly.we need to have a unified folder structure for any of the above repositories probably following some decent Cmake templates.
Other folders seem to be some snippets or macros for specific purposes (e.g., import from ANSYS) which could be other repose and partly added to he Elmer Documentation.
Another concerning fact is that we have so many parallel branches. This is not a good practice again as it is not clear who is doing what, where and why. Branches should be made for specific bug fixes, features, persons, and they must have a clear lifetime. They should not coexist in parallel and they must be merged to the master ASAP.
.gz
format or something.