Problem about running the upwelling about test case

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

Problem about running the upwelling about test case

#1 Unread post by zhouwei »

Hi ,I am a new user of ROMS .
Today I was trying to run the upwelling test case and I get the following errors when I try compiling the model on a Fedora 4 system with Linux-gfortran.

[vchou@localhost roms]$ make
makefile:226: INCLUDING FILE Build/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cd Build; gfortran -c -frepack-arrays -O3 -ffast-math exchange_2d.f90
exchange_2d.f90: 在函数 ‘exchange_v2d_tile’ 中:
exchange_2d.f90:238: 编译器内部错误:段错误
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL> for instructions.
make: *** [Build/exchange_2d.o] 错误 1

I don't know how to solve this problem ,I wonder if somebody can please help me .
Any information is greatly appreciated.

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

#2 Unread post by kate »

Most of us can't parse the message either. Are you saying the compiler gave an internal compiler error? The first thing to try is backing off on the compiler options - these are coming from Compilers/Linux-gfortran.mk. Turn off optimization and investigate what the other options are doing.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#3 Unread post by m.hadfield »

The other thing to do is ensure you have a reasonably up-to-date version of the Gfortran compiler. If it's more than a year or so old, then you should definitely upgrade before spending too much time investigating other possibilities.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#4 Unread post by m.hadfield »

Or try G95, which has been able to compile ROMS successfully for several years now.

zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

#5 Unread post by zhouwei »

Hi, m.hadfield ,Kate,
Thanks for your reply . It is indeed the problem of the compiler .
By the way ,how do I know what compilers my Operating System has installed and which version they are.
Thank you.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

#6 Unread post by m.hadfield »

Gfortran, ie the compiler described here

http://gcc.gnu.org/wiki/GFortran

is part of the GCC system and (I think) comes with GCC versions 4.1 or later in place of the old G77. These days it is normally invoked via the name "gfortran", as seems to be the case on your system. To determine the version, type the following command in a shell:

Code: Select all

gfortran --version
The output will be something like this (from my Windows/Cygwin system):

Code: Select all

GNU Fortran (GCC) 4.3.0 20070708 (experimental)
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
The date in the first line is the most important part. In my experience, the development snapshot versions of Gfortran weren't able to compile ROMS until October 2005. However I don't know how long it took for the improvements that allowed this to get into releases of GCC.

G95, ie the compiler described here

http://www.g95.org/

was able to compile ROMS a year or two before Gfortran.

The compiler is normally invoked as "g95". To determine the version, type the following command in a shell

Code: Select all

g95 --version
Here's what I get

Code: Select all

G95 (GCC 4.1.1 (g95 0.91!) Jun 30 2007)
Copyright (C) 2002-2005 Free Software Foundation, Inc.

G95 comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of G95
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
On the more general question of how to establish what compilers are installed on your system, there's no single answer. Modern Linuxes have a system for managing software and keep a catalogue. You will probably learn a lot by trolling through that catalogue, but I don't know if it's possible to get a list of (say) all the Fortran compilers. In any case, some packages, like G95, are often installed via a method that avoids this management system.

Another way to determine what commands are available is (in the Bash shell) to type the first letter of the suspected command (let's try "g") and then hit the TAB key. Bash will attempt to complete the command and will list all the commands on your system that start with "g". On my system this tells me I have g77, g95 and gfortran, not to mention g++, grotty and much else besides. But you have to have some idea of the command name you are looking for before this is useful.

zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

#7 Unread post by zhouwei »

Thank you very much for your instruction.

twainwright

#8 Unread post by twainwright »

To find the standard Fortran compilers installed on a Fedora system (or any Linux using rpm for package management), you can use:

> rpm -qa | grep -i fortran

for example, on my (SuSE 10.2) system, I get:

libgfortran41-4.1.2_20061115-5
gcc-fortran-4.1.3-29
libgfortran42-4.2.0_20070506-2.1
gcc41-fortran-4.1.2_20061115-5
gcc42-fortran-4.2.0_20070506-2.1

which shows that I seem to have three different versions of gcc-fortran (i.e. gfortran) installed. Fedora package names may be somewhat different.

This won't show g95, which is not (usually) installed via rpm. To check for it, use something like:
> which g95

Hope this helps!

Post Reply