Get code working with gfortran
This commit is contained in:
parent
3e140df1a9
commit
51079148cc
@ -1,6 +1,7 @@
|
|||||||
FC=ifort
|
FC=gfortran
|
||||||
FFLAGS=-mcmodel=large -g -O0 -stand f08 -fpe0 -traceback -check bounds,uninit -warn all -implicitnone -no-wrap-margin -heap-arrays
|
#FFLAGS=-mcmodel=large -g -O0 -stand f08 -fpe0 -traceback -check bounds,uninit -warn all -implicitnone -no-wrap-margin -heap-arrays
|
||||||
#FFLAGS=-mcmodel=large -Ofast -no-wrap-margin -heap-arrays
|
#FFLAGS=-mcmodel=large -Ofast -no-wrap-margin -heap-arrays
|
||||||
|
FFLAGS=-mcmodel=large -O3 -g
|
||||||
MODES=mode_create.o mode_merge.o mode_convert.o
|
MODES=mode_create.o mode_merge.o mode_convert.o
|
||||||
OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o opt_deform.o opt_redef_box.o
|
OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o opt_deform.o opt_redef_box.o
|
||||||
OBJECTS=main.o elements.o io.o subroutines.o functions.o atoms.o call_mode.o box.o $(MODES) $(OPTIONS) call_option.o sorts.o
|
OBJECTS=main.o elements.o io.o subroutines.o functions.o atoms.o call_mode.o box.o $(MODES) $(OPTIONS) call_option.o sorts.o
|
||||||
|
@ -198,9 +198,11 @@ module elements
|
|||||||
|
|
||||||
!The default size we grow the
|
!The default size we grow the
|
||||||
buffer_size = 1024
|
buffer_size = 1024
|
||||||
|
|
||||||
|
!First check to make sure if it is allocated
|
||||||
|
if (allocated(size_ele)) then
|
||||||
!Figure out the size of the atom and element arrays
|
!Figure out the size of the atom and element arrays
|
||||||
ele_size = size(size_ele)
|
ele_size = size(size_ele)
|
||||||
atom_size = size(type_atom)
|
|
||||||
|
|
||||||
!Check if we need to grow the ele_size, if so grow all the variables
|
!Check if we need to grow the ele_size, if so grow all the variables
|
||||||
if ( n+ele_num > size(size_ele)) then
|
if ( n+ele_num > size(size_ele)) then
|
||||||
@ -234,8 +236,13 @@ module elements
|
|||||||
temp_ele_real(:,:,:,ele_size+1:) = 0.0_dp
|
temp_ele_real(:,:,:,ele_size+1:) = 0.0_dp
|
||||||
call move_alloc(temp_ele_real, r_node)
|
call move_alloc(temp_ele_real, r_node)
|
||||||
end if
|
end if
|
||||||
|
else
|
||||||
|
call alloc_ele_arrays(n,0)
|
||||||
|
end if
|
||||||
|
|
||||||
!Now grow atom arrays if needed
|
!Now grow atom arrays if needed
|
||||||
|
if (allocated(type_atom)) then
|
||||||
|
atom_size = size(type_atom)
|
||||||
if (m+atom_num > atom_size) then
|
if (m+atom_num > atom_size) then
|
||||||
allocate(temp_int(m+atom_num+buffer_size))
|
allocate(temp_int(m+atom_num+buffer_size))
|
||||||
temp_int(1:atom_size) = type_atom
|
temp_int(1:atom_size) = type_atom
|
||||||
@ -257,6 +264,9 @@ module elements
|
|||||||
temp_real(:, atom_size+1:) = 0.0_dp
|
temp_real(:, atom_size+1:) = 0.0_dp
|
||||||
call move_alloc(temp_real, r_atom)
|
call move_alloc(temp_real, r_atom)
|
||||||
end if
|
end if
|
||||||
|
else
|
||||||
|
call alloc_ele_arrays(0,m)
|
||||||
|
end if
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
subroutine add_element(tag, type, size, lat, sbox, r)
|
subroutine add_element(tag, type, size, lat, sbox, r)
|
||||||
@ -669,17 +679,17 @@ module elements
|
|||||||
esize = size_ele(ie)
|
esize = size_ele(ie)
|
||||||
select case(iface)
|
select case(iface)
|
||||||
case(1)
|
case(1)
|
||||||
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, -10.0_dp**-2.0_dp /)
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, -10.0_dp**(-2.0_dp) /)
|
||||||
case(2)
|
case(2)
|
||||||
pos = (/ real(esize-1,dp)/2.0_dp, -10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp /)
|
pos = (/ real(esize-1,dp)/2.0_dp, -10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp /)
|
||||||
case(3)
|
case(3)
|
||||||
pos = (/ (esize-1)+10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
pos = (/ (esize-1)+10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
||||||
case(4)
|
case(4)
|
||||||
pos = (/ real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp /)
|
pos = (/ real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp /)
|
||||||
case(5)
|
case(5)
|
||||||
pos = (/ -10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
pos = (/ -10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
||||||
case(6)
|
case(6)
|
||||||
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**-2.0_dp /)
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**(-2.0_dp) /)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
!Now transform it to real space and adjust it to the position of the element in the first node.
|
!Now transform it to real space and adjust it to the position of the element in the first node.
|
||||||
|
@ -824,7 +824,8 @@ module opt_group
|
|||||||
!Add the element, for the sbox we just set it to the same sbox that we get the orientation
|
!Add the element, for the sbox we just set it to the same sbox that we get the orientation
|
||||||
!from. In this case it is from the sbox of the first atom in the group.
|
!from. In this case it is from the sbox of the first atom in the group.
|
||||||
new_ele = new_ele+1
|
new_ele = new_ele+1
|
||||||
call add_element(0,remesh_ele_type, working_esize, ilat, sbox_atom(atom_index(1)),r_new_node)
|
call add_element(0,remesh_ele_type, working_esize, ilat, &
|
||||||
|
sbox_atom(atom_index(1)),r_new_node)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
Loading…
x
Reference in New Issue
Block a user