I am getting the following error in this case of ifort
ifort main.f pgfor.o
pgfor.o:(.data+0x0): undefined reference to `pgf90_compiled’
make: *** [Test] Error 1
in case of gfortran
gfortran main.f pgfor.o
pgfor.o:(.data+0x0): undefined reference to `pgf90_compiled’
collect2: ld returned 1 exit status
make: *** [Test] Error 1
in case of pgfortran there is no error.
How to rectify this error?
Please help me.
I have an existing code in ifort. I want to
include some pgfortran code to make it run faster.
If you are writing F90 code, constructs such as modules and allocable arrays contain formats that are unique to each compiler vendor. Hence, it is best to compile all F90 code using a single compiler vendor.
For simple F77 code, then you usually can get various compilers working together. However, for CUDA Fortran, Intel and Gfortran compiled objects aren’t compatible. You can try encapsulating the CUDA Fortran code into a library and then write an F77 interface routine, but it would be far simpler to compile all your Fortran source with PGI.