diff --git a/Modules/mbdlib.f90 b/Modules/mbdlib.f90 index c93fbce4c..590469582 100644 --- a/Modules/mbdlib.f90 +++ b/Modules/mbdlib.f90 @@ -57,7 +57,9 @@ SUBROUTINE init_mbd ( nks_start, nk1, nk2, nk3, k1, k2, k3, tprnfor, tstress ) ! ! Allocation of variables that depend on the number of atoms ! -#if !defined(__NOMBD) +#if defined(__NOMBD) + CALL errore( 'libmbd_interface', 'Many-Body Dispersion not compiled',1) +#else ALLOCATE(inp%atom_types(nat)) ! EmbdvdW = 0.0_dp diff --git a/upflib/xmltools.f90 b/upflib/xmltools.f90 index 6d7fed4de..c3b11d3cb 100644 --- a/upflib/xmltools.f90 +++ b/upflib/xmltools.f90 @@ -623,8 +623,8 @@ CONTAINS INTEGER :: i LOGICAL :: indent ! - IF ( nlevel < 0 ) THEN - print "('xmlw_closetag: severe error, closing tag that was never opened')" + IF ( nlevel < 1 ) THEN + IF ( nlevel < 0 ) print "('xmlw_closetag: severe error, closing tag that was never opened')" RETURN END IF IF ( .NOT.PRESENT(tag) ) THEN