Sun F95 internal compiler error

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
whitney

Sun F95 internal compiler error

#1 Unread post by whitney »

Hernan,

I'm a new user of ROMS. I'm a post-doc at OSU under John Allen. I've been successfully running ROMS 2.0 in serial, but now am having problems running it in parallel. Scott Durski suggested I go straight to the source and ask you. Here are the details of my problem:

ROMS VERSION: 2.0
SYSTEM: SunBlade 2000 (2 processors)
MAKEFILE: Configuration file for OpenMP, Sun f90 Solaris

In "cppdefs.h" I have set #undef SERIAL for my case and in "ocean.in" I have set NtileI=2 and NtileJ=1.

I have setenv PARALLEL 2 (I've even tried setenv OMP_NUM_THREADS= 2). When I execute oceanO < ocean.in, the model runs but only uses half the CPU. This means it is only using one processor.

Following similar steps for the ROMS 1.8 code allows me to use two processors, but I would really like to use the newest version.

I did make a change in the Makefile because of a compiling problem: I moved -openmp from FFLAGS to LDFLAGS. I mention this, just in case this is crucial.

I've been thinking more about the problem. Perhaps the reason ROMS 2.0 doesn't make use of both processors does have to do with my change to the Makefile (the OpenMP for Sun version).

Here are the original flags:

Code: Select all

          LDFLAGS = 
           FFLAGS = -openmp -05 -u -U -C -g -xs
The -openmp flag (-mp=openmp -explicitpar -stackvar D_OPENMP=2000011) causes a compiler error when present in FFLAGS:

Code: Select all

  INTERNAL COMPILER ERROR line 104 in pre_step3d.f90 (phase CrayConvert):
          't$14' found but not the correct kind of symbol
  *** Error code 1
  make: Fatal error: Command failed for target `pre_step3d.o'
I've tested different combinations and found that the compilation is successfull as long as -explicitpar is not among the FFLAGS. So this is what I now use to compile:

Code: Select all

          LDFLAGS = -openmp
           FFLAGS = -mp=openmp -stackvar -D_OPENMP=2000011 -05 -u -U -C -g -xs
Maybe the lack of -explicitpar in FFLAGS (even though it is in LDFLAGS) is why oceanO executable doesn't make use of two processors.

Michael M. Whitney
whitney@coas.oregonstate.edu

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

#2 Unread post by arango »

Hi Mike,

Yes, the SUN F95 compiler has a bug on it. You would find this problem in two routines: "pre_step3d.F" and "step3d_t.F". It happens in the declaration of two variables: "Akt" and "t".

The temporary solution here is to declare these two variables explicitly when running on the SUN. Notice, that I provided both declarations in the code distributed on June 30 (ROMS version 2.0). You just need to comment these declarations and use the explicit ones in both routines:

Code: Select all

!!    real(r8), intent(in) :: Akt(LBi:UBi,LBj:UBj,0:N(ng),NAT)     ! explicit

!!    real(r8), intent(inout) :: t(LBi:UBi,LBj:UBj,N(ng),3,NT(ng)) ! explicit

Just uncomment the above declarations and comment the following delcalarations:

Code: Select all

!!    real(r8), intent(in) :: Akt(LBi:,LBj:,0:,:)

!!    real(r8), intent(inout) :: t(LBi:,LBj:,:,:,:)
That is, we are using explicit declarations for these two arrays. The SUN compilers have a lot of bugs on them. I tried new patches but they are not that stable. The above solution works very well. Do they makes sense?

Then, leave the Makefile alone and use the distributed ones.

Good luck,

Hernan G. Arango
arango@imcs.rutgers.edu

Post Reply