Commit 12dd6634 authored by Marco Govoni's avatar Marco Govoni
Browse files

Now it works on BGQ.

parent 2bc93276
......@@ -739,28 +739,32 @@
!
! Returns lowercase version of the `CK` string.
!pure elemental function lowercase_string(str) result(s_lower) DOES NOT COMPILE ON BGQ
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
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
! !character(kind=CK,len=(len(str))) :: s_lower !! lowercase version of the string
character(len=*),intent(in) :: str !! input string
character(len=(len(str))) :: s_lower !! lowercase version of the string
integer :: i !! counter
integer :: n !! length of input string
integer :: i !! counter
integer :: n !! length of input string
s_lower = CK_''
n = len_trim(str)
s_lower = CK_''
n = len_trim(str)
if (n>0) then
!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
end function lowercase_string
if (n>0) then
!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
end function lowercase_string
!*****************************************************************************************
!*****************************************************************************************
......
......@@ -38,7 +38,7 @@ PURE FUNCTION to_lower_case (str) RESULT (string)
!
IMPLICIT NONE
CHARACTER(*), INTENT(IN) :: str
CHARACTER(LEN(str)) :: string
CHARACTER(LEN=LEN(str)), INTENT(OUT) :: string
!
INTEGER :: ic, i
!
......
......@@ -36,6 +36,7 @@ CONTAINS
USE mp_images, ONLY : me_image, my_image_id, root_image, nimage
USE westcom, ONLY : savedir, logfile, outdir, west_prefix
USE base64_module, ONLY : base64_init
USE json_string_utilities, ONLY : lowercase_string
!
CHARACTER(LEN=*), INTENT(IN) :: code
!
......@@ -44,7 +45,7 @@ CONTAINS
CHARACTER(LEN=6), EXTERNAL :: int_to_char
INTEGER :: ios, crashunit
INTEGER, EXTERNAL :: find_free_unit
CHARACTER(LEN=9),EXTERNAL :: to_lower_case
! CHARACTER(LEN=9),EXTERNAL :: to_lower_case
!
! ... Intel compilers v .ge.8 allocate a lot of stack space
! ... Stack limit is often small, thus causing SIGSEGV and crash
......@@ -58,9 +59,9 @@ CONTAINS
CALL parse_command_arguments()
CALL fetch_input(1,(/1/),.FALSE.)
!
savedir = TRIM(outdir) // trim(west_prefix) // "." // TRIM(to_lower_case(code)) // ".save/"
savedir = TRIM(outdir) // trim(west_prefix) // "." // TRIM(lowercase_string(code)) // ".save/"
CALL my_mkdir( savedir )
logfile = TRIM(savedir) // TRIM(to_lower_case(code))//".json"
logfile = TRIM(savedir) // TRIM(lowercase_string(code))//".json"
!
! ... use ".FALSE." to disable all clocks except the total cpu time clock
! ... use ".TRUE." to enable clocks
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment