Hi,
I am new to NVSHMEM and trying to figure out how to use it inside a Fortran program.
I have a simple C++ code that I can compile with nvcc -I $NVSHMEM_HOME/include -L $NVSHMEM_HOME/lib -lnvshmem test.cu -o test
and run with srun -n X ./test
without any problem:
#include <nvshmem.h>
int main(int argc, char *argv[])
{
nvshmem_init();
nvshmem_finalize();
return 0;
}
But when I try to compile its Fortran counterpart, I get an undefined reference error for each NVSHMEM call:
program main
use nvshmem
implicit none
call nvshmem_init()
call nvshmem_finalize()
end program main
I believe there is no Fortran-to-C interface that comes with NVSHMEM installation. How do I use the NVSHMEM interface or link the Fortran NVSHMEM module when compiling the code?
Thanks!