Skip to content

Commit

Permalink
workaround compiler bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed May 30, 2024
1 parent 4b80bbe commit f2af7d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
id: setup-fortran
with:
compiler: gcc
version: 14
version: 13

- name: Setup Python
uses: actions/setup-python@v3
Expand Down
13 changes: 4 additions & 9 deletions src/equilibrate_yaml.f90
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ subroutine unpack_speciesfile(root, filename, sp, err)
type(type_error), allocatable :: io_err

character(:), allocatable :: tmp_str
character(s_str_len) :: tmp_str1
integer :: i, j, ind

!!! atoms !!!
Expand Down Expand Up @@ -143,17 +144,11 @@ subroutine unpack_speciesfile(root, filename, sp, err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
key_value_pair => dict%first
do while (associated(key_value_pair))
ind = findloc(sp%atoms_names,trim(key_value_pair%key), 1)
tmp_str1 = trim(key_value_pair%key)
ind = findloc(sp%atoms_names,tmp_str1, 1)
if (ind == 0) then
err = 'The atom "'// trim(key_value_pair%key)//'" in species "'// &
sp%r(j)%name//'" is not in the list of atoms: '
do i = 1,size(sp%atoms_names)
if (i == size(sp%atoms_names)) then
err = err//trim(sp%atoms_names(i))
else
err = err//trim(sp%atoms_names(i))//', '
endif
enddo
sp%r(j)%name//'" is not in the list of atoms.'
return
endif
key_value_pair =>key_value_pair%next
Expand Down

0 comments on commit f2af7d3

Please sign in to comment.