Redhat linux compilation problem in Makefile.ifort

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
klzhuang

Redhat linux compilation problem in Makefile.ifort

#1 Unread post by klzhuang »

Dear all,
I keep on being asked the main_ compilation problem after last post. Maybe I have found the problem:
in Makefile.ifort if change original $(MYLIB) into $(OBJS) after -o
#--------------------------------------------------------------------------
# Target for ROMS/TOMS executable.
#--------------------------------------------------------------------------

$(BIN): $(MYLIB)
$(LDR) $(FFLAGS) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS) /* ******* LINE 149 ****** */

can be compiled successfully but can not run normally. Results as:
forrtl: severe (168): Program Exception - illegal instruction
Image PC Routine Line Source
oceanS 0804A5E1 Unknown Unknown Unknown
oceanS 00000008 Unknown Unknown Unknown
oceanS 00000000 Unknown Unknown Unknown
if changed to $(MYLIB) then
make -f Makefile.ifort
ifort -pc80 -ip -O3 -tpp7 -xW -Vaxlib -o oceanS libocean.a -L/home/kelin/netcdf-3.5.1/lib -lnetcdf
/opt/intel_fc_80/lib/for_main.o(.text+0x1c): In function `main':
: undefined reference to `MAIN__'
make: *** [oceanS] Error 1

Will you please help us? This is a common problem for many roms2.1 users.

dbergondo
Posts: 5
Joined: Mon May 05, 2003 6:34 pm
Location: URI - GSO

#2 Unread post by dbergondo »

Undefined reference to main error has been resolved in version 8.0.046 of the Intel Fortran Compiler for Linux.

michelesimioli

Re: Redhat linux compilation problem in Makefile.ifort

#3 Unread post by michelesimioli »

I have the release 8.0.034 of the Intel Fortran compiler, on various Linuxen. I find that you can work around the problem with "unknown MAIN__" if you compile the final executable oceanS with the line, in the Makefile:

$(LDR) $(FFLAGS) $(LDFLAGS) master.o -o $(BIN) $(MYLIB) $(LIBS)

Post Reply