Example of using LAPACK libraries on the cluster. The specific example creates 100X100 random matrix and diagonalizes it.
(1) lapack_test.f90: Fortran source code
(2) Makefile: Makefile to compile the source code
(3) run.sbatch: Btach-job submission script to send the job to the queue
source new-modules.sh
make
sbatch run.sbatch
Eigen values of h:
1 -5.9173627920778840
2 -5.4622305719522233
3 -5.0140224795854946
4 -4.9236578808830620
5 -4.7171953274704235
6 -4.6924386683880961
7 -4.4560755988031815
8 -4.2936463754595353
9 -4.1201234410093219
10 -3.9966083908434960
11 -3.9005222682317910
12 -3.7136638389289125
13 -3.6498520118544886
14 -3.5048994812921745
15 -3.3092165433379415
16 -3.2716978632141096
17 -3.1450754782466150
18 -3.0370667614850619
19 -2.8457986616859690
20 -2.7975676531806148
21 -2.6811391642645734
22 -2.5875579936919331
23 -2.5319247936082911
24 -2.4335806561282260
25 -2.3400697987469159
26 -2.2714529891051960
27 -2.0892798055969712
28 -1.9914157115835640
29 -1.9517727200211672
30 -1.9236722424994122
31 -1.8384726823206421
32 -1.7234757833805263
33 -1.5467311719604293
34 -1.4760857988988414
35 -1.3113250567105064
36 -1.2724633036757262
37 -1.2147485665961884
38 -1.1306002460276596
39 -0.95054108597359588
40 -0.83630668650776119
41 -0.79589460373040466
42 -0.71315964522094499
43 -0.62396160922859512
44 -0.55881585809763201
45 -0.50852056067436724
46 -0.26022533893951622
47 -0.18232597906490050
48 -0.13788862090284812
49 -2.62026525444315449E-002
50 2.38762543087900937E-002
51 8.19705371042348668E-002
52 0.23266835007239461
53 0.26622094234093796
54 0.34684829613368628
55 0.51281628968510806
56 0.55740203551648493
57 0.70506466552552294
58 0.71371318406882134
59 0.77461899513946797
60 0.98556583064397718
61 1.0126689945150862
62 1.2005103323106667
63 1.3271098971809165
64 1.3624845999178268
65 1.5449643627890752
66 1.5575402641066851
67 1.6554169263826461
68 1.7367238506467384
69 1.9104971097964294
70 1.9780639057299150
71 2.1498787780026394
72 2.1976214522097934
73 2.2719355028432897
74 2.3287225898484110
75 2.4886155580647826
76 2.5783404208449188
77 2.6565838706693752
78 2.7435930769540229
79 2.8329422798964781
80 2.9020809782372901
81 3.0035373665527216
82 3.1176209518706393
83 3.2049636675818207
84 3.2245925221834946
85 3.3540153531315671
86 3.5163963398237281
87 3.5700131690947736
88 3.8029115447933406
89 3.8616477415418342
90 4.0213169717123423
91 4.1440296164961810
92 4.2346440878767426
93 4.4043595246921798
94 4.6151972557074030
95 4.6834950671914584
96 4.8032831650372145
97 5.0014143250821936
98 5.1856783411660086
99 5.1987505309260706
100 50.010946087355642
STOP End of program.