• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eT-program / eT / 23744

21 Aug 2025 10:50PM UTC coverage: 88.606% (+0.009%) from 88.597%
23744

push

gitlab-ci

Merge branch 'warning_supression' into 'development'

Add cmake policy to suppress warning during setup

See merge request eT-program/eT!1569

53968 of 60908 relevant lines covered (88.61%)

3120763.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.82
/src/program/eT_class.F90
1

2

3
! eT - a coupled cluster program
4
! Copyright (C) 2016-2024 the authors of eT
5
!
6
! eT is free software: you can redistribute it and/or modify
7
! it under the terms of the GNU General Public License as published by
8
! the Free Software Foundation, either version 3 of the License, or
9
! (at your option) any later version.
10
!
11
! eT is distributed in the hope that it will be useful,
12
! but WITHOUT ANY WARRANTY; without even the implied warranty of
13
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
! GNU General Public License for more details.
15
!
16
! You should have received a copy of the GNU General Public License
17
! along with this program. If not, see <https://www.gnu.org/licenses/>.
18

19

20
module eT_class
21

22
   !!
23
   !! eT class
24
   !! Written by Eirik F. Kjønstad, May 2022
25
   !!
26

27
   use timings_class, only: timings
28

29
   implicit none
30

31
   type :: eT
32

33
      type(timings), allocatable, private :: timer
34

35
   contains
36

37
      procedure, public :: run
38

39
      procedure, public :: initialize
40
      procedure, public :: finalize
41
      procedure, public :: run_calculations
42

43
      procedure, private, nopass :: create_memory_manager
44

45
      procedure, private, nopass :: get_and_print_n_threads
46
      procedure, private, nopass :: set_global_print_levels_in_output_and_timing
47
      procedure, private, nopass :: print_compilation_info
48

49
      procedure, private :: print_timestamp
50
      procedure, private, nopass :: get_date_and_time
51

52
      procedure, private, nopass :: cholesky_decompose_eris
53
      procedure, private         :: run_geometry_optimization
54
      procedure, private         :: run_harmonic_frequencies
55
      procedure, public, nopass  :: run_reference_calculation
56
      procedure, private, nopass :: run_cc_calculation
57
      procedure, private, nopass :: run_ci_calculation
58

59
      procedure, private :: print_top_info_to_output_and_timing
60
      procedure, private :: print_bottom_info_to_output
61

62
   end type eT
63

64

65
   interface eT
66

67
      procedure :: new_eT
68

69
   end interface eT
70

71

72
contains
73

74

75
   function new_eT() result(this)
3,277✔
76
      !!
77
      !! Written by Eirik F. Kjønstad, May 2022
78
      !!
79
      implicit none
80

81
      type(eT) :: this
82

83
      this%timer = timings("Total time in eT", pl='minimal')
3,277✔
84

85
   end function new_eT
3,277✔
86

87

88
   subroutine run(this)
3,265✔
89
      !!
90
      !! Written by Sarai D. Folkestad, Eirik F. Kjønstad,
91
      !! Alexander C. Paul, and Rolf H. Myhre, 2018-2022
92
      !!
93
      use global_in
94

95
      implicit none
96

97
      class(eT), intent(inout) :: this
98

99
      input = input_tool()
3,265✔
100
      call input%read_input(file_name='eT.inp')
3,265✔
101

102
      call this%initialize()
3,265✔
103

104
      call this%run_calculations()
3,265✔
105

106
      call this%finalize()
3,235✔
107

108
   end subroutine run
3,235✔
109

110

111
   subroutine initialize(this)
3,277✔
112
      !!
113
      !! Written by Eirik F. Kjønstad, Mar 2024
114
      !!
115
      use global_in
116
      use global_out
117
      use timings_file_class,       only: timings_file
118
      use memory_manager_class,     only: mem
119
      use citation_printer_class,   only: eT_citations, citation_printer
120

121
#ifdef USE_LIBINT
122
      use libint_initialization, only: initialize_libint_c
123
#endif
124

125
      implicit none
126

127
      class(eT), intent(inout) :: this
128

129
      call this%timer%turn_on()
3,277✔
130

131
      output = output_file('eT.out')
3,277✔
132
      timing = timings_file('eT.timing.out')
3,277✔
133

134
      call output%open_()
3,277✔
135
      call timing%open_()
3,277✔
136

137
      call this%print_top_info_to_output_and_timing()
3,277✔
138

139
      call input%process_input()
3,277✔
140

141
      call this%set_global_print_levels_in_output_and_timing()
3,277✔
142

143
      eT_citations = citation_printer(input)
3,349✔
144
      mem = this%create_memory_manager(input)
3,277✔
145

146
#ifdef USE_LIBINT
147
      call initialize_libint_c() ! Safe to use Libint from now on
1,081✔
148
#endif
149

150
   end subroutine initialize
3,277✔
151

152

153
   subroutine finalize(this)
3,247✔
154
      !!
155
      !! Written by Eirik F. Kjønstad, Mar 2024
156
      !!
157
      use global_out
158
      use global_in
159
      use memory_manager_class, only: mem
160

161
#ifdef USE_LIBINT
162
      use libint_initialization, only: finalize_libint_c
163
#endif
164

165
      implicit none
166

167
      class(eT), intent(inout) :: this
168

169
      call mem%check_for_leak()
3,247✔
170

171
      call input%cleanup()
3,247✔
172

173
      call this%timer%turn_off()
3,247✔
174

175
      call output%check_for_warnings()
3,247✔
176

177
      call this%print_bottom_info_to_output()
3,247✔
178

179
#ifdef USE_LIBINT
180
      call finalize_libint_c() ! No longer safe to use Libint
1,071✔
181
#endif
182

183
      call timing%close_()
3,247✔
184

185
      call output%printf('m', 'eT terminated successfully!', fs='(/t3,a)')
3,247✔
186
      call output%close_()
3,247✔
187

188
   end subroutine finalize
3,247✔
189

190
   subroutine print_timestamp(this, print_label)
6,524✔
191
      !!
192
      !! Written by Eirik F. Kjønstad, May 2022
193
      !!
194
      use global_out, only: output
195

196
      implicit none
197

198
      class(eT), intent(in) :: this
199

200
      character(len=*), intent(in) :: print_label
201

202
      character(len=50) :: timestamp
203

204
      call this%get_date_and_time(timestamp)
6,524✔
205
      call output%printf('m', 'Calculation (a0):', chars=[print_label], fs='(/t3,a)', adv=.false.)
19,572✔
206
      call output%printf('m', "(a0)", chars=[timestamp], fs='(t1,a)')
13,048✔
207

208
   end subroutine print_timestamp
6,524✔
209

210

211
   subroutine get_and_print_n_threads()
3,277✔
212
      !!
213
      !! Written by Eirik F. Kjønstad, May 2022
214
      !!
215
      use omp_lib
216
      use global_out, only: output
217

218
      implicit none
219

220
      integer :: n_threads
221

222
      n_threads = 1
223

224
      !$    n_threads = omp_get_max_threads()
3,277✔
225

226
      if (n_threads .eq. 1) then
3,277✔
227

228
         call output%printf('m', 'Running on (i0) OMP thread', ints=[n_threads], fs='(/t3,a)')
×
229

230
      else
231

232
         call output%printf('m', 'Running on (i0) OMP threads', ints=[n_threads], fs='(/t3,a)')
6,554✔
233

234
      endif
235

236
   end subroutine get_and_print_n_threads
3,277✔
237

238

239
   function create_memory_manager(input) result(mem_manager)
3,277✔
240
      !!
241
      !! Written by Eirik F. Kjønstad, May 2022
242
      !!
243
      use parameters
244
      use memory_manager_class, only: memory_manager
245
      use input_tool_class, only: input_tool
246

247
      implicit none
248

249
      class(input_tool), intent(in) :: input
250

251
      character(len=200) :: mem_unit
252
      integer(i64)       :: mem_total
253

254
      type(memory_manager) :: mem_manager
255

256
      mem_total = 8
3,277✔
257
      mem_unit  = 'gb'
3,277✔
258

259
      call input%get_keyword('available', 'memory', mem_total)
3,277✔
260
      call input%get_keyword('unit',      'memory', mem_unit)
3,277✔
261

262
      mem_manager = memory_manager(total = mem_total, &
263
                                   units = mem_unit)
3,277✔
264

265
   end function create_memory_manager
3,277✔
266

267

268
   subroutine run_calculations(this)
3,265✔
269
      !!
270
      !! Written by Eirik F. Kjønstad, May 2022
271
      !!
272
      use global_out, only: output
273
      use global_in, only: input
274

275
      use hf_class, only: hf
276

277
      implicit none
278

279
      class(eT), intent(in) :: this
280

281
      class(hf), allocatable :: ref_wf
6,500✔
282

283
      logical :: requested_cholesky
284

285
      ! Cholesky decomposition of electron repulsion integrals (ERIs)
286
      requested_cholesky = input%is_keyword_present('cholesky eri', 'do')
3,265✔
287
      if (requested_cholesky) call cholesky_decompose_eris(input%is_keyword_present('diagonal test', 'solver cholesky'))
3,265✔
288

289
      if (input%is_keyword_present('geometry optimization', 'do')) then
3,265✔
290

291
         call this%run_geometry_optimization(ref_wf)
122✔
292

293
      elseif (input%is_keyword_present('harmonic frequencies','do')) then
3,143✔
294

295
         call this%run_harmonic_frequencies(ref_wf)
42✔
296

297
      elseif (input%requested_reference_calculation()) then
3,101✔
298

299
         call this%run_reference_calculation(ref_wf)
3,095✔
300

301
         if (input%requested_cc_calculation()) then
3,077✔
302

303
            call this%run_cc_calculation(ref_wf)
2,001✔
304

305
         else if (input%requested_ci_calculation()) then
1,076✔
306

307
            call this%run_ci_calculation(ref_wf)
372✔
308

309
         endif
310

311
         call ref_wf%cleanup()
3,065✔
312
         deallocate(ref_wf)
6,130✔
313

314
      else
315

316
         if (input%requested_cc_calculation()) &
6✔
317
            call output%error_msg('to run CC calculation reference wavefunction must be specified.')
×
318

319
         if (.not. requested_cholesky) &
6✔
320
            call output%error_msg('no method nor ERI Cholesky decomposition selected in input.')
×
321

322
      endif
323

324
   end subroutine run_calculations
3,235✔
325

326

327
   subroutine run_geometry_optimization(this, ref_wf)
122✔
328
      !!
329
      !! Written by Eirik F. Kjønstad, 2022
330
      !!
331
      use hf_class, only: hf
332
      use ccs_class, only: ccs
333

334
      use reference_wavefunction_factory_class, only: reference_wavefunction_factory
335
      use cc_wavefunction_factory_class, only: cc_wavefunction_factory
336

337
      use geoopt_engine_class, only: geoopt_engine
338

339
      use global_in, only: input
340

341
      implicit none
342

343
      class(eT), intent(in) :: this
344

345
      class(hf), allocatable, intent(inout)              :: ref_wf
346
      class(reference_wavefunction_factory), allocatable :: ref_wf_factory
347

348
      class(geoopt_engine), allocatable :: engine
349

350
      class(ccs), allocatable                    :: cc_wf
298✔
351
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
352

353
      if (.not. input%requested_cc_calculation()) then
122✔
354

355
         ref_wf_factory = reference_wavefunction_factory()
68✔
356
         call ref_wf_factory%create(ref_wf)
68✔
357

358
         engine = geoopt_engine()
68✔
359
         call engine%run(ref_wf)
68✔
360

361
      else
362

363
         call this%run_reference_calculation(ref_wf)
54✔
364

365
         cc_wf_factory = cc_wavefunction_factory()
54✔
366
         call cc_wf_factory%create(ref_wf, cc_wf)
54✔
367

368
         engine = geoopt_engine()
54✔
369
         call engine%run(cc_wf, ref_wf)
54✔
370

371
         call cc_wf%cleanup()
54✔
372

373
      endif
374

375
      call ref_wf%cleanup()
122✔
376
      deallocate(ref_wf)
122✔
377

378
   end subroutine run_geometry_optimization
122✔
379

380

381
   subroutine run_harmonic_frequencies(this, ref_wf)
42✔
382
      !!
383
      !! Written by Eirik F. Kjønstad, 2022
384
      !!
385
      use hf_class, only: hf
386
      use ccs_class, only: ccs
387

388
      use reference_wavefunction_factory_class, only: reference_wavefunction_factory
389
      use cc_wavefunction_factory_class, only: cc_wavefunction_factory
390

391
      use harmonic_frequencies_engine_class, only: harmonic_frequencies_engine
392
      use geoopt_engine_class, only: geoopt_engine
393

394
      use global_in, only: input
395

396
      implicit none
397

398
      class(eT), intent(in) :: this
399

400
      class(hf), allocatable, intent(inout)              :: ref_wf
401
      class(reference_wavefunction_factory), allocatable :: ref_wf_factory
402

403
      class(harmonic_frequencies_engine), allocatable :: engine
404
      class(geoopt_engine), allocatable :: optimization_engine
405

406
      class(ccs), allocatable                    :: cc_wf
108✔
407
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
408

409
      if (.not. input%requested_cc_calculation()) then
42✔
410

411
         ref_wf_factory = reference_wavefunction_factory()
18✔
412
         call ref_wf_factory%create(ref_wf)
18✔
413

414
         if (input%is_keyword_present('run geometry optimization', 'harmonic frequencies')) then
18✔
415

416
            optimization_engine = geoopt_engine()
18✔
417
            call optimization_engine%run(ref_wf)
18✔
418

419
         endif
420

421
         engine = harmonic_frequencies_engine(ref_wf)
18✔
422
         call engine%initialize()
18✔
423
         call engine%run()
18✔
424

425
      else
426

427
         call this%run_reference_calculation(ref_wf)
24✔
428

429
         cc_wf_factory = cc_wavefunction_factory()
24✔
430
         call cc_wf_factory%create(ref_wf, cc_wf)
24✔
431

432
         if (input%is_keyword_present('run geometry optimization', 'harmonic frequencies')) then
24✔
433

434
            optimization_engine = geoopt_engine()
18✔
435
            call optimization_engine%run(cc_wf, ref_wf)
18✔
436

437
         endif
438

439
         engine = harmonic_frequencies_engine(ref_wf, cc_wf)
24✔
440
         call engine%initialize()
24✔
441
         call engine%run()
24✔
442

443
         call cc_wf%cleanup()
24✔
444

445
      endif
446

447
      call ref_wf%cleanup()
42✔
448
      deallocate(ref_wf)
42✔
449

450
   end subroutine run_harmonic_frequencies
42✔
451

452

453
   subroutine run_reference_calculation(ref_wf)
3,173✔
454
      !!
455
      !! Written by Sarai D. Folkestad and Eirik F. Kjønstad, Apr 2019
456
      !!
457
      use hf_class, only: hf
458
      use hf_engine_class, only: hf_engine
459
      use reference_wavefunction_factory_class, only: reference_wavefunction_factory
460
      use reference_engine_factory_class, only: reference_engine_factory
461

462
      implicit none
463

464
      class(hf), allocatable, intent(inout)              :: ref_wf
465
      class(reference_wavefunction_factory), allocatable :: ref_wf_factory
466

467
      class(hf_engine), allocatable  :: ref_engine
6,328✔
468
      type(reference_engine_factory) :: ref_engine_factory
469

470
      ref_wf_factory = reference_wavefunction_factory()
3,173✔
471

472
      call ref_wf_factory%create(ref_wf)
3,173✔
473

474
      call ref_engine_factory%create(ref_engine)
475

476
      call ref_engine%ignite(ref_wf)
3,173✔
477

478
   end subroutine run_reference_calculation
3,155✔
479

480

481
   subroutine run_cc_calculation(ref_wf)
2,001✔
482
      !!
483
      !! Written by Sarai D. Folkestad and Eirik F. Kjønstad, Apr 2019
484
      !!
485
      use hf_class, only: hf
486

487
      use ccs_class,                      only: ccs
488
      use cc_wavefunction_factory_class,  only: cc_wavefunction_factory
489

490
      use cc_engine_class,          only: cc_engine
491
      use cc_engine_factory_class,  only: cc_engine_factory
492

493
      implicit none
494

495
      class(hf), intent(in) :: ref_wf
496

497
      class(ccs), allocatable                    :: cc_wf
5,979✔
498
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
499

500
      class(cc_engine), allocatable        :: engine
3,990✔
501
      type(cc_engine_factory), allocatable :: engine_factory
502

503
      cc_wf_factory = cc_wavefunction_factory()
2,001✔
504
      call cc_wf_factory%create(ref_wf, cc_wf)
2,001✔
505

506
      allocate(cc_engine_factory::engine_factory)
2,001✔
507
      call engine_factory%create(engine)
508

509
      call engine%ignite(cc_wf)
2,001✔
510

511
      call cc_wf%cleanup()
1,989✔
512

513
   end subroutine run_cc_calculation
1,989✔
514

515

516
   subroutine run_ci_calculation(ref_wf)
372✔
517
      !!
518
      !! Written by Enrico Ronca, 2020
519
      !!
520
      use hf_class, only: hf
521

522
      use fci_class,                      only: fci
523
      use ci_wavefunction_factory_class,  only: ci_wavefunction_factory
524

525
      use ci_engine_class, only: ci_engine
526

527
      implicit none
528

529
      class(hf), intent(in) :: ref_wf
530

531
      class(fci), allocatable                     :: ci_wf
744✔
532
      type(ci_wavefunction_factory), allocatable  :: ci_wf_factory
533

534
      class(ci_engine), allocatable :: engine
535

536
      ci_wf_factory = ci_wavefunction_factory()
372✔
537
      call ci_wf_factory%create(ref_wf, ci_wf)
372✔
538

539
      engine = ci_engine()
372✔
540

541
      call engine%ignite(ci_wf)
372✔
542

543
      call ci_wf%cleanup()
372✔
544

545
   end subroutine run_ci_calculation
372✔
546

547

548
   subroutine cholesky_decompose_eris(diagonal_test)
6✔
549
      !!
550
      !! Written by Eirik F. Kjønstad and Sarai D. Folkestad, Apr 2019 and Dec 2019
551
      !!
552
      !! Performs Cholesky decomposition of the electron repulsion integral matrix.
553
      !!
554
      use eri_cd_class,  only: eri_cd
555
      use ao_tool_class, only: ao_tool
556
      use ao_eri_getter_class, only: ao_eri_getter
557

558
      implicit none
559

560
      logical, intent(in) :: diagonal_test
561

562
      type(eri_cd), allocatable  :: eri_cholesky_solver
563
      class(ao_tool), allocatable :: ao
564
      type(ao_eri_getter) :: eri_getter
565

566
      ao = ao_tool()
6✔
567
      call ao%initialize()
6✔
568

569
      eri_getter = ao_eri_getter(ao)
6✔
570
      eri_cholesky_solver = eri_cd(ao, eri_getter)
6✔
571

572
      call eri_cholesky_solver%run(ao)
6✔
573

574
      if (diagonal_test) then
6✔
575

576
         ! Determine the largest deviation in the ERI matrix
577
         call eri_cholesky_solver%diagonal_test(ao)
6✔
578

579
      end if
580

581
      call eri_cholesky_solver%cleanup()
6✔
582

583
   end subroutine cholesky_decompose_eris
6✔
584

585

586
   subroutine set_global_print_levels_in_output_and_timing()
3,277✔
587
      !!
588
      !! Written by Rolf H. Myhre, Oct. 2019
589
      !!
590
      use global_out, only: output, timing
591
      use global_in,  only: input
592

593
      implicit none
594

595
      character(len=200) :: print_level
596

597
      print_level = 'normal'
3,277✔
598
      call input%get_keyword('output print level', 'print', print_level)
3,277✔
599

600
      ! This is the only place this routine is allowed to be called
601
      call output%set_global_print_level(print_level)
3,277✔
602

603
      ! Repeat for timing file
604
      print_level = 'normal'
3,277✔
605
      call input%get_keyword('timing print level', 'print', print_level)
3,277✔
606

607
      ! This is the only place this routine is allowed to be called
608
      call timing%set_global_print_level(print_level)
3,277✔
609

610
   end subroutine set_global_print_levels_in_output_and_timing
3,277✔
611

612

613
   subroutine print_top_info_to_output_and_timing(this)
3,277✔
614
      !!
615
      !! Written by Eirik F. Kjønstad, 2019
616
      !!
617
      use parameters
618
      use global_out, only: output, timing
619

620
      implicit none
621

622
      class(eT), intent(in) :: this
623

624
      call output%printf('m', 'eT (i0).(i0) - an electronic structure program ', &
625
                      ints=[major_version, minor_version], fs='(///t22,a)')
3,277✔
626

627
      call output%print_separator('m',72,'-', fs='(/t3,a)')
3,277✔
628

629
      call output%printf('m', 'Author list in alphabetical order:', fs='(t4,a)')
3,277✔
630

631
      call output%print_separator('m',72,'-', fs='(t3,a)')
3,277✔
632

633
      call output%printf('m', 'R. Alessandro, '          // &
634
                              'J. H. Andersen, '         // &
635
                              'S. Angelico, '            // &
636
                              'A. Balbi, '               // &
637
                              'A. Barlini, '             // &
638
                              'A. Bianchi, '             // &
639
                              'C. Cappelli, '            // &
640
                              'M. Castagnola, '          // &
641
                              'S. Coriani, '             // &
642
                              'S. D. Folkestad, '        // &
643
                              'Y. El Moutaoukal, '       // &
644
                              'T. Giovannini, '          // &
645
                              'L. Goletto, '             // &
646
                              'T. S. Haugland, '         // &
647
                              'A. Hutcheson, '           // &
648
                              'I-M. Høyvik, '            // &
649
                              'E. F. Kjønstad, '         // &
650
                              'H. Koch, '                // &
651
                              'M. T. Lexander, '         // &
652
                              'G. Marrazzini, '          // &
653
                              'T. Moitra, '              // &
654
                              'R. H. Myhre, '            // &
655
                              'Y. Os, '                  // &
656
                              'A. C. Paul, '             // &
657
                              'R. Paul, '                // &
658
                              'J. Pedersen, '            // &
659
                              'M. Rinaldi, '             // &
660
                              'R. R. Riso, '             // &
661
                              'S. Roet, '                // &
662
                              'E. Ronca, '               // &
663
                              'F. Rossi, '               // &
664
                              'B. S. Sannes, '           // &
665
                              'M. Scavino, '             // &
666
                              'A. K. Schnack-Petersen, ' // &
667
                              'A. S. Skeidsvoll, '       // &
668
                              'J. H. M. Trabski, '       // &
669
                              'Å. H. Tveten',               &
670
                              ffs='(t4,a)', fs='(t4,a)', ll=68)
3,277✔
671

672
      call output%print_separator('m',72,'-', fs='(t3,a)')
3,277✔
673

674
      call output%printf('m', 'J. Chem. Phys. 152, 184103 (2020); https://doi.org/10.1063/5.0004713', &
675
                      fs='(t4,a)')
3,277✔
676

677
      call output%printf('m', "This is eT (i0).(i0).(i0) (a0)", &
678
                         ints=[major_version, minor_version, patch_version], &
679
                         chars = [version_name], fs='(//t4,a)')
6,554✔
680

681
      call this%print_compilation_info(output)
3,277✔
682
      call this%print_compilation_info(timing)
3,277✔
683

684
      call timing%print_banner()
3,277✔
685

686
      call this%print_timestamp(print_label = 'start')
3,277✔
687

688
      call this%get_and_print_n_threads()
3,277✔
689

690
   end subroutine print_top_info_to_output_and_timing
3,277✔
691

692

693
   subroutine print_bottom_info_to_output(this)
3,247✔
694
      !!
695
      !! Written by Eirik F. Kjønstad, May 2022
696
      !!
697
      use memory_manager_class, only: mem
698
      use citation_printer_class, only: eT_citations
699
      use global_out, only: output
700

701
      implicit none
702

703
      class(eT), intent(in) :: this
704

705
      call mem%print_max_used()
3,247✔
706

707
      call this%timer%print_to_file(output, string="in eT")
3,247✔
708

709
      call this%print_timestamp(print_label = 'end')
3,247✔
710

711
      call eT_citations%print_(output)
3,247✔
712

713
   end subroutine print_bottom_info_to_output
3,247✔
714

715

716
   subroutine get_date_and_time(string)
6,524✔
717
      !!
718
      !! Written by Rolf H. Myhre, Nov, 2020
719
      !!
720
      !! Returns a formatted string with date, time and UTC offset
721
      !!
722
      !! Format: yyyy-mm-dd hh:mm:ss UTC xhh:mm
723
      !!
724
      implicit none
725

726
      character(len=*), intent(out) :: string
727
      character(len=20) :: date, time, zone
728

729
      call date_and_time(date=date, time=time, zone=zone)
6,524✔
730

731
      string = ""
6,524✔
732
      write(string, "(a,a,a,a,a,a)") date(1:4), "-", date(5:6), "-", date(7:8), " "
6,524✔
733
      write(string(12:), "(a,a,a,a,a)") time(1:2), ":", time(3:4), ":", time(5:6)
6,524✔
734
      write(string(20:), "(a,a,a,a)") " UTC ", zone(1:3), ":", zone(4:5)
6,524✔
735

736
   end subroutine get_date_and_time
6,524✔
737

738

739
   subroutine print_compilation_info(file_)
6,554✔
740
      !!
741
      !! Written by Rolf H. Myhre, Nov, 2020
742
      !!
743
      !! Retrieves compilation information from the
744
      !! get_compilation_info library generated by CMake
745
      !! and prints to output
746
      !!
747
      use output_file_class, only: output_file
748

749
      implicit none
750

751
      class(output_file), intent(inout) :: file_
752

753
      character(len=200) :: string
754

755
      call file_%print_separator('n',61,'-', fs='(t3,a)')
6,554✔
756

757
      call get_configuration_time(string)
6,554✔
758
      call file_%printf("m", "Configuration date:  (a0)", chars =[string])
13,108✔
759

760
      call get_git_branch(string)
6,554✔
761
      if(len_trim(string) .gt. 0) then
6,554✔
762
         call file_%printf("m", "Git branch:          (a0)", chars =[string])
×
763

764
         call get_git_hash(string)
×
765
         call file_%printf("m", "Git hash:            (a0)", chars =[string])
×
766
      endif
767

768
      call get_fortran_compiler(string)
6,554✔
769
      call file_%printf("m", "Fortran compiler:    (a0)", chars =[string])
13,108✔
770

771
      call get_c_compiler(string)
6,554✔
772
      call file_%printf("m", "C compiler:          (a0)", chars =[string])
13,108✔
773

774
      call get_cxx_compiler(string)
6,554✔
775
      call file_%printf("m", "C++ compiler:        (a0)", chars =[string])
13,108✔
776

777
      call get_lapack_type(string)
6,554✔
778
      call file_%printf("m", "LAPACK type:         (a0)", chars =[string])
13,108✔
779

780
      call get_blas_type(string)
6,554✔
781
      call file_%printf("m", "BLAS type:           (a0)", chars =[string])
13,108✔
782

783
      call get_oei_type(string)
6,554✔
784
      call file_%printf("m", "OEI type:            (a0)", chars =[string])
13,108✔
785

786
      call get_eri_type(string)
6,554✔
787
      call file_%printf("m", "ERI type:            (a0)", chars =[string])
13,108✔
788

789
      call get_int64(string)
6,554✔
790
      call file_%printf("m", "64-bit integers:     (a0)", chars =[string])
13,108✔
791

792
      call get_omp(string)
6,554✔
793
      call file_%printf("m", "OpenMP:              (a0)", chars =[string])
13,108✔
794

795
      call get_pcm(string)
6,554✔
796
      call file_%printf("m", "PCM:                 (a0)", chars =[string])
13,108✔
797

798
      call get_forced_batching(string)
6,554✔
799
      call file_%printf("m", "Forced batching:     (a0)", chars =[string])
13,108✔
800

801
      call get_runtime_check(string)
6,554✔
802
      call file_%printf("m", "Runtime checks:      (a0)", chars =[string])
13,108✔
803

804
      call get_initialize_nan_check(string)
6,554✔
805
      call file_%printf("m", "Initializing to NAN: (a0)", chars =[string])
13,108✔
806

807
      call file_%print_separator("m",61,"-", fs="(t3,a)")
6,554✔
808

809
   end subroutine print_compilation_info
6,554✔
810

811

812
end module eT_class
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc