how to make on gfortran

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
duckweed

how to make on gfortran

#1 Unread post by duckweed »

hi,
i want to make roms on gfortran compiles. How to setup?
when i set ' FORT ?= gfortran' in the makefile, the make error show a lot of errors about pgf90.
it can't find the pgf90. This is some errors:

mod_scalars.f90:(.text+0x125a): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x131d): undefined reference to `pgf90_alloc'
/usr/lib/gcc/i486-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x23): undefined reference to `MAIN__'
Build/master.o: In function `.STATICS1':
master.f90:(.data+0xf8): undefined reference to `pgf90_compiled'
Build/ocean_control.o: In function `.STATICS4':
ocean_control.f90:(.data+0x2f8): undefined reference to `pgf90_compiled'
Build/ocean_coupler.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/propagator.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/libNLM.a(initial.o): In function `.STATICS1':
initial.f90:(.data+0xb8): undefined reference to `pgf90_compiled'
Build/libNLM.a(main3d.o):main3d.f90:(.data+0x8): more undefined references to `pgf90_compiled' follow
Build/libMODS.a(mod_scalars.o): In function `mod_scalars_initialize_scalars_':
mod_scalars.f90:(.text+0x1014): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x1109): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x1184): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x125a): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x131d): undefined reference to `pgf90_alloc'
/usr/lib/gcc/i486-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x23): undefined reference to `MAIN__'
Build/master.o: In function `.STATICS1':
master.f90:(.data+0xf8): undefined reference to `pgf90_compiled'
Build/ocean_control.o: In function `.STATICS4':
ocean_control.f90:(.data+0x2f8): undefined reference to `pgf90_compiled'
Build/ocean_coupler.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/propagator.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/libNLM.a(initial.o): In function `.STATICS1':
initial.f90:(.data+0xb8): undefined reference to `pgf90_compiled'
Build/libNLM.a(main3d.o):main3d.f90:(.data+0x8): more undefined references to `pgf90_compiled' follow
Build/libMODS.a(mod_scalars.o): In function `mod_scalars_initialize_scalars_':
mod_scalars.f90:(.text+0x1014): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x1109): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x1184): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x125a): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x131d): undefined reference to `pgf90_alloc'
/usr/lib/gcc/i486-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x23): undefined reference to `MAIN__'
Build/master.o: In function `.STATICS1':
master.f90:(.data+0xf8): undefined reference to `pgf90_compiled'
Build/ocean_control.o: In function `.STATICS4':
ocean_control.f90:(.data+0x2f8): undefined reference to `pgf90_compiled'
Build/ocean_coupler.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/propagator.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/libNLM.a(initial.o): In function `.STATICS1':
initial.f90:(.data+0xb8): undefined reference to `pgf90_compiled'
Build/libNLM.a(main3d.o):main3d.f90:(.data+0x8): more undefined references to `pgf90_compiled' follow
Build/libMODS.a(mod_scalars.o): In function `mod_scalars_initialize_scalars_':
mod_scalars.f90:(.text+0x1014): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x1109): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x1184): undefined reference to `__c_mzero8'
mod_scalars.f90:(.text+0x125a): undefined reference to `pgf90_alloc'
mod_scalars.f90:(.text+0x131d): undefined reference to `pgf90_alloc'
/usr/lib/gcc/i486-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x23): undefined reference to `MAIN__'
Build/master.o: In function `.STATICS1':
master.f90:(.data+0xf8): undefined reference to `pgf90_compiled'
Build/ocean_control.o: In function `.STATICS4':
ocean_control.f90:(.data+0x2f8): undefined reference to `pgf90_compiled'
Build/ocean_coupler.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/propagator.o:(.data+0x0): undefined reference to `pgf90_compiled'
Build/libNLM.a(initial.o): In function `.STATICS1':
initial.f90:(.data+0xb8): undefined reference to `pgf90_compiled'
Build/libNLM.a(main3d.o):main3d.f90:(.data+0x8): more undefined references to `pgf90_compiled' follow
collect2: ld returned 1 exit status
make: *** [oceanS] Error 1

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: how to make on gfortran

#2 Unread post by kate »

Do you also have the PGI compiler? If you start compiling with one compiler, you have to do a "make clean" to get rid of all the .o and .mod files before using another compiler.

Post Reply