cancel
Showing results for 
Search instead for 
Did you mean: 

Server Processors

mfvalin
Adept I

AOCC 4.0 flang problem. failing code at execution

it has been suggested that i should have posted this at AMD Developer's Forum rather that where i posted it originally

 

the following code compiles without errors but fails at execution time

(executes successfully with gfortran/flang-new/ifort/pgfortran)

module integrals9
implicit none
private
public :: simpson9, integrable_function9
abstract interface
function integrable_function9(x) result(func)
real, intent(in) :: x
real :: func
end function integrable_function9
end interface
contains
function simpson9(f, a, b) result(s)
real, intent(in) :: a, b
procedure(integrable_function9) :: f
real :: s
s = (b-a) / 6 * (f(a) + 4*f((a+b)/2) + f(b))
end function simpson9
end module integrals9
module demo_functions9
use integrals9, only: simpson9
implicit none
private
public :: test_integral9
contains
subroutine test_integral9(a, k)
real, intent(in) :: a, k
real :: pi
pi = 3.1416
print *, simpson9(f9, 0., pi)
print *, simpson9(f9, 0., 2*pi)
contains
function f9(x) result(y)
real, intent(in) :: x
real :: y
y = a*sin(k*x)
end function f9
end subroutine test_integral9
end module demo_functions9

program test_callback
use demo_functions9, only: test_integral9
implicit none
print *,'call test_integral9' ; call flush(6)
call test_integral9(1.1, 2.2)
end

 
 
0 Likes
1 Solution

Hi mfvalin,

Thanks for reporting this issue.  I have filed a bug report. Will keep you posted on the progress of the same.

View solution in original post

0 Likes
4 Replies
dipak
Big Boss

Hi @mfvalin ,

Thanks for reporting it. For AOCC related support, the AMD Server Gurus forum is the right place to post any issue/query. So, I am moving this post there.

Thanks.

0 Likes

Hi mfvalin,

Thanks for reporting this issue.  I have filed a bug report. Will keep you posted on the progress of the same.

0 Likes

This issue has been fixed in latest AOCC Compiler release version 4.1.  Please visit AMD Optimizing C/C++ and Fortran Compilers (AOCC) | AMD for details.

0 Likes
igrqb
Journeyman III

@mfvalin, do you have aocc installed?

aocc has libflang.so and libflangrti.so, so you would only need to update your LD_LIBRARY_PATH (or add an entry in /etc/ld.so.conf.d/) with the `lib` directory where the shared libraries have been installed into.

In my case it was `/opt/AMD/aocl/aocl-linux-aocc-4.0/lib`

Hopefully this helps.

0 Likes