- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I try to compile with ifort a programm written by the members of my lab to modify netcdf file using IOAPI library. This programm is ussually compile with pgf without any problems, however we need to use it on our new cluster using ifort. Then we get this error message:
ifort -openmp -I /global/home/users/nseror/install/lib/ioapi/ioapi/fixed_src -o changestime.exe changestime.F fdescstruct.o -L/global/home/users/nseror/install/lib/ioapi/Linux2_x86_64ifort -lioapi -L/global/software/centos-5.x86_64/modules/netcdf/4.0-intel/lib -lnetcdf
/tmp/ifortn8G15K.o: In function `MAIN__':
changestime.F:(.text+0xb2): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0xfc): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x125): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x4de): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x617): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x691): undefined reference to `lunits_mp_lunconch_'
changestime.F:(.text+0xb2f): undefined reference to `lunits_mp_logdev_'
fdescstruct.o: In function `fdesc3_compare_':
fdescstruct.F:(.text+0xf3): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x258): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x3bd): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x522): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x687): undefined reference to `lunits_mp_lunconch_'
fdescstruct.o:fdescstruct.F:(.text+0x7ec): more undefined references to `lunits_mp_lunconch_' follow
exit 0
It seems to be a flag problem, the optional command I use to compile it are:
ifort -openmp -I /global/home/users/nseror/install/lib/ioapi/ioapi/fixed_src -o changestime.exe changestime.F fdescstruct.o -L/global/home/users/nseror/install/lib/ioapi/Linux2_x86_64ifort -lioapi -L/global/software/centos-5.x86_64/modules/netcdf/4.0-intel/lib -lnetcdf
Someone could help me please
Thanks
I try to compile with ifort a programm written by the members of my lab to modify netcdf file using IOAPI library. This programm is ussually compile with pgf without any problems, however we need to use it on our new cluster using ifort. Then we get this error message:
ifort -openmp -I /global/home/users/nseror/install/lib/ioapi/ioapi/fixed_src -o changestime.exe changestime.F fdescstruct.o -L/global/home/users/nseror/install/lib/ioapi/Linux2_x86_64ifort -lioapi -L/global/software/centos-5.x86_64/modules/netcdf/4.0-intel/lib -lnetcdf
/tmp/ifortn8G15K.o: In function `MAIN__':
changestime.F:(.text+0xb2): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0xfc): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x125): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x4de): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x617): undefined reference to `lunits_mp_logdev_'
changestime.F:(.text+0x691): undefined reference to `lunits_mp_lunconch_'
changestime.F:(.text+0xb2f): undefined reference to `lunits_mp_logdev_'
fdescstruct.o: In function `fdesc3_compare_':
fdescstruct.F:(.text+0xf3): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x258): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x3bd): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x522): undefined reference to `lunits_mp_lunconch_'
fdescstruct.F:(.text+0x687): undefined reference to `lunits_mp_lunconch_'
fdescstruct.o:fdescstruct.F:(.text+0x7ec): more undefined references to `lunits_mp_lunconch_' follow
exit 0
It seems to be a flag problem, the optional command I use to compile it are:
ifort -openmp -I /global/home/users/nseror/install/lib/ioapi/ioapi/fixed_src -o changestime.exe changestime.F fdescstruct.o -L/global/home/users/nseror/install/lib/ioapi/Linux2_x86_64ifort -lioapi -L/global/software/centos-5.x86_64/modules/netcdf/4.0-intel/lib -lnetcdf
Someone could help me please
Thanks
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These errors indicate that you have not also linked in the .o file created when module LUNITS was compiled. That is required.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These errors indicate that you have not also linked in the .o file created when module LUNITS was compiled. That is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having the same problem, how do I link the .o file?
Thanks,
Eric
Thanks,
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The standard command for linking is
... -L -l -l ...
where <..> is text that you supply, using the following rules:
is the name of the Fortran compiler driver (ifort).
... are the names of object files produced by compiling your Fortran sources
is used to link in library "liblibA.a" or "liblibA.so", etc.
and any other needed compiler options are placed after.
This topic is well covered in the Fortran Users Guide.
where <..> is text that you supply, using the following rules:
and any other needed compiler options are placed after
This topic is well covered in the Fortran Users Guide.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page