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
a92b1fe1
Commit
a92b1fe1
authored
Jul 13, 2017
by
Marco Govoni
Browse files
Updated to compile on BGQ.
parent
e05ef0d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
IO_kernel/pdep_io.f90
View file @
a92b1fe1
...
...
@@ -46,7 +46,7 @@ MODULE pdep_io
COMPLEX
(
DP
),
ALLOCATABLE
::
tmp_vec
(:)
INTEGER
::
iun
,
ierr
CHARACTER
(
LEN
=
:),
ALLOCATABLE
::
charbase64
INTEGER
::
nbytes
,
ndim
,
iunit
INTEGER
::
nbytes
,
ndim
,
iunit
,
nlen
CHARACTER
(
LEN
=
30
)
::
endian
!
!
...
...
@@ -66,7 +66,8 @@ MODULE pdep_io
!
ndim
=
npwq0_g
nbytes
=
SIZEOF
(
tmp_vec
(
1
))
*
ndim
ALLOCATE
(
CHARACTER
(
LEN
=
lenbase64
(
nbytes
))
::
charbase64
)
nlen
=
lenbase64
(
nbytes
)
ALLOCATE
(
CHARACTER
(
LEN
=
nlen
)
::
charbase64
)
CALL
base64_encode_complex
(
tmp_vec
(
1
:
ndim
),
ndim
,
charbase64
)
!
IF
(
islittleendian
()
)
THEN
...
...
Libraries/Base64/base64module.f90
View file @
a92b1fe1
...
...
@@ -21,7 +21,6 @@ module base64_module
SAVE
!
INTEGER
::
ICHAR
LOGICAL
,
PARAMETER
::
lbigendian
=
(
ICHAR
(
TRANSFER
(
1
,
'a'
)
)
==
0
)
!
INTERFACE
!
...
...
@@ -81,7 +80,7 @@ module base64_module
!
LOGICAL
FUNCTION
islittleendian
(
)
IMPLICIT
NONE
islittleendian
=
(
.NOT.
lbigendian
)
islittleendian
=
(
.NOT.
(
ICHAR
(
TRANSFER
(
1
,
'a'
)
)
==
0
)
)
END
FUNCTION
!
END
MODULE
Libraries/Json/json_string_utilities.f90
View file @
a92b1fe1
...
...
@@ -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
...
...
@@ -738,7 +739,8 @@
!
! 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
function
lowercase_string
(
str
)
result
(
s_lower
)
implicit
none
...
...
@@ -752,7 +754,8 @@
n
=
len_trim
(
str
)
if
(
n
>
0
)
then
do
concurrent
(
i
=
1
:
n
)
!do concurrent (i=1:n) DOES NOT COMPILE ON BGQ
do
i
=
1
,
n
s_lower
(
i
:
i
)
=
lowercase_character
(
str
(
i
:
i
))
end
do
end
if
...
...
Libraries/Json/json_value_module.f90
View file @
a92b1fe1
...
...
@@ -7134,7 +7134,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
...
...
@@ -7167,7 +7168,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
...
...
@@ -7755,7 +7757,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