From 88876c0a0d15e7b322ee0c09e02635e257cba419 Mon Sep 17 00:00:00 2001 From: formaggia Date: Sat, 13 Jan 2024 17:25:36 +0100 Subject: [PATCH] few fixes to documentation --- Examples/README.md | 36 ++++--- Examples/directories.html | 214 ++++++++++++++++++++------------------ Examples/env | 7 -- Examples/environment.sh | 24 +++++ 4 files changed, 158 insertions(+), 123 deletions(-) delete mode 100644 Examples/env create mode 100644 Examples/environment.sh diff --git a/Examples/README.md b/Examples/README.md index 46d61965c..80fd1b4a6 100644 --- a/Examples/README.md +++ b/Examples/README.md @@ -1,27 +1,33 @@ -# Course on Advanced programming for scientific computing # -## Mathematical Engineering, Politecnico di Milano ## -## Copyright Luca Formaggia 2012-2023 ## +# Examples of the Course on Advanced Programming for Scientific Computing (aka PACS)# +**Mathematical Engineering, Politecnico di Milano** +**Copyright Luca Formaggia 2012-2024** ## LICENCING ## The software contained in the subfolders of this directory is free-software released under a GNU General Public Licens (GPL). The details of the licence are availabe in the `COPYRIGHT` file in the root directory. - ## CONTENT ## -Here you find the examples given in the course +`bin/` -> Directory where the executables are installed. It contains some scripts to beautify your code (see below) + +`lib/` -> Directory where the libraries are installed. Initially empty, but it will be filled with the libraries produced by the examples + +`lib64/` -> Only for compatibility. In fact is a link to `lib` + +`include/` -> General include files. Initially empty, but it will be filled with the include files of the examples -`doc` -> Possible additional documentation +`share/` -> Directory where the documentation is installed. Initially empty, but it will be filled with the documentation of the examples -`lib` -> Possible libraries needed to compile some example +`src/` -> Directory with the example sources. Probably the most important directory. Look at the `CONTENT.md` file for a description of the examples. -`include` -> General include files +`astyle_scripts_and_hooks/` Some tools to beautify your code, based on [Artistic Style](http://astyle.sourceforge.net/) (you mast install astyle if you wish to use the tools in this directory). -`src` -> Directory with the example sources +`clang-format_scripts_and_hooks/` Some tools to beautify your code, based on [clang-format](https://www.electronjs.org/docs/latest/development/clang-format) (you must have clang-tools installed! if you want to use the utilities in this directory) -`astyle_scripts_and_hooks` Some tools to beautify your code, based on [Artistic Style](http://astyle.sourceforge.net/) (you mast install astyle if you wish to use the tools in this directory). +`environment.sh` A bash script that sets the environment variables needed by the examples. It can simplify life if you are not using the mk-modules adopted in the course. In that case you can copy it in your `.profile` file in your home directory (see note at the end of the file), **after having changed the path correctly**. -`clang-format_scripts_and_hooks` Some tools to beautify your code, based on [clang-format](https://www.electronjs.org/docs/latest/development/clang-format) (you must have clang-tools installed! if you want to use the utilities in this directory). +`Makefile.user` A makefile that you must copy to `Makefile.inc` and edit to suit your system. It is used by all the examples. It is explained in the next section. +`setup.sh` A bash script that compiles the main utilities in one shot so that you have averything set. It is explained in the next section. ## HOW TO COMPILE AND INSTALL THE EXAMPLES: ## @@ -201,6 +207,13 @@ Here the tests have been collected in the subfolder `test`, but the rule is the Have a look at the tests because they contain information on how to use the utilities! +To simplify life, you can just do +```bash +bash ./setup.sh +``` +and averything is done for you. + + ### THIRD STEP EXTRAS ### Some utilities that are used in a few examples (and interesting on their own) are kept as submodules, since they refer to third party software. To compile and install them, go in the `Extras` directory of the repository and follow the instructions in the `README.md` file stored in that directory. @@ -236,7 +249,6 @@ installed. Anyway, a copy of `directories.html` is present in this directory. ### The content of `src` Directory ### A description of the examples in the `src` directory is found in `CONTENT.md`. - ### A note on `.bashrc` or `.profile` (or `.bash_profile`) ### To control the settings of your Linux environment everytime you login diff --git a/Examples/directories.html b/Examples/directories.html index 7c9c636fa..0ab3932fe 100644 --- a/Examples/directories.html +++ b/Examples/directories.html @@ -3,183 +3,189 @@ - + Directory structure of the examples

Directory structure of the examples

- ./src
+ ./src
+ ├── adtTree
├── Aggregates
├── Arrays
├── bcHandler
├── Bindings
- ├── C++20
- │   ├── Concepts
- │   ├── OrderingAndSpaceShip
- │   └── RangesAndViews
├── CompositionWithVariadicTemplates
+ ├── Concepts
├── Constexpr
├── CRTP
+ ├── DataHeap
├── Derivatives
├── DesignPatterns
- │   ├── AbstractFactory
- │   ├── Builder
- │   ├── Composite
- │   └── Visitor
+ │   ├── AbstractFactory
+ │   ├── Builder
+ │   ├── Composite
+ │   ├── Visitor
+ │   └── VisitorAndVariant
├── ExpressionTemplates
- │   ├── Algebra
- │   └── Integral
+ │   ├── Algebra
+ │   └── Integral
├── FixedPointSolver
├── FloatingPoint
- │   ├── FinDiff
- │   ├── FPComparison
- │   ├── FPExceptions
- │   ├── FPFailure
- │   └── QuadraticRoot
+ │   ├── FinDiff
+ │   ├── FPComparison
+ │   ├── FPExceptions
+ │   ├── FPFailure
+ │   └── QuadraticRoot
├── ForwardDeclaration
├── Functors
├── GenericFactory
+ ├── HeapView
├── HeatExchange
- │   └── Figure
+ │   └── Figure
├── Horner
+ ├── InPolygon
├── IntegerOverflow
├── Interp1D
├── LambdaExpr
├── LinearAlgebra
- │   ├── CppNumericalSolvers
- │   ├── IML_Eigen
- │   ├── MatrixData
- │   ├── MatrixMarketReadersMatlab
- │   ├── redsvd-h
- │   ├── SparseBlockMatrix
- │   ├── spectra
- │   ├── Thomas
- │   └── ZeroOfPolynomials
+ │   ├── CppNumericalSolvers
+ │   ├── IML_Eigen
+ │   ├── MatrixData
+ │   ├── MatrixMarketReadersMatlab
+ │   ├── redsvd-h
+ │   ├── SparseBlockMatrix
+ │   ├── spectra
+ │   ├── Thomas
+ │   └── ZeroOfPolynomials
├── LinearAlgebraUtil
- │   └── test
+ │   └── test
├── LineSearch
├── Linkage
├── LoadLibraries
+ ├── Matrix
├── Mesh
- │   └── Test
+ │   └── Test
├── MetaProgramming
- │   ├── DecltypeDeclVal
- │   ├── GCD
- │   ├── ifthenelse
- │   ├── IsClonable
- │   ├── MetaDot
- │   ├── Pi
- │   ├── SwitchType
- │   ├── transposeView
- │   └── Trivial
+ │   ├── DecltypeDeclVal
+ │   ├── GCD
+ │   ├── ifthenelse
+ │   ├── IsClonable
+ │   ├── MetaDot
+ │   ├── Pi
+ │   ├── SwitchType
+ │   ├── transposeView
+ │   └── Trivial
├── MoveSemantic
├── MoveSemantic_simple
├── MultiCity
├── muParserInterface
├── MyMat0
- │   └── MyMat0_TypeTraitAndView
+ │   └── MyMat0_TypeTraitAndView
├── NewtonSolver
├── NonLynSys
├── Numeric_Limits
├── Odr
├── OneDMesh
├── OptimizationAndProfiling
+ ├── OrderingAndSpaceShip
├── Parallel
- │   ├── MPI
- │   ├── OpenMP
- │   └── ParallelSTL
+ │   ├── MPI
+ │   ├── OpenMP
+ │   ├── ParallelSTL
+ │   └── Utilities
├── Plugins
- │   ├── FactoryPlugin
- │   └── FactoryPluginII
+ │   ├── FactoryPlugin
+ │   └── FactoryPluginII
+ ├── PointInSimplex
├── Polygon
├── Polynomials
├── Preprocessor
+ ├── pybind11
+ │   ├── basicZeroFun
+ │   ├── numpyEigen
+ │   ├── OneDMesh
+ │   ├── pybind11_examples
+ │   └── simple
├── QuadratureRule
- │   ├── AllDynamic
- │   └── baseVersion
+ │   ├── AllDynamic
+ │   └── baseVersion
├── RandomDistibutions
├── Rational
├── ReadingVectors
- ├── RefBindings
├── ReferenceWrapper
├── Regression
- │   ├── auto
- │   └── doc
├── Richardson
- │   └── auto
├── RK45
├── RKFSolver
- │   └── RKStability
+ │   └── RKStability
├── Scope
+ ├── SegmentIntersect
├── SharedLibrary
- │   └── DynamicLoading
+ │   └── DynamicLoading
├── SimpleProgram
├── SmartPointers
├── StaticMembers
├── STL
- │   ├── cont
- │   ├── FileSystem
- │   ├── Map
- │   ├── Optional
- │   ├── Reduce
- │   ├── Set
- │   ├── SetEdge
- │   ├── Sort
- │   ├── SortAndPermute
- │   ├── tuple
- │   ├── UnorderedMap
- │   └── Variant
+ │   ├── cont
+ │   ├── FileSystem
+ │   ├── InitializerList
+ │   ├── Map
+ │   ├── Optional
+ │   ├── RangesAndViews
+ │   ├── Reduce
+ │   ├── Set
+ │   ├── SetEdge
+ │   ├── Sort
+ │   ├── SortAndPermute
+ │   ├── tuple
+ │   ├── UnorderedMap
+ │   └── Variant
├── Streams
- │   ├── binary_io
- │   ├── fstream
- │   ├── iostream
- │   ├── redirect
- │   ├── Serialization
- │   └── sstream
+ │   ├── binary_io
+ │   ├── fstream
+ │   ├── iostream
+ │   ├── redirect
+ │   ├── Serialization
+ │   └── sstream
├── StringLiterals
├── Templates
- │   ├── Compare
- │   ├── ExplicitInstantiation
- │   ├── Fibonacci
- │   ├── Functions
- │   ├── Interpolation
- │   ├── Mean
- │   ├── traits
- │   └── VariadicTemplates
+ │   ├── Compare
+ │   ├── ExplicitInstantiation
+ │   ├── Fibonacci
+ │   ├── Functions
+ │   ├── Interpolation
+ │   ├── Mean
+ │   ├── traits
+ │   └── VariadicTemplates
├── Utilities
└── Vector
-     ├── Basics
-     └── Remove
-

-

-

+     ├── Basics
+     └── Remove
+

-141 directories -

-

+152 directories + +


- tree v1.8.0 © 1996 - 2018 by Steve Baker and Thomas Moore
+ tree v2.0.2 © 1996 - 2022 by Steve Baker and Thomas Moore
HTML output hacked and copyleft © 1998 by Francesc Rocher
JSON output hacked and copyleft © 2014 by Florian Sesser
Charsets / OS/2 support © 2001 by Kyosuke Tokoro diff --git a/Examples/env b/Examples/env deleted file mode 100644 index c4c8e1153..000000000 --- a/Examples/env +++ /dev/null @@ -1,7 +0,0 @@ -mkEigenInc=/u/geo2/sw/Packages/libs/eigen/3/include/eigen3 -mkEigenHome=/u/geo2/sw/Packages/libs/eigen/3 -mkOpenmpiLib=/u/geo2/sw/Toolchains/gcc+system/4.9/Packages/libs/openmpi/1.6/lib -mkClangSystemBin=/u/geo2/sw/Packages/compilers/clang+system/3.4/bin -mkGccSystemBin=/u/geo2/sw/Packages/compilers/gcc+system/4.9/bin -mkCCompiler=/u/geo2/sw/Packages/compilers/gcc+system/4.9/bin/gcc -mkCxxCompiler=/u/geo2/sw/Packages/compilers/gcc+system/4.9/bin/g++ diff --git a/Examples/environment.sh b/Examples/environment.sh new file mode 100644 index 000000000..a724aca83 --- /dev/null +++ b/Examples/environment.sh @@ -0,0 +1,24 @@ +# +export PACS_ROOT=/home/forma/Work/Didattica/HPC_Courses/Pacs-examples/Examples/ +# To simulate modules. You have to replace with your own installation +# This is the situation in my PC (Luca Formaggia) +# +export mkTbbLib=/usr/lib/x86_64-linux-gnu/ +export mkTbbInc=/usr/include +export mkSuitesparseLib=/usr/lib/x86_64-linux-gnu +export mkSuitesparseInc=/usr/include/suitesparse/ +export mkEigenInc=/usr/local/include/eigen3 +export mkEigenHome=/usr/local/include/eigen3 +export mkOpenmpiLib=/usr/lib/x86_64-linux-gnu +export mkClangSystemBin=/usr/bin +export mkCCompiler=gcc +export mkCxxCompiler=g++ +export mkCgalLib=/usr/lib +export mkCgalInc=/usr/include +export mkBoostInc=/usr/include +export mkBoostLib=/usr/lib/x86_64-linux-gnu/ +export mkHdf5Lib=/usr/lib/x86_64-linux-gnu/hdf5/serial/ +export mkHdf5Inc=/usr/include/hdf5/serial/ +export PACS_ROOT=/home/forma/Work/Didattica/HPC_Courses/Pacs-examples/Examples/ +export mkPybind11Prefix=${PACS_ROOT}/share/cmake/ +