Skip to content

Commit

Permalink
Fix compile on Cygwin (#2003)
Browse files Browse the repository at this point in the history
TYPE: bug fix

KEYWORDS: compilation, Cygwin, doc files

SOURCE:  Daniel Wesloh (Penn State)

DESCRIPTION OF CHANGES:
Problem:
Compiling WRF failed on Cygwin due to lack of netCDF4

Solution:
Match assumptions about `USENETCDFPAR` (#1743 would also fix this) and pass flags to allow legacy Fortran constructs (disallowed by default with GCC 10)

ISSUE: For use when this PR closes an issue.
Fixes #1271

LIST OF MODIFIED FILES: 
M       configure
M       doc/README.cygwin.md
M       doc/README.netcdf4par

TESTS CONDUCTED: 
1. Checked whether model compiles on Cygwin in DWesl#1
2. The Jenkins tests have passed.

RELEASE NOTE: Fix compilation on Cygwin.
  • Loading branch information
weiwangncar committed Feb 5, 2024
1 parent bcd3e50 commit 53f3460
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if `pwd | grep ' ' > /dev/null ` ; then
echo and this may cause problems for your build. This can occur, for example, on
echo Windows systems. It is strongly recommended that you install WRF and other
echo related software such as NetCDF in directories whose path names contain no
echo white space. On Win, for example, create and install in a directory under C:.
echo white space. On Windows, for example, create and install in a directory under C:.
echo '*****************************************************************************'
fi

Expand Down Expand Up @@ -659,7 +659,7 @@ fi
#Checking cross-compiling capability for some particular environment
#on Linux and Mac box

if [ $os = "Linux" -o $os = "Darwin" ]; then
if [ $os = "Linux" -o $os = "Darwin" -o $os = "CYGWIN_NT" ]; then

SFC=`grep '^SFC' configure.wrf | awk '{print $3}'`
SCC=`grep '^SCC' configure.wrf | awk '{print $3}'`
Expand Down
17 changes: 17 additions & 0 deletions doc/README.cygwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,28 @@
- gcc-core (OpenMP for smpar)
- gcc-fortran
- libnetcdf-fortran-devel
- libnetcdf-devel
- libhdf5-devel
- zlib-devel
- openmpi (MPI for dmpar)
- libopenmpi-devel (MPI for dmpar)
- libhwloc-devel (MPI for dmpar)
- libevent-devel (MPI for dmpar)
- libjasper-devel (GRIB)
- perl
- perl_base
- tcsh
- m4
- make
- libtirpc-devel
- sed
- gawk
- tar
- gzip
- coreutils
- which
- file
- grep
- Select install
- Accept the packages pulled in as dependencies
- Wait for download, install, and postinstall steps. This will
Expand Down
2 changes: 1 addition & 1 deletion doc/README.netcdf4par
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Performance seems to vary with how 'regular' the domain decomposition is
(i.e., patch size). Some experimentation with manually setting the decomposition
may be needed for optimal writing times. Also pay attention to file system
striping (Lustre), where setting the number stripes should not exceed the
number of nodes used by the job.
number of nodes used by the job.

0 comments on commit 53f3460

Please sign in to comment.