Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
west-public
West
Commits
08336136
Commit
08336136
authored
Jun 07, 2018
by
Marco Govoni
Browse files
Changed Json to match BGQ compiler
parent
cb1b73ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Libraries/Json/json_string_utilities.f90
View file @
08336136
...
...
@@ -126,7 +126,8 @@
! Compute how many digits we need to read
ndigits
=
2
*
len_trim
(
str
)
ndigits_digits
=
floor
(
log10
(
real
(
ndigits
)))
+1
allocate
(
character
(
kind
=
CDK
,
len
=
ndigits_digits
)
::
digits
)
!allocate(character(kind=CDK,len=ndigits_digits) :: digits) DOES NOT COMPILE ON BGQ
allocate
(
character
(
len
=
ndigits_digits
)
::
digits
)
write
(
digits
,
'(I0)'
)
ndigits
!gfortran will have a runtime error with * edit descriptor here
! gfortran bug: '*' edit descriptor for ISO_10646 strings does bad stuff.
read
(
str
,
'(I'
//
trim
(
digits
)//
')'
,
iostat
=
ierr
)
ival
!string to integer
...
...
@@ -752,12 +753,16 @@
!
! Returns lowercase version of the `CK` string.
pure
elemental
function
lowercase_string
(
str
)
result
(
s_lower
)
!pure elemental function lowercase_string(str) result(s_lower) ! DOES NOT COMPILE ON BGQ
pure
function
lowercase_string
(
str
)
result
(
s_lower
)
implicit
none
character
(
kind
=
CK
,
len
=*
),
intent
(
in
)
::
str
!! input string
character
(
kind
=
CK
,
len
=
(
len
(
str
)))
::
s_lower
!! lowercase version of the string
!character(kind=CK,len=*),intent(in) :: str !! input string ! DOES NOT COMPILE ON BGQ
!character(kind=CK,len=(len(str))) :: s_lower !! lowercase version of the string !DOES NOT COMPILE ON BGQ
character
(
len
=*
),
intent
(
in
)
::
str
!! input string
character
(
len
=
(
len
(
str
)))
::
s_lower
!! lowercase version of the string
integer
::
i
!! counter
integer
::
j
!! index of uppercase character
...
...
Libraries/Json/json_value_module.f90
View file @
08336136
...
...
@@ -7987,7 +7987,8 @@
select
case
(
me
%
var_type
)
case
(
json_array
)
if
(
json
%
count
(
me
)
==
0
)
then
allocate
(
character
(
kind
=
CK
,
len
=
0
)
::
vec
(
0
))
!allocate(character(kind=CK,len=0) :: vec(0)) DOES NOT COMPILE ON BGQ
allocate
(
character
(
len
=
0
)
::
vec
(
0
))
allocate
(
ilen
(
0
))
return
end
if
...
...
@@ -8020,7 +8021,8 @@
if
(
.not.
initialized
)
then
! string length long enough to hold the longest one
! Note that this doesn't work with gfortran 4.9 or 5.
allocate
(
character
(
kind
=
CK
,
len
=
max_len
)
::
vec
(
count
)
)
!allocate( character(kind=CK,len=max_len) :: vec(count) ) ! DOES NOT COMPILE ON BGQ
allocate
(
character
(
len
=
max_len
)
::
vec
(
count
)
)
initialized
=
.true.
end
if
...
...
@@ -8639,7 +8641,8 @@
if
(
c
==
newline
.or.
ios
/
=
0
)
exit
iend
=
iend
+1
end
do
allocate
(
character
(
kind
=
CK
,
len
=
iend
-
istart
+1
)
::
line
)
!allocate( character(kind=CK,len=iend-istart+1) :: line ) DOES NOT COMPILE ON BGQ
allocate
(
character
(
len
=
iend
-
istart
+1
)
::
line
)
read
(
iunit
,
pos
=
istart
,
iostat
=
ios
)
line
end
subroutine
get_current_line_from_file_stream
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment