TABLE OF CONTENTS


ABINIT/dummy_tests [ Programs ]

[ Top ] [ Programs ]

NAME

 dummy_tests

FUNCTION

 This code is supposed to be compiled, and generate warnings when it does not fulfills the abirules.
 This is a way to check that the testing capabilities are not lost when the test farm is modified ...

COPYRIGHT

 Copyright (C) 2017-2024 ABINIT group (XG)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .
 For the initials of contributors, see ~abinit/doc/developers/contributors.txt

INPUTS

  (main routine)

OUTPUT

  (main routine)

NOTES

 The heading of the constituted database is read,
 then the heading of the temporary database to be added is read,
 the code check their compatibility, and create a new
 database that mixes the old and the temporary ones.
 This process can be iterated.
 The whole database will be stored in
 central memory. One could introduce a third mode in which
 only the temporary DDB is in central memory, while the
 input DDB is read twice : first to make a table of blocks,
 counting the final number of blocks, and second to merge
 the two DDBs. This would save memory.

SOURCE

37 #if defined HAVE_CONFIG_H
38 #include "config.h"
39 #endif
40 
41 #include "abi_common.h"
42 
43 program dummy_tests
44 
45  use defs_basis
46  use m_abicore
47  use m_errors
48  use m_xmpi
49  use m_dummy_tests
50  use m_build_info,   only : abinit_version
51  implicit none
52 
53 !Local variables-------------------------------
54 !scalars
55  integer :: comm,dummy_out,my_rank
56  integer :: unused_arg,used_arg,used_variable,unused_variable
57 !arrays
58  character(len=10) :: dummy_string
59 
60 !******************************************************************
61 
62  ! Change communicator for I/O (mandatory!)
63  call abi_io_redirect(new_io_comm=xmpi_world)
64 
65  ! Initialize MPI
66  call xmpi_init()
67  comm = xmpi_world; my_rank = xmpi_comm_rank(comm)
68 
69  ! Initialize memory profiling if it is activated
70  ! if a full abimem.mocc report is desired, set the argument of abimem_init to "2" instead of "0"
71  ! note that abimem.mocc files can easily be multiple GB in size so don't use this option normally
72 #ifdef HAVE_MEM_PROFILING
73  call abimem_init(0)
74 #endif
75 
76 !**********************************************************************
77 
78  used_variable=1
79  used_arg=used_variable
80  call test_unused_arg(used_arg,unused_arg)
81  write(std_out,'(a,i4)')' dummy_tests : used_arg is ',used_arg
82 
83  call test_same_actual_arg(dummy_out,dummy_out,used_arg)
84 
85  dummy_string="This is too long !"
86 
87  call test_dummy(dummy_out,used_arg)
88 
89 !**********************************************************************
90 
91  100 call xmpi_end()
92 
93  end program dummy_tests