[Wrf-users] passing external MPI_Comm to WRF

John Michalakes john at michalakes.us
Tue Aug 11 14:47:36 MDT 2009


It's been a little while since I tried this but it can be done.  Change the
PROGRAM declaration in main/wrf.F into a SUBROUTINE that takes an integer
communicator as a argument. Then, before you call anything else in that main
routine, call wrf_set_dm_communicator( communicator ), where communicator is
the argument.  Any WRF code that would try to initialize MPI (such as the
code in module_io_quilt.F) calls MPI_INITIALIZED first.  It will see that
it's already been initialized and leave it alone. This and other parts of
the WRF code will work with the passed-in communicator instead of
MPI_COMM_WORLD.  

That's the theory, anyway.  Let me know if you run into trouble.

John

-----------------------------------------------------------
John Michalakes, Software Engineer        michalak at ucar.edu
NCAR, MMM Division                   voice: +1 303 497 8199
3450 Mitchell Lane                     fax: +1 303 497 8181
Boulder, Colorado 80301 U.S.A.        cell: +1 720 209 2320
        http://www.mmm.ucar.edu/individual/michalakes
----------------------------------------------------------- 




> -----Original Message-----
> From: wrf-users-bounces at ucar.edu [mailto:wrf-users-bounces at ucar.edu] On
> Behalf Of Ufuk Utku Turuncoglu
> Sent: Tuesday, August 11, 2009 2:23 PM
> Cc: wrf-users at ucar.edu
> Subject: [Wrf-users] passing external MPI_Comm to WRF
> 
> Hi,
> 
> I wonder that is there anybody out there who try to pass external MPI
> communicator to WRF?
> 
> I want to run WRF in a small set of processor that belongs to custom
> created MPI comm world and i want to use this created comm world to run
> WRF. I think that the main subroutine that can be used for this purpose
> is 'init_modules' and phase 1. Is it necessary to modify I/O quilt for
> this purpose?
> 
> Anyway, please let me know, if my question is not clear.
> 
> Thanks,
> 
> --ufuk
> _______________________________________________
> Wrf-users mailing list
> Wrf-users at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/wrf-users



More information about the Wrf-users mailing list