trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.22k stars 568 forks source link

Analyze size of GenConfig #10874

Closed bartlettroscoe closed 2 years ago

bartlettroscoe commented 2 years ago

This issue is to analyze the size of the GenConfig code base and files for Trilinos and compare them to the ATDM Trilinos configuration to get a sense of the size of the two.

bartlettroscoe commented 2 years ago

CC: @rppawlo

First, set up the Trilinos and TriBITS repos:

$ cd Trilinos/

$ git checkout develop && git pull

$ ./packages/framework/get_dependencies.sh --son

$ ./packages/framework/get_dependencies.sh --srn

$ git clone git@github.com:TriBITSPub/TriBITS.git

$ gitdist-status 
---------------------------------------------------------------------------------
| ID | Repo Dir                         | Branch  | Tracking Branch | C | M | ? |
|----|----------------------------------|---------|-----------------|---|---|---|
|  0 | Trilinos (Base)                  | develop | github/develop  |   |   |   |
|  1 | packages/framework/GenConfig     | HEAD    |                 |   | 2 | 1 |
|  2 | packages/framework/son-ini-files | master  | origin/master   |   |   |   |
|  3 | packages/framework/srn-ini-files | master  | origin/master   |   |   |   |
|  4 | TriBITS                          | master  | github/master   |   |   |   |
---------------------------------------------------------------------------------

$ gitdist-repo-versions 
*** Base Git Repo: Trilinos
e061ffc182ade4040e0743cd9ff988d9f87ded5b [Fri Aug 12 08:52:45 2022 -0600] <trilinos@sandia.gov>
Merge Pull Request #10813 from bartlettroscoe/Trilinos/10774-install-run-demo
*** Git Repo: packages/framework/GenConfig
924a08af66f0a0573b5dd1128179731489339aec [Wed Jun 15 15:55:48 2022 +0000] <eharvey@sandia.gov>
Merge branch 'del-gen-symlinks' into 'master'
*** Git Repo: packages/framework/son-ini-files
6c30e48f45bf0d839f0fdbc143f4f3f69cae671a [Mon Jul 18 16:33:38 2022 +0000] <jfrye@sandia.gov>
Merge branch 'cuda-11-config' into 'master'
*** Git Repo: packages/framework/srn-ini-files
5b3dedb45f880fcd6e4389f60915216e587027bb [Mon Jul 18 15:39:40 2022 -0600] <srberna@sandia.gov>
Merge branch 'cuda-11-config' into 'master'
*** Git Repo: TriBITS
7fdb5a7c80dbe1ff3c106a4ab4e7e09ef780cda3 [Fri Aug 12 21:29:10 2022 -0600] <rabartl@sandia.gov>
Add language for GenConfig INI files
*** Git Repo: TriBITS/TriBITSDoc

Here is the size of the GenConfig implementation in Trilinos:

$ cd Trilinos/

$ ./TriBITS/common_tools/cloc/cloc-script-langauges.sh packages/framework/
...
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Python                          110           5572           8161          15465
GenConfig INI                    62           1764           4259           7053
Bourne Shell                     58            516            662           2081
Bourne Again Shell                4            170            300            661
Perl                              1             31             42            100
--------------------------------------------------------------------------------
SUM:                            235           8053          13424          25360
--------------------------------------------------------------------------------

Here is the size of the ATDM Trilinos configuration implementation in Trilinos:

$ cd Trilinos/

$ ./TriBITS/common_tools/cloc/cloc-script-langauges.sh cmake/std/atdm
...
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Bourne Shell                     70           1186           1332           4594
CMake                            31            190            286            999
Bourne Again Shell                1             23             62            112
--------------------------------------------------------------------------------
SUM:                            102           1399           1680           5705
--------------------------------------------------------------------------------

So the Trilinos GenConfig implementation currently is about 4.4 times the number of lines of code compared to the ATDM Trilinos configuration. However, the GenConfig configuration currently seems to only support the systems SEMS RHEL7 and the ATS-2 while the ATDM Trilinos configuration supports the systems sems-rhel7, cee-rhel7, ats1, ats2, van1-tx2 as official implementations as well as the contributed systems blake, kokkos-dev, kokkos-dev2, spack-rhel and weaver.

bartlettroscoe commented 2 years ago

Now, less lines of code to maintain does not mean better. This is just an interesting statistic to consider.