Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit baa58365 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 12/4/15 introduce more parameter tuning for the geometry choice...

(JEC) 12/4/15 introduce more parameter tuning for the geometry choice (lagsht_testsuite.cc) and modification Readme/History; add files to test weights and nodes computation
parent f523f5e2
Laguerre Spherical Harmonic Transform
======================================
Download en Guest
git clone https://gitlab.in2p3.fr/campagne/LagSHT.git
Download en Personne enregistree sur gitlab
git clone git@gitlab.in2p3.fr:campagne/LagSHT.git
# 11/4/15
* update of the code by M.R to compute the nodes/weights included in the LaguerreBuilder file.
* NB: use of `<cmath>` mandatory
# 10/4/15
* new code from M. Reinecke to compute the nodes/weights of the generalized Laguerre function quadrature. It extends greatly the validity of the computation (N ~ 20000 tested) wo the needs of special floating-point representation. It is done by proprely scaling factor do on the fly.
# 9/4/15
* new set of files for a Stand-a-lone version wo `Sophya`
* extension of the computation of the weights (Laguerre function) up to N ~ 5500 by transfert of the exponential scale a the very beginning (see laguerreBuilder.cc)
* setup some helper to get the geometry (theta, phi) positions of geometry
* start documentation (Doxygen)
`> doxygen doxydoc`
* Timing files (error_handling, walltimer) give nice Timing trees
```
Total wall clock time for 'MultiSphericalLaguerreTransform': 92.0287s
|
+- processing : 92.05% (84.7126s)
| |
| +- processing part Analysis : 51.18% (43.3588s)
| +- processing part Synthesis : 48.82% (41.3539s)
| | |
| | +- SHT Synthesis : 68.20% (28.2026s)
| | +- Laguerre MultiSynthesis : 24.84% (10.2739s)
| | +- <unaccounted> : 6.96% ( 2.8773s)
| |
| +- <unaccounted> : 0.00% ( 0.0000s)
|
+- data input : 0.91% ( 0.8384s)
+- <unaccounted> : 7.04% ( 6.4777s)
```
# 8/4/15
* creation d'un directory **Sophya** pour deplacer le code existant (v0.2) et pouvoir creer un code independant pour etre distribuable.
# Version du 07/04/15 (v 0.2)
* Essentiellement optimization du code de LaguerreTransform (MultiSyntheis & MultiAnalysis) grace a la collaboration de Martin Reinecke (auteur de `libsharp` )
# Version du 03/04/15
* refonte des algorithmes de Synthese/Analyse de la transformation de Laguerre en utilisant des functions generalisees de Laguerre et non les polynomes generalises. Ainsi, le facteur exponentiel permet de manipuler au mieux des nombres 64-bits sauf a quelques endroits ou on a besoin de 128-bits. L'ineterface avec `libsharp` se fait donc mieux.
* L'algorithme d'Analyse la transformation Harmonqiue Spherique + Laguerre a ete revu pour tirer profit des calculs iteratifs des polynomes de Laguerre comme dans le cza de la Synthese. Cela induit une acceleration significative.
# Version du 25/3/15
## Liste des fichiers
* laguerreBuilder.h (.cc) : class Polynomes de Laguerre generalises
* laguerreTransform.h (.cc) : class Transformation de Laguerre (et Inverse)
* lagSphericTransform.h (.cc) : class Transformation Harmonique Spherique & Laguerre (et Inverse)
* tstlag.cc: un programme de test (utiliser #define TEST <valeur> 1,..,4)
* Makefile:
modifier le lieu ou est installe libsharp
desactiver NTLLIB si NTL pas installee
## Librairies requises
* SOPHYA
Sophya doit avoir ete configure avec
`-scxx g++ -sasz64 -ldble128`
pour prendre en charge au moins les "r_16" (long double)
si NTL est installee et que l'on veut que Sophya (NDataBlock) s'en serve pour les xdouble alors
il faut configurer Sophya avec egalement:`-xdble`
* LIBSHARP
`git clone git://git.code.sf.net/p/libsharp/code libsharp-code`
Voir dans `libsharp-code/libsharp/sharp_cxx.h` et ajouter si necessaire:
sharp_geom_info* get_geom_info() { return ginfo;}
sharp_alm_info* get_alm_info() { return ainfo; }
## Compilation
> mkdir Objs
> edit tstlag.cc pour changer la variable TESTLEVEL [1,4]
> make
## Running
> ./Objs/tstlag (default)
> ./Objs/tstlag -l 100 -n 100 (Lmax = 100, Nmax = 100)
## Plateform ou le code a ete teste
Mac OS X 10.9.5 + gcc 4.8.4
Linux SLC 6.6 + gcc 4.9.1 20140922
# Exemple de run (Linux)
```
opera3Exp:opera/campagne/LagSHT$./Objs/tstlag -l 100 -n 1000
PIOPersist::Initialize() Starting Sophya Persistence management service
SOPHYA Version 2.3 Revision 45 (V_Dec2014) -- Mar 25 2015 15:14:56 gcc 4.9.1 20140922 (Red Hat 4.9.1-10)
sizeof(long double): 16 bytes min 3.3621e-4932 max 1.18973e+4932 min exp_10 -4931 max exp_10 4932
Tests Level (1): L: 100 N: 1000
r_16 Sum roots = 1.002e+06 ->0
r_16 Sum weights = 2 ->-3.6787e-15
***Timing Test 1 (r_16)
CPU Time: Total= 0.15 (Partial= 0.15) s
Elapsed Time: Total=00.150 s (Partial= 00.150 s)
```
```
> opera3Exp:opera/campagne/LagSHT$./Objs/tstlag -l 100 -n 100
PIOPersist::Initialize() Starting Sophya Persistence management service
SOPHYA Version 2.3 Revision 45 (V_Dec2014) -- Mar 25 2015 15:14:56 gcc 4.9.1 20140922 (Red Hat 4.9.1-10)
sizeof(long double): 16 bytes min 3.3621e-4932 max 1.18973e+4932 min exp_10 -4931 max exp_10 4932
Tests Level (4): L: 100 N: 100
LaguerreSphericalTransform::Ctor done
SetThetaPhiMap: Nring, Nphi, Npix, Nalm 199, 199, 39601, 5050
***Timing SHTL r_16/end init
CPU Time: Total= 0 (Partial= 0) s
Elapsed Time: Total=00.001 s (Partial= 00.001 s)
verif : Ntot 505000 id value = 505000
***Timing SHTL r_16/end rndm filling
CPU Time: Total= 0.05 (Partial= 0.05) s
Elapsed Time: Total=00.043 s (Partial= 00.043 s)
NDataBlock::Print(0x7fff1c366580,Sz=505000,IsTemp=0)
mSRef=0xce9dd0(nref=1,data=0x7f553ebbc010,bridge=0)
(-0.998029,0) (-0.916738,0) (-0.646715,0) (-0.270796,0) (-0.817339,0) (-0.815405,0) (-0.0255656,0) (0.0535006,0)
(-0.0911332,0) (-0.533643,0)
Main:Synthesis...
***Timing SHTL r_16/end synthesis
CPU Time: Total= 4.08 (Partial= 4.03) s
Elapsed Time: Total=01.172 s (Partial= 01.172 s)
Main:Analysis...
***Timing SHTL r_16/end analysis
CPU Time: Total= 8.68 (Partial= 4.6) s
Elapsed Time: Total=02.221 s (Partial= 01.221 s)
Error analysis...
>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<
r_16 Err. Max. 9.37109e-14 [459748], Err. Rel. 7.85865e-11
>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<
***Timing Test 4 r_16
CPU Time: Total= 8.73 (Partial= 0.05) s
Elapsed Time: Total=02.282 s (Partial= 00.282 s)
```
Laguerre Spherical Harmonic Transform
======================================
Version 1.1
Download en Guest
Download as Guest
git clone https://gitlab.in2p3.fr/campagne/LagSHT.git
Download en Personne enregistree sur gitlab
git clone git@gitlab.in2p3.fr:campagne/LagSHT.git
# List of files
* laguerreBuilder.h (.cc) : class of generalized Laguerre function * laguerreTransform.h (.cc) : class to manage the Laguerre function Transform (Synthesis & Analysis): Single or Multiple
* lagSphericTransform.h (.cc) : class to manage the Spherical Harmonic & Laguerre function Trnasform (Synthesis & Analysis). Choice of different geometry for the Sphere pixelizations.
* lagsht_testsuite.c : a simple program to test different piece of the code
* Makefile that should be tuned to the local platform
* doxydoc : input file to doxygen tool to generate the class documentation
# 11/4/15
* update of the code by M.R to compute the nodes/weights included in the LaguerreBuilder file.
* NB: use of `<cmath>` mandatory
# 10/4/15
* new code from M. Reinecke to compute the nodes/weights of the generalized Laguerre function quadrature. It extends greatly the validity of the computation (N ~ 20000 tested) wo the needs of special floating-point representation. It is done by proprely scaling factor do on the fly.
# 9/4/15
* new set of files for a Stand-a-lone version wo `Sophya`
* extension of the computation of the weights (Laguerre function) up to N ~ 5500 by transfert of the exponential scale a the very beginning (see laguerreBuilder.cc)
* setup some helper to get the geometry (theta, phi) positions of geometry
* start documentation (Doxygen)
`> doxygen doxydoc`
* Timing files (error_handling, walltimer) give nice Timing trees
```
Total wall clock time for 'MultiSphericalLaguerreTransform': 92.0287s
|
+- processing : 92.05% (84.7126s)
| |
| +- processing part Analysis : 51.18% (43.3588s)
| +- processing part Synthesis : 48.82% (41.3539s)
| | |
| | +- SHT Synthesis : 68.20% (28.2026s)
| | +- Laguerre MultiSynthesis : 24.84% (10.2739s)
| | +- <unaccounted> : 6.96% ( 2.8773s)
| |
| +- <unaccounted> : 0.00% ( 0.0000s)
|
+- data input : 0.91% ( 0.8384s)
+- <unaccounted> : 7.04% ( 6.4777s)
```
# 8/4/15
* creation d'un directory **Sophya** pour deplacer le code existant (v0.2) et pouvoir creer un code independant pour etre distribuable.
# Version du 07/04/15 (v 0.2)
* Essentiellement optimization du code de LaguerreTransform (MultiSyntheis & MultiAnalysis) grace a la collaboration de Martin Reinecke (auteur de `libsharp` )
# Version du 03/04/15
* refonte des algorithmes de Synthese/Analyse de la transformation de Laguerre en utilisant des functions generalisees de Laguerre et non les polynomes generalises. Ainsi, le facteur exponentiel permet de manipuler au mieux des nombres 64-bits sauf a quelques endroits ou on a besoin de 128-bits. L'ineterface avec `libsharp` se fait donc mieux.
* L'algorithme d'Analyse la transformation Harmonqiue Spherique + Laguerre a ete revu pour tirer profit des calculs iteratifs des polynomes de Laguerre comme dans le cza de la Synthese. Cela induit une acceleration significative.
# Version du 25/3/15
## Liste des fichiers
* laguerreBuilder.h (.cc) : class Polynomes de Laguerre generalises
* laguerreTransform.h (.cc) : class Transformation de Laguerre (et Inverse)
* lagSphericTransform.h (.cc) : class Transformation Harmonique Spherique & Laguerre (et Inverse)
* tstlag.cc: un programme de test (utiliser #define TEST <valeur> 1,..,4)
* Makefile:
modifier le lieu ou est installe libsharp
desactiver NTLLIB si NTL pas installee
## Librairies requises
* SOPHYA
Sophya doit avoir ete configure avec
`-scxx g++ -sasz64 -ldble128`
pour prendre en charge au moins les "r_16" (long double)
si NTL est installee et que l'on veut que Sophya (NDataBlock) s'en serve pour les xdouble alors
il faut configurer Sophya avec egalement:`-xdble`
# Required Librairy
* LIBSHARP
`git clone git://git.code.sf.net/p/libsharp/code libsharp-code`
Voir dans `libsharp-code/libsharp/sharp_cxx.h` et ajouter si necessaire:
Look at the `libsharp-code/libsharp/sharp_cxx.h` file and add if necessary
sharp_geom_info* get_geom_info() { return ginfo;}
sharp_alm_info* get_alm_info() { return ainfo; }
## Compilation
# Compilation
> edit Makefile and adapat to local platform
> mkdir Objs
> edit tstlag.cc pour changer la variable TESTLEVEL [1,4]
> make
## Running
> ./Objs/tstlag (default)
> ./Objs/tstlag -l 100 -n 100 (Lmax = 100, Nmax = 100)
## Plateform ou le code a ete teste
# Running
> ./Objs/lagsht_testsuite -t <test number> [1]
[-n <Nmax value> [5]] [-l <Lmax value> [10]]
[-g <geometry> Gauss|Fejer1|Healpix [Gauss]]
[-ntheta <number of theta rings> [determined by the geometry]
in case of Healpix gives the nside parameter]
[-nphi <number of pixel per rings> [determined by the geometry]]
> <test number>:
0: basic test for numerical application
1: to get the nodes & weights of the generalized Gauss-laguerre function quadrature.
2: to test 1D- Laguerre Transform (Synthesis & Analysis)
3: to test the full 3D Spherical Harmonic Laguerre trabsform (Synthesis & Analysis)
> <geometry>
Gauss : use the Gauss quadrature by default Ntheta = Lmax and Nphi = 2Lmax - 1
Fejer1: use the Fejer's sum rule n°1 by default Ntheta = 2Lmax-1 and Nphi = 2Lmax-1
Healpix: use the Healpix map with Ntheta giving the Nside parameter.
> nphi: libsharp works faster if this number is increased (compared to the minimal number required by the geometry) up to a power of 2 number. Eg. for Lmax = 1024, Nphi_min = 2L-1 = 2047, so Nphi = 2048 will run faster.
# Plateform tested
Mac OS X 10.9.5 + gcc 4.8.4
Linux SLC 6.6 + gcc 4.9.1 20140922
# Exemple de run (Linux)
```
opera3Exp:opera/campagne/LagSHT$./Objs/tstlag -l 100 -n 1000
PIOPersist::Initialize() Starting Sophya Persistence management service
SOPHYA Version 2.3 Revision 45 (V_Dec2014) -- Mar 25 2015 15:14:56 gcc 4.9.1 20140922 (Red Hat 4.9.1-10)
sizeof(long double): 16 bytes min 3.3621e-4932 max 1.18973e+4932 min exp_10 -4931 max exp_10 4932
Tests Level (1): L: 100 N: 1000
r_16 Sum roots = 1.002e+06 ->0
r_16 Sum weights = 2 ->-3.6787e-15
***Timing Test 1 (r_16)
CPU Time: Total= 0.15 (Partial= 0.15) s
Elapsed Time: Total=00.150 s (Partial= 00.150 s)
```
```
> opera3Exp:opera/campagne/LagSHT$./Objs/tstlag -l 100 -n 100
PIOPersist::Initialize() Starting Sophya Persistence management service
SOPHYA Version 2.3 Revision 45 (V_Dec2014) -- Mar 25 2015 15:14:56 gcc 4.9.1 20140922 (Red Hat 4.9.1-10)
sizeof(long double): 16 bytes min 3.3621e-4932 max 1.18973e+4932 min exp_10 -4931 max exp_10 4932
Tests Level (4): L: 100 N: 100
LaguerreSphericalTransform::Ctor done
SetThetaPhiMap: Nring, Nphi, Npix, Nalm 199, 199, 39601, 5050
***Timing SHTL r_16/end init
CPU Time: Total= 0 (Partial= 0) s
Elapsed Time: Total=00.001 s (Partial= 00.001 s)
verif : Ntot 505000 id value = 505000
***Timing SHTL r_16/end rndm filling
CPU Time: Total= 0.05 (Partial= 0.05) s
Elapsed Time: Total=00.043 s (Partial= 00.043 s)
NDataBlock::Print(0x7fff1c366580,Sz=505000,IsTemp=0)
mSRef=0xce9dd0(nref=1,data=0x7f553ebbc010,bridge=0)
(-0.998029,0) (-0.916738,0) (-0.646715,0) (-0.270796,0) (-0.817339,0) (-0.815405,0) (-0.0255656,0) (0.0535006,0)
(-0.0911332,0) (-0.533643,0)
Main:Synthesis...
***Timing SHTL r_16/end synthesis
CPU Time: Total= 4.08 (Partial= 4.03) s
Elapsed Time: Total=01.172 s (Partial= 01.172 s)
Main:Analysis...
***Timing SHTL r_16/end analysis
CPU Time: Total= 8.68 (Partial= 4.6) s
Elapsed Time: Total=02.221 s (Partial= 01.221 s)
# Examples
* ./Objs/lagsht_testsuite -n 1024
gives 2 files `lagNodes-1024-Func.txt` and `lagWeights-1024-Func.txt` with the Nodes & Weights computed
* ./Objs/lagsht_testsuite -t 3 -l 1024 -n 128
perform a Laguerre SH transform with the default geometry (Gauss) using Lmax = 1024 and Nmax = 128. The program generates a set of flmn coefficients, then performs a Synthesis followed by an Analysis operations. Finally it computes the maximal absolute and relative errors comparing the original flmn complex values to the results of the Analysis. The timing of the different processes is shown in a sorted tree.
````
Max Memory size: 8589 MBytes
___________ MultiSphericalLaguerreTransform TEST _____________
LaguerreTransform start....
Sum roots = 16640 -> diff with theory: -4.9738e-14
Sum weights = 0.657058 -> diff with theory: 1.58752e-13
SetThetaPhiMap: Geom, Nring, Nphi, Npix, Nalm: Gauss, 1024, 2047, 2096128, 524800
Main:Synthesis r_8 function...
Multi Synthesis with Function....:128
Main:Analysis r_8 function...
Analysis with Function....
Error analysis...
(67174392) : flnm Orig (0.510484,0.108741) <-> flmn Rec (0.510484,0.108741)
(67174393) : flnm Orig (0.251975,0.463983) <-> flmn Rec (0.251975,0.463983)
(67174394) : flnm Orig (-0.163502,0.326319) <-> flmn Rec (-0.163502,0.326319)
(67174395) : flnm Orig (0.47971,0.771774) <-> flmn Rec (0.47971,0.771774)
(67174396) : flnm Orig (-0.748916,0.0658513) <-> flmn Rec (-0.748916,0.0658513)
(67174397) : flnm Orig (0.0890389,-0.589733) <-> flmn Rec (0.0890389,-0.589733)
(67174398) : flnm Orig (-0.16129,0.314123) <-> flmn Rec (-0.16129,0.314123)
(67174399) : flnm Orig (0.386101,0.876158) <-> flmn Rec (0.386101,0.876158)
>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<
r_16 Err. Max. 9.37109e-14 [459748], Err. Rel. 7.85865e-11
Err. Max. 1.99652e-11 [9970845], Err. Rel. 2.84023e-08
>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<
***Timing Test 4 r_16
CPU Time: Total= 8.73 (Partial= 0.05) s
Elapsed Time: Total=02.282 s (Partial= 00.282 s)
Total wall clock time for 'MultiSphericalLaguerreTransform': 50.7549s
|
+- processing : 94.57% (48.0011s)
| |
| +- processing part Analysis : 53.66% (25.7580s)
| | |
| | +- Laguerre MultiAnalysis : 48.35% (12.4527s)
| | +- SHT Analysis : 44.46% (11.4522s)
| | +- <unaccounted> : 7.19% ( 1.8531s)
| |
| +- processing part Synthesis : 46.34% (22.2431s)
| | |
| | +- SHT Synthesis : 48.04% (10.6858s)
| | +- Laguerre MultiSynthesis : 46.13% (10.2609s)
| | +- <unaccounted> : 5.83% ( 1.2964s)
| |
| +- <unaccounted> : 0.00% ( 0.0000s)
|
+- data input : 1.64% ( 0.8313s)
+- <unaccounted> : 3.79% ( 1.9225s)
Accumulated timing overhead: approx. 0.0000s
---/ Fin bloc try ----
---- Programme lagsh_testsuite.cc - FIN (Rc=0) ---
```
0.0064297
0.0172721
0.0329159
0.0533694
0.0786341
0.108711
0.1436
0.183301
0.227814
0.27714
0.331279
0.390231
0.453995
0.522573
0.595964
0.674169
0.757187
0.84502
0.937666
1.03513
1.1374
1.24449
1.3564
1.47312
1.59465
1.721
1.85217
1.98816
2.12896
2.27457
2.42501
2.58026
2.74033
2.90522
3.07493
3.24946
3.42881
3.61298
3.80197
3.99578
4.19441
4.39786
4.60613
4.81923
5.03715
5.2599
5.48747
5.71987
5.95709
6.19913
6.44601
6.69771
6.95424
7.21559
7.48178
7.7528
8.02864
8.30932
8.59483
8.88517
9.18034
9.48035
9.78519
10.0949
10.4094
10.7287
11.0529
11.3819
11.7158
12.0545
12.3981
12.7464
13.0997
13.4577
13.8207
14.1884
14.561
14.9385
15.3208
15.7079
16.0999
16.4968
16.8985
17.305
17.7164
18.1327
18.5538
18.9797
19.4106
19.8463
20.2868
20.7322
21.1825
21.6376
22.0976
22.5624
23.0321
23.5067
23.9862
24.4705
24.9597
25.4537
25.9527
26.4565
26.9652
27.4787
27.9972
28.5205
29.0487
29.5818
30.1197
30.6626
31.2103
31.7629
32.3204
32.8828
33.4501
34.0222
34.5993
35.1812
35.7681
36.3598
36.9565
37.558
38.1645
38.7758
39.3921
40.0133
40.6393
41.2703
41.9062
42.547
43.1927
43.8434
44.4989
45.1594
45.8248
46.4951
47.1703
47.8504
48.5355
49.2255
49.9205
50.6203
51.3251
52.0349
52.7496
53.4692
54.1937
54.9232
55.6576
56.397
57.1414
57.8906
58.6449
59.4041
60.1682
60.9373
61.7113
62.4904
63.2743
64.0633
64.8572
65.656
66.4599
67.2687
68.0825
68.9013
69.725
70.5537
71.3874
72.2261
73.0698
73.9184
74.7721
75.6307
76.4944
77.363
78.2367
79.1153
79.9989
80.8876
81.7812
82.6799
83.5836
84.4923
85.406
86.3247
87.2484
88.1772
89.111
90.0498
90.9937
91.9426
92.8965
93.8554
94.8194
95.7885
96.7626
97.7417
98.7259
99.7151
100.709
101.709
102.713
103.723
104.737
105.757
106.781
107.811
108.846
109.886
110.931
111.981
113.036
114.096
115.162
116.232
117.308
118.388
119.474
120.565
121.661
122.762
123.868
124.979
126.096
127.217
128.344
129.476
130.612
131.755
132.902
134.054
135.211
136.374
137.542
138.715
139.893
141.076
142.264
143.458
144.657
145.86
147.07
148.284
149.503
150.728
151.958
153.193
154.433
155.678
156.929
158.184
159.445
160.711
161.983
163.259
164.541
165.828
167.121
168.418
169.721
171.029
172.342
173.66
174.984
176.313
177.647
178.987
180.331
181.681
183.037
184.397
185.763
187.134
188.51
189.892
191.279