Implementation Status of the 'Rank' Function

Happy New Year!

It seems that the rank function has not been implemented. I would like to inquire if there are any plans to implement it in the future.

program test

   implicit none

   real, dimension(3,3) :: A

   print*,rank(A)

end program test

nvfortran 23.11-0 64-bit target on x86-64 Linux -tp haswell 
NVIDIA Compilers and Tools
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.
NVFORTRAN-S-0038-Symbol, rank, has not been explicitly declared (test.f90: 1)
  0 inform,   0 warnings,   1 severes, 0 fatal for test

Thank you
Ali

Hi Ali,

Happy New Year to you as well!

F2018 features like “rank” are being added to the LLVM community F18 flang project which will eventually replace nvfortran. However I don’t have a time line on when that will occur.

Though I went ahead and added an RFE for it, TPR #34954. If it’s something easy, engineering might be willing to add it to nvfortran as well.

-Mat

2 Likes

Hi Mat,

Any update on the “rank” feature ? Do you know if it will be implemented in nvfortran in NVIDIA HPC SDK 25 ?

Hi Thomas,

In looking at TPR #34954, it appears engineering did implement this but it seems to have caused some issues so they needed to back it out and it missed inclusion in 24.11. Assuming they can get these issues resolved, there’s a good chance it will be adding in an early 2025 release. Otherwise, we may need to wait for our version for F18 flang, which will be F2018 compliant, for this feature.

-Mat

1 Like

Hi Ali,

Looks like engineering got these issue resolved and include initial support for RANK in 25.1.

% nvfortran -V24.11 rank.f90
NVFORTRAN-S-0038-Symbol, rank, has not been explicitly declared (rank.f90: 1)
  0 inform,   0 warnings,   1 severes, 0 fatal for test
% nvfortran -V25.1 rank.f90
% a.out
            2

-Mat

1 Like

Hi Mat,

Thanks for the update ! Do you know if there will be any release of version 25.1 for ppc64 architecture ?
Seems like the latest ppc64 version is 24.1

-Thomas

Hi Thomas,

No sorry. After ORNL’s Summit system was decommissioned, support for ppc64 was dropped.

-Mat

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.