NVHPC: nvfortran dependency tracking is broken
The dependency tracking does not seem to be working when building with nvfortran. It appears to have been broken by commit 7ce71837 (based on a git bisect
). Here is a simple example to illustrate the issue:
CMakeLists.txt:
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(NVFORTRAN_TEST LANGUAGES Fortran)
add_executable(test)
target_sources(test PRIVATE main.F90 other.F90)
main.F90:
program main
use other, only : test
implicit none
print*, "In main program"
call test()
end program main
other.F90:
module other
implicit none
private
public :: test
contains
subroutine test()
print*, "In test"
end subroutine test
end module other
This builds fine with gfortran (building other.F90
before main.F90
) but when building with nvfortran
it just builds the files in the order they are input. So it build main.F90
first which results in other.mod not being found (cause it hasn't been built yet).
This is on Linux with NVHPC 21.7.
Edited by Brad King