TABLE OF CONTENTS
ABINIT/m_global [ Modules ]
NAME
m_global
FUNCTION
Manage error and warnings for the ctqmc
COPYRIGHT
Copyright (C) 2013-2024 ABINIT group (J. Bieder) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
NOTES
SOURCE
22 #include "defs.h" 23 24 MODULE m_Global 25 26 #if defined HAVE_CONFIG_H 27 ! we are in abinit 28 USE defs_basis 29 USE m_profiling_abi 30 USE m_errors 31 USE m_xmpi 32 #endif 33 #ifdef HAVE_MPI2 34 USE mpi 35 #endif 36 37 IMPLICIT NONE 38 39 PUBLIC 40 41 PUBLIC :: ERROR 42 PUBLIC :: WARN 43 PUBLIC :: WARNALL 44 45 CONTAINS
ABINIT/m_global/ERROR [ Functions ]
NAME
ERROR
FUNCTION
error dectected => leave
COPYRIGHT
Copyright (C) 2013-2024 ABINIT group (J. Bieder) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
INPUTS
message=error message to display
OUTPUT
SIDE EFFECTS
NOTES
SOURCE
72 SUBROUTINE ERROR(message) 73 74 !Arguments ------------------------------------ 75 #ifdef HAVE_MPI1 76 include 'mpif.h' 77 #endif 78 CHARACTER(LEN=*), INTENT(IN) :: message 79 !Local variables ------------------------------ 80 CHARACTER(LEN=500) :: messend 81 #ifdef HAVE_MPI 82 INTEGER :: ierr 83 INTEGER :: rank 84 CALL MPI_Comm_rank(MY_WORLD, rank, ierr) 85 WRITE(messend,'(A,i5,A,A)') "ERROR in QMC rank ", rank, " : ",TRIM(message) 86 myERROR(TRIM(messend)) 87 CALL MPI_Finalize(ierr) ! IF in abinit, does nothing since killed in _myERROR_ 88 #else 89 WRITE(messend,'(A,A)') "ERROR in QMC : ", TRIM(message) 90 myERROR(TRIM(messend)) 91 #endif 92 !CALL FLUSH(0) 93 STOP 94 END SUBROUTINE ERROR
ABINIT/m_global/WARN [ Functions ]
NAME
WARN
FUNCTION
on cpu wants to tell something
COPYRIGHT
Copyright (C) 2013-2024 ABINIT group (J. Bieder) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
INPUTS
message=warning message
OUTPUT
SIDE EFFECTS
NOTES
SOURCE
121 SUBROUTINE WARN(message) 122 123 !Arguments ------------------------------------ 124 #ifdef HAVE_MPI1 125 include 'mpif.h' 126 #endif 127 CHARACTER(LEN=*), INTENT(IN) :: message 128 !Local variables ------------------------------ 129 CHARACTER(LEN=500) :: messend 130 #ifdef HAVE_MPI 131 INTEGER :: ierr 132 INTEGER :: rank 133 CALL MPI_Comm_rank(MY_WORLD, rank, ierr) 134 WRITE(messend,'(A,I6,A)') "WARNING in QMC rank ", rank, " : ", TRIM(message) 135 #else 136 WRITE(messend,'(A,A)') "WARNING in QMC : ", TRIM(message) 137 #endif 138 myWARN(TRIM(messend)) 139 !CALL FLUSH(0) 140 141 END SUBROUTINE WARN
ABINIT/m_global/WARNALL [ Functions ]
NAME
WARNALL
FUNCTION
collective warning function
COPYRIGHT
Copyright (C) 2013-2024 ABINIT group (J. Bieder) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt .
INPUTS
message=message to display
OUTPUT
SIDE EFFECTS
NOTES
SOURCE
168 SUBROUTINE WARNALL(message) 169 170 !Arguments ------------------------------------ 171 #ifdef HAVE_MPI1 172 include 'mpif.h' 173 #endif 174 CHARACTER(LEN=*), INTENT(IN) :: message 175 !Local variables ------------------------------------ 176 CHARACTER(LEN=500) :: messend 177 #ifdef HAVE_MPI 178 INTEGER :: ierr 179 INTEGER :: rank 180 CALL MPI_Comm_rank(MY_WORLD, rank, ierr) 181 IF ( rank .EQ. 0) THEN 182 #endif 183 WRITE(messend,'(A,A)') "WARNING in QMC : ", TRIM(message) 184 myWARNALL(TRIM(messend)) 185 #ifdef HAVE_MPI 186 END IF 187 #endif 188 !CALL FLUSH(0) 189 190 END SUBROUTINE WARNALL