Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Jul 21, 2019 2:38 am




Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Author Message
PostPosted: Thu Nov 20, 2003 7:58 pm 
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:
          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:
  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:
          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


Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 20, 2003 8:14 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1078
Location: IMCS, Rutgers University
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:
!!    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:
!!    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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group