Open HarshitaKalani opened 9 months ago
The file stdlib_stats.f90
contains 750 entries of merge
, I feel it is difficult to comment those out. So will implement that first. Or is there any other way to go about this?
Yes, implement merge.
file src/stdlib_linalg.f90
throws Internal Compiler error on building (make fortran_stdlib
)
function diag_rdp_mat_k(A,k) result(res)
real(selected_real_kind(15)), intent(in) :: A(:,:)
integer, intent(in) :: k
real(selected_real_kind(15)) :: res(minval(shape(A))-abs(k))
end function diag_rdp_mat_k
$ gfortran a.f90
$ lfortran a.f90
ASR verify pass error: ASR verify: Function diag_rdp_mat_k doesn't depend on _lcompilers_shape1 but is found in its dependency list.
Internal Compiler Error: Unhandled exception
^C
Here is another issue in stdlib_linalg.f90
file
PROGRAM main
complex(8), parameter :: zero = 0
END PROGRAM
$ gfortran b.f90 && ./a.out
$ lfortran b.f90
^C
Issue in src/stdlib_random.f90
file:
semantic error: Function 'ishftc' not found or not implemented yet (if it is intrinsic)
--> /home/harshita/Desktop/stdlib/src/stdlib_random.f90:128:15
|
128 | res = ishftc(st(2) * 5, 7) * 9
| ^^^^^^^^^^^^^^^^^^^^
In the stdlib_stats_corr.f90
file
[ 2%] Building Fortran object src/CMakeFiles/fortran_stdlib.dir/stdlib_stats_corr.f90.o
semantic error: transpose accepts arrays of rank 2 only, provided an array with rank, 0
--> /home/harshita/Desktop/stdlib/src/stdlib_stats_corr.f90:441:37
|
441 | res = matmul( transpose(conjg(center)), center)
| ^^^^^^^^^^^^^
Note: Please report unclear or confusing messages as bugs at
https://github.com/lfortran/lfortran/issues.
make[3]: *** [src/CMakeFiles/fortran_stdlib.dir/build.make:225: src/CMakeFiles/fortran_stdlib.dir/stdlib_stats_corr.f90.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:933: src/CMakeFiles/fortran_stdlib.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:940: src/CMakeFiles/fortran_stdlib.dir/rule] Error 2
make: *** [Makefile:543: fortran_stdlib] Error 2
With all the workarounds mentioned here: https://github.com/HarshitaKalani/stdlib-fortran-lang/commits/lf_stats/, we're able to build stdlib-stats now.
Branch: https://github.com/czgdp1807/stdlib/tree/lf-stats-test With #3519 and #3532, we get
ASR verify pass error: Input to Sum intrinsic must always be an array
--> /Users/pranavchiku/repos/stdlib/src/stdlib_stats.f90:4527:17
|
4527 | res = sum(abs(x - mean)**2) / (n - merge(1, 0, optval(corrected, .true.)))
| ^^^^^^^^^^^^^^^^^^^^^ failed here
Using https://github.com/HarshitaKalani/stdlib-fortran-lang/tree/lf_stats branch. GFortran script:
LFortran script:
I'm getting the following issue when I run
make fortran_stdlib
, I getTo fix:
3053
3080
3083
3085
3087
3088