From 068b5d99a9cfbda25b10d13d7bcf910f74cdfa41 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Wed, 28 Oct 2020 17:51:23 -0400 Subject: [PATCH] Fix to gfortran compatibility --- src/elements.f90 | 6 +++++- src/io.f90 | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/elements.f90 b/src/elements.f90 index 7ca48c8..4b3d5e0 100644 --- a/src/elements.f90 +++ b/src/elements.f90 @@ -370,7 +370,11 @@ module elements subroutine set_max_esize !This subroutine sets the maximum esize - max_esize=maxval(size_ele) + if(allocated(size_ele)) then + max_esize=maxval(size_ele) + else + max_esize = 2 + end if end subroutine subroutine interpolate_atoms(type, esize, lat_type, r_in, type_interp, r_interp) diff --git a/src/io.f90 b/src/io.f90 index 7bbf3c2..2787b73 100644 --- a/src/io.f90 +++ b/src/io.f90 @@ -133,14 +133,14 @@ module io do i = 1, ele_num do inod = 1, ng_node(lat_ele(i)) do ibasis = 1, basisnum(lat_ele(i)) - write(11, '(2i16, 3f23.15)') basis_type(ibasis,lat_ele(i)), 0, r_node(:,ibasis,inod,i) + write(11, '(2i16, 3f23.15)') basis_type(ibasis,lat_ele(i)), 1, r_node(:,ibasis,inod,i) end do end do end do !Write atom positions do i = 1, atom_num - write(11, '(2i16, 3f23.15)') type_atom(i), 1, r_atom(:,i) + write(11, '(2i16, 3f23.15)') type_atom(i), 0, r_atom(:,i) end do !Finish writing