Hello,
I'm trying to build ROMS on a PIII system with PGI compilers (v. 7.06) and the build fails with the following error:
cd Build; mpif90 -c -u -Bstatic -fastsse -Mipa=fast -tp p6 mod_kinds.f90
pgf90-Error-Switch -u expects an argument
-u<undef> Passed to linker; generate undefined reference
make: *** [Build/mod_kinds.o] Error 1
The only change I made to the makefiles outside of the user-defined area was to change the processor type from "k8-64" to "p6" in the above referenced line of Linux-pgi.mk.
The comment in this file pertaining to the offending "-u" switch implies that the undefined symbol should be okay:
# According to the PGI manual, the -u -Bstatic flags initializes
# the symbol table with -Bstatic, which is undefined for the linker.
# An undefined symbol triggers loading of the first member of an
# archive library.
but that doesn't seem to be the case for me.
I wasn't able to find much info in the PGI documentation about the -u switch. Anyone else have a similar problem?
Thanks,
Scott
pgf90-Error-Switch -u expects an argument
Hi, Scott,
I have met similar problems like you,
mpif90 -c -g -check bounds mod_kinds.f90
pgf90-Error-Unknown switch: -check
make: *** [mod_kinds.o] Error 1
rm mod_kinds.f90
Would you please tell which file shall I modify? I can't find the parameters you said above.
Thanks in advance!
zhou
I have met similar problems like you,
mpif90 -c -g -check bounds mod_kinds.f90
pgf90-Error-Unknown switch: -check
make: *** [mod_kinds.o] Error 1
rm mod_kinds.f90
Would you please tell which file shall I modify? I can't find the parameters you said above.
Thanks in advance!
zhou
scottj wrote:Thanks,
I dropped the "-u -Bstatic" as you suggested and it built successfully.
cheers,
Scott
yes, I modified the Compiler/Linux-mpif90.mk, and got in new trouble:
mpif90 -c -fastsse -Mipa=fast -tp p6 -Vaxlib master.o ocean_control.o -o oceanM libNLM.a libUTIL.a libMODS.a -L./netcdf_ifc -lnetcdf
pgf90-Fatal-Could not find alternate compiler: /opt/pgi/linux86/axlib/bin/pgf90
make: *** [oceanM] Error 3
rm mod_kinds.f90
b.t.w, I use roms2.3. I have problems to upgrade to 3.0 via svn - can't export source dirs to the local machine.
mpif90 -c -fastsse -Mipa=fast -tp p6 -Vaxlib master.o ocean_control.o -o oceanM libNLM.a libUTIL.a libMODS.a -L./netcdf_ifc -lnetcdf
pgf90-Fatal-Could not find alternate compiler: /opt/pgi/linux86/axlib/bin/pgf90
make: *** [oceanM] Error 3
rm mod_kinds.f90
b.t.w, I use roms2.3. I have problems to upgrade to 3.0 via svn - can't export source dirs to the local machine.