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

eT-program / eT / 23895

04 Sep 2025 11:02PM UTC coverage: 88.582% (-0.02%) from 88.597%
23895

push

gitlab-ci

Merge branch 'cleanup-td-prints' into 'development'

Cleanup of oscillator and rotatory strengths output

See merge request eT-program/eT!1578

53979 of 60937 relevant lines covered (88.58%)

3115005.9 hits per line

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

94.51
/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 :: check_do_section_for_conflicting_keywords
53

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

61
      procedure, private :: print_top_info_to_output_and_timing
62
      procedure, private :: print_bottom_info_to_output
63

64
   end type eT
65

66

67
   interface eT
68

69
      procedure :: new_eT
70

71
   end interface eT
72

73

74
contains
75

76

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

83
      type(eT) :: this
84

85
      this%timer = timings("Total time in eT", pl='minimal')
3,265✔
86

87
   end function new_eT
3,265✔
88

89

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

97
      implicit none
98

99
      class(eT), intent(inout) :: this
100

101
      input = input_tool()
3,253✔
102
      call input%read_input(file_name='eT.inp')
3,253✔
103

104
      call this%initialize()
3,253✔
105

106
      call this%run_calculations()
3,253✔
107

108
      call this%finalize()
3,223✔
109

110
   end subroutine run
3,223✔
111

112

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

123
#ifdef USE_LIBINT
124
      use libint_initialization, only: initialize_libint_c
125
#endif
126

127
      implicit none
128

129
      class(eT), intent(inout) :: this
130

131
      call this%timer%turn_on()
3,265✔
132

133
      output = output_file('eT.out')
3,265✔
134
      timing = timings_file('eT.timing.out')
3,265✔
135

136
      call output%open_()
3,265✔
137
      call timing%open_()
3,265✔
138

139
      call this%print_top_info_to_output_and_timing()
3,265✔
140

141
      call input%process_input()
3,265✔
142

143
      call this%set_global_print_levels_in_output_and_timing()
3,265✔
144

145
      eT_citations = citation_printer(input)
3,337✔
146
      mem = this%create_memory_manager(input)
3,265✔
147

148
#ifdef USE_LIBINT
149
      call initialize_libint_c() ! Safe to use Libint from now on
1,077✔
150
#endif
151

152
   end subroutine initialize
3,265✔
153

154

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

163
#ifdef USE_LIBINT
164
      use libint_initialization, only: finalize_libint_c
165
#endif
166

167
      implicit none
168

169
      class(eT), intent(inout) :: this
170

171
      call mem%check_for_leak()
3,235✔
172

173
      call input%cleanup()
3,235✔
174

175
      call this%timer%turn_off()
3,235✔
176

177
      call output%check_for_warnings()
3,235✔
178

179
      call this%print_bottom_info_to_output()
3,235✔
180

181
#ifdef USE_LIBINT
182
      call finalize_libint_c() ! No longer safe to use Libint
1,067✔
183
#endif
184

185
      call timing%close_()
3,235✔
186

187
      call output%printf('m', 'eT terminated successfully!', fs='(/t3,a)')
3,235✔
188
      call output%close_()
3,235✔
189

190
   end subroutine finalize
3,235✔
191

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

198
      implicit none
199

200
      class(eT), intent(in) :: this
201

202
      character(len=*), intent(in) :: print_label
203

204
      character(len=50) :: timestamp
205

206
      call this%get_date_and_time(timestamp)
6,500✔
207
      call output%printf('m', 'Calculation (a0):', chars=[print_label], fs='(/t3,a)', adv=.false.)
19,500✔
208
      call output%printf('m', " (a0)", chars=[timestamp], fs='(t1,a)')
13,000✔
209

210
   end subroutine print_timestamp
6,500✔
211

212

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

220
      implicit none
221

222
      integer :: n_threads
223

224
      n_threads = 1
225

226
      !$    n_threads = omp_get_max_threads()
3,265✔
227

228
      if (n_threads .eq. 1) then
3,265✔
229

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

232
      else
233

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

236
      endif
237

238
   end subroutine get_and_print_n_threads
3,265✔
239

240

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

249
      implicit none
250

251
      class(input_tool), intent(in) :: input
252

253
      character(len=200) :: mem_unit
254
      integer(i64)       :: mem_total
255

256
      type(memory_manager) :: mem_manager
257

258
      mem_total = 8
3,265✔
259
      mem_unit  = 'gb'
3,265✔
260

261
      call input%get_keyword('available', 'memory', mem_total)
3,265✔
262
      call input%get_keyword('unit',      'memory', mem_unit)
3,265✔
263

264
      mem_manager = memory_manager(total = mem_total, &
265
                                   units = mem_unit)
3,265✔
266

267
   end function create_memory_manager
3,265✔
268

269

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

277
      use hf_class, only: hf
278

279
      implicit none
280

281
      class(eT), intent(in) :: this
282

283
      class(hf), allocatable :: ref_wf
6,476✔
284

285
      logical :: requested_cholesky
286

287
      call check_do_section_for_conflicting_keywords()
3,253✔
288

289
      ! Cholesky decomposition of electron repulsion integrals (ERIs)
290
      requested_cholesky = input%is_keyword_present('cholesky eri', 'do')
3,253✔
291
      if (requested_cholesky) call cholesky_decompose_eris(input%is_keyword_present('diagonal test', 'solver cholesky'))
3,253✔
292

293
      if (input%is_keyword_present('geometry optimization', 'do')) then
3,253✔
294

295
         call this%run_geometry_optimization(ref_wf)
122✔
296

297
      elseif (input%is_keyword_present('harmonic frequencies','do')) then
3,131✔
298

299
         call this%run_harmonic_frequencies(ref_wf)
42✔
300

301
      elseif (input%requested_reference_calculation()) then
3,089✔
302

303
         call this%run_reference_calculation(ref_wf)
3,083✔
304

305
         if (input%requested_cc_calculation()) then
3,065✔
306

307
            call this%run_cc_calculation(ref_wf)
1,989✔
308

309
         else if (input%requested_ci_calculation()) then
1,076✔
310

311
            call this%run_ci_calculation(ref_wf)
372✔
312

313
         endif
314

315
         call ref_wf%cleanup()
3,053✔
316
         deallocate(ref_wf)
6,106✔
317

318
      else
319

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

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

326
      endif
327

328
   end subroutine run_calculations
3,223✔
329

330

331
   subroutine check_do_section_for_conflicting_keywords()
3,253✔
332
      !!
333
      !! Written by Leo Stoll, 2025
334
      !!
335
      !! Checks if the do section contains keywords for multiple engines.
336
      !! Note that the keywords 'restart' and 'cholesky eri' do not specify an engine.
337
      !!
338
      use global_out, only: output
339
      use global_in, only: input
340

341
      implicit none
342

343
      character(len=200), dimension(:), allocatable :: keywords
3,253✔
344
      character(len=200), dimension(:), allocatable :: keywords_masked
345
      logical, dimension(:), allocatable            :: mask
346
      character(len=:), allocatable                 :: keywords_string
347

348
      integer :: i
349

350
      call input%get_present_keywords('do', keywords)
3,253✔
351

352
      mask = [( trim(keywords(i)) /= 'restart' .and. trim(keywords(i)) /= 'cholesky eri', i=1, size(keywords) )]
13,516✔
353
      keywords_masked = pack(keywords, mask)
3,253✔
354

355
      if (size(keywords_masked) .gt. 1) then
3,253✔
356

357
         keywords_string = ""
×
358
         do i = 1, size(keywords_masked)
×
359

360
            if (i > 1) keywords_string = keywords_string // ","
×
361
            keywords_string = trim(keywords_string) // "'" // trim(keywords_masked(i)) // "'"
×
362

363
         end do
364

365
         call output%error_msg("Keywords for multiple types of calculations specified in the do section. &
366
                              &Only one of the specified keywords " // keywords_string // " can be included. &
367
                              &It is possible that these types of calculations are conflicting or that one &
368
                              &implies the other. Check 'https://etprogram.org/required_sections.html#do' for details")
×
369

370
         deallocate(keywords_string)
×
371

372
      end if
373

374
      deallocate(keywords)
3,253✔
375
      deallocate(keywords_masked)
3,253✔
376
      deallocate(mask)
3,253✔
377

378
   end subroutine check_do_section_for_conflicting_keywords
3,253✔
379

380

381
   subroutine run_geometry_optimization(this, ref_wf)
122✔
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 geoopt_engine_class, only: geoopt_engine
392

393
      use global_in, only: input
394

395
      implicit none
396

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

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

402
      class(geoopt_engine), allocatable :: engine
403

404
      class(ccs), allocatable                    :: cc_wf
298✔
405
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
406

407
      if (.not. input%requested_cc_calculation()) then
122✔
408

409
         ref_wf_factory = reference_wavefunction_factory()
68✔
410
         call ref_wf_factory%create(ref_wf)
68✔
411

412
         engine = geoopt_engine()
68✔
413
         call engine%run(ref_wf)
68✔
414

415
      else
416

417
         call this%run_reference_calculation(ref_wf)
54✔
418

419
         cc_wf_factory = cc_wavefunction_factory()
54✔
420
         call cc_wf_factory%create(ref_wf, cc_wf)
54✔
421

422
         engine = geoopt_engine()
54✔
423
         call engine%run(cc_wf, ref_wf)
54✔
424

425
         call cc_wf%cleanup()
54✔
426

427
      endif
428

429
      call ref_wf%cleanup()
122✔
430
      deallocate(ref_wf)
122✔
431

432
   end subroutine run_geometry_optimization
122✔
433

434

435
   subroutine run_harmonic_frequencies(this, ref_wf)
42✔
436
      !!
437
      !! Written by Eirik F. Kjønstad, 2022
438
      !!
439
      use hf_class, only: hf
440
      use ccs_class, only: ccs
441

442
      use reference_wavefunction_factory_class, only: reference_wavefunction_factory
443
      use cc_wavefunction_factory_class, only: cc_wavefunction_factory
444

445
      use harmonic_frequencies_engine_class, only: harmonic_frequencies_engine
446
      use geoopt_engine_class, only: geoopt_engine
447

448
      use global_in, only: input
449

450
      implicit none
451

452
      class(eT), intent(in) :: this
453

454
      class(hf), allocatable, intent(inout)              :: ref_wf
455
      class(reference_wavefunction_factory), allocatable :: ref_wf_factory
456

457
      class(harmonic_frequencies_engine), allocatable :: engine
458
      class(geoopt_engine), allocatable :: optimization_engine
459

460
      class(ccs), allocatable                    :: cc_wf
108✔
461
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
462

463
      if (.not. input%requested_cc_calculation()) then
42✔
464

465
         ref_wf_factory = reference_wavefunction_factory()
18✔
466
         call ref_wf_factory%create(ref_wf)
18✔
467

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

470
            optimization_engine = geoopt_engine()
18✔
471
            call optimization_engine%run(ref_wf)
18✔
472

473
         endif
474

475
         engine = harmonic_frequencies_engine(ref_wf)
18✔
476
         call engine%initialize()
18✔
477
         call engine%run()
18✔
478

479
      else
480

481
         call this%run_reference_calculation(ref_wf)
24✔
482

483
         cc_wf_factory = cc_wavefunction_factory()
24✔
484
         call cc_wf_factory%create(ref_wf, cc_wf)
24✔
485

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

488
            optimization_engine = geoopt_engine()
18✔
489
            call optimization_engine%run(cc_wf, ref_wf)
18✔
490

491
         endif
492

493
         engine = harmonic_frequencies_engine(ref_wf, cc_wf)
24✔
494
         call engine%initialize()
24✔
495
         call engine%run()
24✔
496

497
         call cc_wf%cleanup()
24✔
498

499
      endif
500

501
      call ref_wf%cleanup()
42✔
502
      deallocate(ref_wf)
42✔
503

504
   end subroutine run_harmonic_frequencies
42✔
505

506

507
   subroutine run_reference_calculation(ref_wf)
3,161✔
508
      !!
509
      !! Written by Sarai D. Folkestad and Eirik F. Kjønstad, Apr 2019
510
      !!
511
      use hf_class, only: hf
512
      use hf_engine_class, only: hf_engine
513
      use reference_wavefunction_factory_class, only: reference_wavefunction_factory
514
      use reference_engine_factory_class, only: reference_engine_factory
515

516
      implicit none
517

518
      class(hf), allocatable, intent(inout)              :: ref_wf
519
      class(reference_wavefunction_factory), allocatable :: ref_wf_factory
520

521
      class(hf_engine), allocatable  :: ref_engine
6,304✔
522
      type(reference_engine_factory) :: ref_engine_factory
523

524
      ref_wf_factory = reference_wavefunction_factory()
3,161✔
525

526
      call ref_wf_factory%create(ref_wf)
3,161✔
527

528
      call ref_engine_factory%create(ref_engine)
529

530
      call ref_engine%ignite(ref_wf)
3,161✔
531

532
   end subroutine run_reference_calculation
3,143✔
533

534

535
   subroutine run_cc_calculation(ref_wf)
1,989✔
536
      !!
537
      !! Written by Sarai D. Folkestad and Eirik F. Kjønstad, Apr 2019
538
      !!
539
      use hf_class, only: hf
540

541
      use ccs_class,                      only: ccs
542
      use cc_wavefunction_factory_class,  only: cc_wavefunction_factory
543

544
      use cc_engine_class,          only: cc_engine
545
      use cc_engine_factory_class,  only: cc_engine_factory
546

547
      implicit none
548

549
      class(hf), intent(in) :: ref_wf
550

551
      class(ccs), allocatable                    :: cc_wf
5,943✔
552
      type(cc_wavefunction_factory), allocatable :: cc_wf_factory
553

554
      class(cc_engine), allocatable        :: engine
3,966✔
555
      type(cc_engine_factory), allocatable :: engine_factory
556

557
      cc_wf_factory = cc_wavefunction_factory()
1,989✔
558
      call cc_wf_factory%create(ref_wf, cc_wf)
1,989✔
559

560
      allocate(cc_engine_factory::engine_factory)
1,989✔
561
      call engine_factory%create(engine)
562

563
      call engine%ignite(cc_wf)
1,989✔
564

565
      call cc_wf%cleanup()
1,977✔
566

567
   end subroutine run_cc_calculation
1,977✔
568

569

570
   subroutine run_ci_calculation(ref_wf)
372✔
571
      !!
572
      !! Written by Enrico Ronca, 2020
573
      !!
574
      use hf_class, only: hf
575

576
      use fci_class,                      only: fci
577
      use ci_wavefunction_factory_class,  only: ci_wavefunction_factory
578

579
      use ci_engine_class, only: ci_engine
580

581
      implicit none
582

583
      class(hf), intent(in) :: ref_wf
584

585
      class(fci), allocatable                     :: ci_wf
744✔
586
      type(ci_wavefunction_factory), allocatable  :: ci_wf_factory
587

588
      class(ci_engine), allocatable :: engine
589

590
      ci_wf_factory = ci_wavefunction_factory()
372✔
591
      call ci_wf_factory%create(ref_wf, ci_wf)
372✔
592

593
      engine = ci_engine()
372✔
594

595
      call engine%ignite(ci_wf)
372✔
596

597
      call ci_wf%cleanup()
372✔
598

599
   end subroutine run_ci_calculation
372✔
600

601

602
   subroutine cholesky_decompose_eris(diagonal_test)
6✔
603
      !!
604
      !! Written by Eirik F. Kjønstad and Sarai D. Folkestad, Apr 2019 and Dec 2019
605
      !!
606
      !! Performs Cholesky decomposition of the electron repulsion integral matrix.
607
      !!
608
      use eri_cd_class,  only: eri_cd
609
      use ao_tool_class, only: ao_tool
610
      use ao_eri_getter_class, only: ao_eri_getter
611

612
      implicit none
613

614
      logical, intent(in) :: diagonal_test
615

616
      type(eri_cd), allocatable  :: eri_cholesky_solver
617
      class(ao_tool), allocatable :: ao
618
      type(ao_eri_getter) :: eri_getter
619

620
      ao = ao_tool()
6✔
621
      call ao%initialize()
6✔
622

623
      eri_getter = ao_eri_getter(ao)
6✔
624
      eri_cholesky_solver = eri_cd(ao, eri_getter)
6✔
625

626
      call eri_cholesky_solver%run(ao)
6✔
627

628
      if (diagonal_test) then
6✔
629

630
         ! Determine the largest deviation in the ERI matrix
631
         call eri_cholesky_solver%diagonal_test(ao)
6✔
632

633
      end if
634

635
      call eri_cholesky_solver%cleanup()
6✔
636

637
   end subroutine cholesky_decompose_eris
6✔
638

639

640
   subroutine set_global_print_levels_in_output_and_timing()
3,265✔
641
      !!
642
      !! Written by Rolf H. Myhre, Oct. 2019
643
      !!
644
      use global_out, only: output, timing
645
      use global_in,  only: input
646

647
      implicit none
648

649
      character(len=200) :: print_level
650

651
      print_level = 'normal'
3,265✔
652
      call input%get_keyword('output print level', 'print', print_level)
3,265✔
653

654
      ! This is the only place this routine is allowed to be called
655
      call output%set_global_print_level(print_level)
3,265✔
656

657
      ! Repeat for timing file
658
      print_level = 'normal'
3,265✔
659
      call input%get_keyword('timing print level', 'print', print_level)
3,265✔
660

661
      ! This is the only place this routine is allowed to be called
662
      call timing%set_global_print_level(print_level)
3,265✔
663

664
   end subroutine set_global_print_levels_in_output_and_timing
3,265✔
665

666

667
   subroutine print_top_info_to_output_and_timing(this)
3,265✔
668
      !!
669
      !! Written by Eirik F. Kjønstad, 2019
670
      !!
671
      use parameters
672
      use global_out, only: output, timing
673

674
      implicit none
675

676
      class(eT), intent(in) :: this
677

678
      call output%printf('m', 'eT (i0).(i0) - an electronic structure program ', &
679
                      ints=[major_version, minor_version], fs='(///t22,a)')
3,265✔
680

681
      call output%print_separator('m',72,'-', fs='(/t3,a)')
3,265✔
682

683
      call output%printf('m', 'Author list in alphabetical order:', fs='(t4,a)')
3,265✔
684

685
      call output%print_separator('m',72,'-', fs='(t3,a)')
3,265✔
686

687
      call output%printf('m', 'R. Alessandro, '          // &
688
                              'J. H. Andersen, '         // &
689
                              'S. Angelico, '            // &
690
                              'A. Balbi, '               // &
691
                              'A. Barlini, '             // &
692
                              'A. Bianchi, '             // &
693
                              'C. Cappelli, '            // &
694
                              'M. Castagnola, '          // &
695
                              'S. Coriani, '             // &
696
                              'S. D. Folkestad, '        // &
697
                              'Y. El Moutaoukal, '       // &
698
                              'T. Giovannini, '          // &
699
                              'L. Goletto, '             // &
700
                              'T. S. Haugland, '         // &
701
                              'A. Hutcheson, '           // &
702
                              'I-M. Høyvik, '            // &
703
                              'E. F. Kjønstad, '         // &
704
                              'H. Koch, '                // &
705
                              'M. T. Lexander, '         // &
706
                              'D. Lipovec, '             // &
707
                              'G. Marrazzini, '          // &
708
                              'T. Moitra, '              // &
709
                              'R. H. Myhre, '            // &
710
                              'Y. Os, '                  // &
711
                              'A. C. Paul, '             // &
712
                              'R. Paul, '                // &
713
                              'J. Pedersen, '            // &
714
                              'M. Rinaldi, '             // &
715
                              'R. R. Riso, '             // &
716
                              'S. Roet, '                // &
717
                              'E. Ronca, '               // &
718
                              'F. Rossi, '               // &
719
                              'B. S. Sannes, '           // &
720
                              'M. Scavino, '             // &
721
                              'A. K. Schnack-Petersen, ' // &
722
                              'A. S. Skeidsvoll, '       // &
723
                              'L. Stoll, '               // &
724
                              'G. Thiam, '               // &
725
                              'J. H. M. Trabski, '       // &
726
                              'Å. H. Tveten',               &
727
                              ffs='(t4,a)', fs='(t4,a)', ll=68)
3,265✔
728

729
      call output%print_separator('m',72,'-', fs='(t3,a)')
3,265✔
730

731
      call output%printf('m', 'J. Chem. Phys. 152, 184103 (2020); https://doi.org/10.1063/5.0004713', &
732
                      fs='(t4,a)')
3,265✔
733

734
      call output%printf('m', "This is eT (i0).(i0).(i0) (a0)", &
735
                         ints=[major_version, minor_version, patch_version], &
736
                         chars = [version_name], fs='(//t4,a)')
6,530✔
737

738
      call this%print_compilation_info(output)
3,265✔
739
      call this%print_compilation_info(timing)
3,265✔
740

741
      call timing%print_banner()
3,265✔
742

743
      call this%print_timestamp(print_label = 'start')
3,265✔
744

745
      call this%get_and_print_n_threads()
3,265✔
746

747
   end subroutine print_top_info_to_output_and_timing
3,265✔
748

749

750
   subroutine print_bottom_info_to_output(this)
3,235✔
751
      !!
752
      !! Written by Eirik F. Kjønstad, May 2022
753
      !!
754
      use memory_manager_class, only: mem
755
      use citation_printer_class, only: eT_citations
756
      use global_out, only: output
757

758
      implicit none
759

760
      class(eT), intent(in) :: this
761

762
      call mem%print_max_used()
3,235✔
763

764
      call this%timer%print_to_file(output, string="in eT")
3,235✔
765

766
      call this%print_timestamp(print_label = 'end')
3,235✔
767

768
      call eT_citations%print_(output)
3,235✔
769

770
   end subroutine print_bottom_info_to_output
3,235✔
771

772

773
   subroutine get_date_and_time(string)
6,500✔
774
      !!
775
      !! Written by Rolf H. Myhre, Nov, 2020
776
      !!
777
      !! Returns a formatted string with date, time and UTC offset
778
      !!
779
      !! Format: yyyy-mm-dd hh:mm:ss UTC xhh:mm
780
      !!
781
      implicit none
782

783
      character(len=*), intent(out) :: string
784
      character(len=20) :: date, time, zone
785

786
      call date_and_time(date=date, time=time, zone=zone)
6,500✔
787

788
      string = ""
6,500✔
789
      write(string, "(a,a,a,a,a,a)") date(1:4), "-", date(5:6), "-", date(7:8), " "
6,500✔
790
      write(string(12:), "(a,a,a,a,a)") time(1:2), ":", time(3:4), ":", time(5:6)
6,500✔
791
      write(string(20:), "(a,a,a,a)") " UTC ", zone(1:3), ":", zone(4:5)
6,500✔
792

793
   end subroutine get_date_and_time
6,500✔
794

795

796
   subroutine print_compilation_info(file_)
6,530✔
797
      !!
798
      !! Written by Rolf H. Myhre, Nov, 2020
799
      !!
800
      !! Retrieves compilation information from the
801
      !! get_compilation_info library generated by CMake
802
      !! and prints to output
803
      !!
804
      use output_file_class, only: output_file
805

806
      implicit none
807

808
      class(output_file), intent(inout) :: file_
809

810
      character(len=200) :: string
811

812
      call file_%print_separator('n',61,'-', fs='(t3,a)')
6,530✔
813

814
      call get_configuration_time(string)
6,530✔
815
      call file_%printf("m", "Configuration date:  (a0)", chars =[string])
13,060✔
816

817
      call get_git_branch(string)
6,530✔
818
      if(len_trim(string) .gt. 0) then
6,530✔
819
         call file_%printf("m", "Git branch:          (a0)", chars =[string])
×
820

821
         call get_git_hash(string)
×
822
         call file_%printf("m", "Git hash:            (a0)", chars =[string])
×
823
      endif
824

825
      call get_fortran_compiler(string)
6,530✔
826
      call file_%printf("m", "Fortran compiler:    (a0)", chars =[string])
13,060✔
827

828
      call get_c_compiler(string)
6,530✔
829
      call file_%printf("m", "C compiler:          (a0)", chars =[string])
13,060✔
830

831
      call get_cxx_compiler(string)
6,530✔
832
      call file_%printf("m", "C++ compiler:        (a0)", chars =[string])
13,060✔
833

834
      call get_lapack_type(string)
6,530✔
835
      call file_%printf("m", "LAPACK type:         (a0)", chars =[string])
13,060✔
836

837
      call get_blas_type(string)
6,530✔
838
      call file_%printf("m", "BLAS type:           (a0)", chars =[string])
13,060✔
839

840
      call get_oei_type(string)
6,530✔
841
      call file_%printf("m", "OEI type:            (a0)", chars =[string])
13,060✔
842

843
      call get_eri_type(string)
6,530✔
844
      call file_%printf("m", "ERI type:            (a0)", chars =[string])
13,060✔
845

846
      call get_int64(string)
6,530✔
847
      call file_%printf("m", "64-bit integers:     (a0)", chars =[string])
13,060✔
848

849
      call get_omp(string)
6,530✔
850
      call file_%printf("m", "OpenMP:              (a0)", chars =[string])
13,060✔
851

852
      call get_pcm(string)
6,530✔
853
      call file_%printf("m", "PCM:                 (a0)", chars =[string])
13,060✔
854

855
      call get_forced_batching(string)
6,530✔
856
      call file_%printf("m", "Forced batching:     (a0)", chars =[string])
13,060✔
857

858
      call get_runtime_check(string)
6,530✔
859
      call file_%printf("m", "Runtime checks:      (a0)", chars =[string])
13,060✔
860

861
      call get_initialize_nan_check(string)
6,530✔
862
      call file_%printf("m", "Initializing to NAN: (a0)", chars =[string])
13,060✔
863

864
      call file_%print_separator("m",61,"-", fs="(t3,a)")
6,530✔
865

866
   end subroutine print_compilation_info
6,530✔
867

868

869
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