[Wrf-users] Choosing the C compiler when building WRF, WPS, netCDF, MPICH

Eric Altshuler ela at cola.iges.org
Tue Apr 15 11:47:11 MDT 2008


Hello,

I have had this question for some time now, but I was wondering if others have considered it. When configuring WRF for a parallel-DM build using the PGI compilers, the resulting configure.wrf uses PGI Fortran (pgf90) but GNU C (gcc) rather than PGI C (pgcc). In fact, in WRFV3, when mpicc is invoked, the underlying C compiler is specified to be gcc, even if MPI had been built with pgcc. In ARWpost and WPP, the C compiler is also specified as gcc. On the other hand, in WPS, the C compiler used is pgcc.

The use of different C compilers in different parts of the WRF system begs the question of which one should be used to build the packages that the WRF system depends on, such as netCDF and MPI (MPICH/MPICH2/OpenMPI). Is it better to use gcc to build these packages, or pgcc, or possibly gcc for one and pgcc for the other? PGI has a web page with instructions for building all of these packages, and of course they use pgcc, but is following the PGI suggestions the best way to do the builds?

I would like to hear if anyone else has experience with this issue.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793



More information about the Wrf-users mailing list