Skip to content

Commit

Permalink
Merge pull request #64 from Goddard-Fortran-Ecosystem/hotfix/ifort-20…
Browse files Browse the repository at this point in the history
…21.7-workarounds

Workarounds for intel 2021.7
  • Loading branch information
tclune authored Jan 27, 2023
2 parents 1487681 + 90233d9 commit 47b7178
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12)

project (YAFYAML
VERSION 1.0.5
VERSION 1.0.6
LANGUAGES Fortran)

# Most users of this software do not (should not?) have permissions to
Expand Down
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.6] - 2023-01-26

### Fixed

- Workarounds for Intel 2021.7
- Out of date examples have been updated

## [1.0.5] - 2023-01-23

### Fixed
Expand Down
12 changes: 6 additions & 6 deletions Examples/Iterators/iterator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ program main
implicit none

type(Parser) :: p
class(AbstractNode), allocatable :: node
class(YAML_Node), allocatable :: node
integer :: status

p = Parser('core')
p = Parser()
node = p%load('iterator.yaml')
write(10,'(dt)', iostat=status) node

Expand All @@ -24,11 +24,11 @@ program main
! This procedure does not check any potential errors
! but is easier to follow as a result.
subroutine optimistic(node)
class(AbstractNode), intent(in) :: node
class(YAML_Node), intent(in) :: node

integer :: i
integer :: prime
class(AbstractNode), pointer :: subcfg, subsubcfg
class(YAML_Node), pointer :: subcfg, subsubcfg
class(NodeIterator), allocatable :: iter
character(:), pointer :: shape
integer :: n_edges
Expand Down Expand Up @@ -58,11 +58,11 @@ end subroutine optimistic

! This procedure carefully checks all return codes.
subroutine pessimistic(node)
class(AbstractNode), intent(in) :: node
class(YAML_Node), intent(in) :: node

integer :: i
integer :: prime
class(AbstractNode), pointer :: subcfg, subsubcfg
class(YAML_Node), pointer :: subcfg, subsubcfg
class(NodeIterator), allocatable :: iter
character(:), pointer :: shape, key
integer :: n_edges
Expand Down
2 changes: 1 addition & 1 deletion Examples/JSON/integer-array/test-integer-array.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ program main
class(YAML_Node), allocatable :: c
integer, allocatable :: nodes(:)

p = Parser('core')
p = Parser()
c = p%load('integer-array.json')
call c%get(nodes, 'nodes')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ program main

integer :: i, j, status

p = Parser('core')
p = Parser()
c = p%load('nested-object-array.json')
dag_vertices => c%at('dag', 'vertices', rc=status)
if (status /= YAFYAML_SUCCESS) error stop "did not find 'dag' 'vertices'"
Expand Down
8 changes: 5 additions & 3 deletions Examples/JSON/trivial/test-trivial.f90
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
program main
use yafyaml, only : Parser, YAML_Node, assignment(=)
use yafyaml
use fy_CoreSchema
implicit none

type(Parser) p
class(YAML_Node), allocatable :: c
logical :: science = .false.
integer :: rc

p = Parser('core')
c = p%load('trivial.json')
p = Parser()
c = p%load('trivial.json', rc=rc)
science = c%at('science') ! this should overwrite science with .true.

if (.not. science) error stop "Test failed"
Expand Down
1 change: 1 addition & 0 deletions Examples/JSON/trivial/trivial.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{ "science" : true }

4 changes: 2 additions & 2 deletions Examples/Simple/simple.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ program main
implicit none

type(Parser) :: p
class(AbstractNode), allocatable :: node
class(AbstractNode), pointer :: subnode
class(YAML_Node), allocatable :: node
class(YAML_Node), pointer :: subnode

real :: x
character(:), allocatable :: name
Expand Down
2 changes: 1 addition & 1 deletion Examples/Simple/simple2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ program Simple2
implicit none

type(Parser) :: p
class(AbstractNode), allocatable :: node
class(YAML_Node), allocatable :: node
character(:), allocatable :: name

! Define the parser object and load the file
Expand Down
4 changes: 2 additions & 2 deletions Examples/Trivial/trivial.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ program main
implicit none

type(Parser) :: p
class(AbstractNode), allocatable :: node
class(YAML_Node), allocatable :: node
integer :: prime
integer :: status

p = Parser('core')
p = Parser()
node = p%load(FileStream('trivial.yaml'))

prime = node%of('prime')
Expand Down
5 changes: 3 additions & 2 deletions src/Parser.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ module fy_Parser

function new_Parser_default() result(p)
type(Parser) :: p

p = Parser(CoreSchema())
type(CoreSchema) :: c
c = CoreSchema()
p = Parser(c)

end function new_Parser_default

Expand Down

0 comments on commit 47b7178

Please sign in to comment.