compiling problem (libmpichf90nc.a)

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
seashellingolds
Posts: 39
Joined: Wed Jun 25, 2008 2:49 am
Location: Georgia Institute of Technology

compiling problem (libmpichf90nc.a)

#1 Unread post by seashellingolds »

Hi everyone

I just got a compiling problem with new ROMS. I ve been using ROMS 3.0 before and everything is fine. Does anybody meet the same problem or help me out. Here is the error msg.
......
ar: creating Build/libUTIL.a
ranlib Build/libUTIL.a
master.f90:
/usr/local/mpi/bin/mpif90 -O3 Build/esmf_roms.o Build/master.o Build/ocean_control.o Build/ocean_coupler.o Build/propagator.o Build/roms_export.o Build/roms_import.o -o oceanM Build/libNLM.a Build/libNLM_bio.a Build/libNLM_sed.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/usr/netcdf-3.6.0-p1/lib -lnetcdf
/usr/local/mvapich/lib/libmpichf90nc.a: file not recognized: File format not recognized
gmake: *** [oceanM] Error 2

Thanks in advance

seashellingolds
Posts: 39
Joined: Wed Jun 25, 2008 2:49 am
Location: Georgia Institute of Technology

Re: compiling problem (libmpichf90nc.a)

#2 Unread post by seashellingolds »

Plus : Anybody tells me the difference between
FFLAGS += -Bstatic -fastsse -Mipa=fast
and
FFLAGS += -O3
I used to use the former. Is the latter better?

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

Re: compiling problem (libmpichf90nc.a)

#3 Unread post by kate »

seashellingolds wrote:/usr/local/mvapich/lib/libmpichf90nc.a: file not recognized: File format not recognized
This looks like something changed at the system level. Has someone changed the mpich since you last tried running ROMS? You need to find out what compiler was used to create libmpichf90nc.a and then use the same compiler. mpif90 is a wrapper around another compiler, but I can't tell which from what you show.
Plus : Anybody tells me the difference between
FFLAGS += -Bstatic -fastsse -Mipa=fast
and
FFLAGS += -O3
I used to use the former. Is the latter better?
These are compiler-dependent - I have no idea which is better for your system. You might try both on timing tests.

seashellingolds
Posts: 39
Joined: Wed Jun 25, 2008 2:49 am
Location: Georgia Institute of Technology

Re: compiling problem (libmpichf90nc.a)

#4 Unread post by seashellingolds »

Thanks Kate

I know where the problem is. In fact there is something wrong with libmpichf90nc.a. It is not an archive file... Maybe I need to ask admin to rebuild it.

However, this problem would not happen if I use -Bstatic flag with both ROMS 3.0 and 3.3. It does not seem to contain this static library when compiling. Is this lib really useful in ROMS?

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

Re: compiling problem (libmpichf90nc.a)

#5 Unread post by kate »

This stuff is all very system-dependent and I never use mpich, so I don't know.

-Bstatic means to link statically instead of dynamically. We have one system in which the compute nodes don't have all the dynamic libraries, so we have to link statically. On other systems, you can make smaller executables by linking dynamically.

Post Reply