-
DWesl authored
TYPE: enhancement KEYWORDS: compilation, cygwin, new platform, build system SOURCE: Daniel Wesloh (The Pennsylvania State University Department of Meteorology and Atmospheric Science) DESCRIPTION OF CHANGES: The WRF compilation script did not support compiling on Cygwin. #911 added support for that compilation, and generated feedback to ensure those changes did not break compilation on other platforms. This PR incorporates those suggestions and the changes required by them. I moved the `LIB_BUNDLED` and `LIB_EXTERNAL` default definitions from the `configure.wrf` postamble to the preamble so I could override them in `configure.defaults` on non-Windows platforms. This required copying the processing of the postamble in `arch/Config.pl` to where it processed the preamble so that the variables used in the definitions of `LIB_BUNDLED` and `LIB_EXTERNAL` would still be substituded. One additional change was necessary: the system version of libjasper on cygwin is recent enough that `struct jas_image_t` has no `inmem_` member, so that the reference to `inmem_` must be commented out for Grib2 support to work. I did not include that change here as that is related to the version of the Jasper library on all platforms, not just cygwin. Dependency versions for current test: ```bash $ cygcheck -c cygwin gcc-core gcc-fortran libnetcdf-devel libnetcdf-fortran-devel openmpi libjasper-devel perl tcsh libhdf5-devel libopenmpi-devel openmpi $(cygcheck -cd | awk $'/libnetcdf[0-9]/ {print $1;}\n/libhdf5_[0-9]/ {print $1;}\n/libopenmpiusef08_[0-9]/ {print $1;}\n/libgomp[0-9]/ {print $1;}\n/libgfortran[0-9]/ {print $1;}\n/libjasper[0-9]/ {print $1;}\n/libnetcdf-fortran_[0-9]/ {print $1;}') Cygwin Package Information Package Version Status cygwin 3.1.2-1 OK gcc-core 9.2.0-1 OK gcc-fortran 9.2.0-1 OK libgfortran3 6.4.0-5 OK libgfortran4 7.4.0-1 OK libgfortran5 9.2.0-1 OK libgomp1 9.2.0-1 OK libhdf5-devel 1.10.6-1 OK libhdf5_10 1.8.20-1 OK libhdf5_101 1.10.2-1 OK libhdf5_103 1.10.6-1 OK libjasper-devel 2.0.14-1 OK libjasper1 1.900.22-1 OK libjasper4 2.0.14-1 OK libnetcdf-devel 4.7.3-1 OK libnetcdf-fortran-devel 4.5.2-1.1 OK libnetcdf-fortran_6 4.4.4-3 OK libnetcdf-fortran_7 4.5.2-1.1 OK libnetcdf11 4.4.1.1-1 OK libnetcdf13 4.6.1-2 OK libnetcdf15 4.7.3-1 OK libopenmpi-devel 3.1.5-1 OK libopenmpiusef08_11 1.10.7-1 OK libopenmpiusef08_40 3.1.5-1 OK openmpi 3.1.5-1 OK perl 5.26.3-2 OK tcsh 6.22.01-1 OK ``` ISSUE: Replaces #911 LIST OF MODIFIED FILES: M README M arch/Config.pl M arch/configure.defaults M arch/postamble M arch/preamble M configure M doc/README.cygwin.md M external/io_netcdf/makefile M tools/Makefile TESTS CONDUCTED: I used the script at https://github.com/davegill/wrf-coop/blob/master/build.csh to build and run WRF-ARW, WRF-NMM, and WRF-Chem on Windows Subsystem for Linux (debian) and on Cygwin. The build script does not consistently work, but running the indicated commands manually usually works fine. A regression test on LInux is successful, but an intermediate branch was required to circumvent a broken develop branch (from which this is based). ``` WRF NUMBER OF TILES = 1 No land surface physics option is used: sf_surface_physics = 0 Timing for main: time 0001-01-01_00:00:04 on domain 2: 1.12292 elapsed seconds Timing for main: time 0001-01-01_00:00:08 on domain 2: 0.91971 elapsed seconds Timing for main: time 0001-01-01_00:00:12 on domain 2: 0.91965 elapsed seconds Timing for main: time 0001-01-01_00:00:12 on domain 1: 6.95076 elapsed seconds Timing for main: time 0001-01-01_00:00:16 on domain 2: 0.92157 elapsed seconds Timing for main: time 0001-01-01_00:00:20 on domain 2: 0.92541 elapsed seconds Timing for main: time 0001-01-01_00:00:24 on domain 2: 0.92848 elapsed seconds Timing for main: time 0001-01-01_00:00:24 on domain 1: 3.92829 elapsed seconds Timing for main: time 0001-01-01_00:00:28 on domain 2: 0.93069 elapsed seconds Timing for main: time 0001-01-01_00:00:32 on domain 2: 0.93314 elapsed seconds Timing for main: time 0001-01-01_00:00:36 on domain 2: 0.93447 elapsed seconds Timing for main: time 0001-01-01_00:00:36 on domain 1: 3.95087 elapsed seconds Timing for main: time 0001-01-01_00:00:40 on domain 2: 0.94396 elapsed seconds Timing for main: time 0001-01-01_00:00:44 on domain 2: 0.93751 elapsed seconds Timing for main: time 0001-01-01_00:00:48 on domain 2: 0.93741 elapsed seconds Timing for main: time 0001-01-01_00:00:48 on domain 1: 3.97565 elapsed seconds Timing for main: time 0001-01-01_00:00:52 on domain 2: 0.93471 elapsed seconds Timing for main: time 0001-01-01_00:00:56 on domain 2: 0.93481 elapsed seconds Timing for main: time 0001-01-01_00:01:00 on domain 2: 0.93528 elapsed seconds Timing for Writing wrfout_d02_0001-01-01_00:01:00 for domain 2: 0.03285 elapsed seconds Timing for main: time 0001-01-01_00:01:00 on domain 1: 3.99505 elapsed seconds Timing for Writing wrfout_d01_0001-01-01_00:01:00 for domain 1: 0.03183 elapsed seconds d01 0001-01-01_00:01:00 wrf: SUCCESS COMPLETE WRF ``` RELEASE NOTE: Introduce a Windows-based WRF build and run via the free Unix-like CYGWIN environment.
DWesl authoredTYPE: enhancement KEYWORDS: compilation, cygwin, new platform, build system SOURCE: Daniel Wesloh (The Pennsylvania State University Department of Meteorology and Atmospheric Science) DESCRIPTION OF CHANGES: The WRF compilation script did not support compiling on Cygwin. #911 added support for that compilation, and generated feedback to ensure those changes did not break compilation on other platforms. This PR incorporates those suggestions and the changes required by them. I moved the `LIB_BUNDLED` and `LIB_EXTERNAL` default definitions from the `configure.wrf` postamble to the preamble so I could override them in `configure.defaults` on non-Windows platforms. This required copying the processing of the postamble in `arch/Config.pl` to where it processed the preamble so that the variables used in the definitions of `LIB_BUNDLED` and `LIB_EXTERNAL` would still be substituded. One additional change was necessary: the system version of libjasper on cygwin is recent enough that `struct jas_image_t` has no `inmem_` member, so that the reference to `inmem_` must be commented out for Grib2 support to work. I did not include that change here as that is related to the version of the Jasper library on all platforms, not just cygwin. Dependency versions for current test: ```bash $ cygcheck -c cygwin gcc-core gcc-fortran libnetcdf-devel libnetcdf-fortran-devel openmpi libjasper-devel perl tcsh libhdf5-devel libopenmpi-devel openmpi $(cygcheck -cd | awk $'/libnetcdf[0-9]/ {print $1;}\n/libhdf5_[0-9]/ {print $1;}\n/libopenmpiusef08_[0-9]/ {print $1;}\n/libgomp[0-9]/ {print $1;}\n/libgfortran[0-9]/ {print $1;}\n/libjasper[0-9]/ {print $1;}\n/libnetcdf-fortran_[0-9]/ {print $1;}') Cygwin Package Information Package Version Status cygwin 3.1.2-1 OK gcc-core 9.2.0-1 OK gcc-fortran 9.2.0-1 OK libgfortran3 6.4.0-5 OK libgfortran4 7.4.0-1 OK libgfortran5 9.2.0-1 OK libgomp1 9.2.0-1 OK libhdf5-devel 1.10.6-1 OK libhdf5_10 1.8.20-1 OK libhdf5_101 1.10.2-1 OK libhdf5_103 1.10.6-1 OK libjasper-devel 2.0.14-1 OK libjasper1 1.900.22-1 OK libjasper4 2.0.14-1 OK libnetcdf-devel 4.7.3-1 OK libnetcdf-fortran-devel 4.5.2-1.1 OK libnetcdf-fortran_6 4.4.4-3 OK libnetcdf-fortran_7 4.5.2-1.1 OK libnetcdf11 4.4.1.1-1 OK libnetcdf13 4.6.1-2 OK libnetcdf15 4.7.3-1 OK libopenmpi-devel 3.1.5-1 OK libopenmpiusef08_11 1.10.7-1 OK libopenmpiusef08_40 3.1.5-1 OK openmpi 3.1.5-1 OK perl 5.26.3-2 OK tcsh 6.22.01-1 OK ``` ISSUE: Replaces #911 LIST OF MODIFIED FILES: M README M arch/Config.pl M arch/configure.defaults M arch/postamble M arch/preamble M configure M doc/README.cygwin.md M external/io_netcdf/makefile M tools/Makefile TESTS CONDUCTED: I used the script at https://github.com/davegill/wrf-coop/blob/master/build.csh to build and run WRF-ARW, WRF-NMM, and WRF-Chem on Windows Subsystem for Linux (debian) and on Cygwin. The build script does not consistently work, but running the indicated commands manually usually works fine. A regression test on LInux is successful, but an intermediate branch was required to circumvent a broken develop branch (from which this is based). ``` WRF NUMBER OF TILES = 1 No land surface physics option is used: sf_surface_physics = 0 Timing for main: time 0001-01-01_00:00:04 on domain 2: 1.12292 elapsed seconds Timing for main: time 0001-01-01_00:00:08 on domain 2: 0.91971 elapsed seconds Timing for main: time 0001-01-01_00:00:12 on domain 2: 0.91965 elapsed seconds Timing for main: time 0001-01-01_00:00:12 on domain 1: 6.95076 elapsed seconds Timing for main: time 0001-01-01_00:00:16 on domain 2: 0.92157 elapsed seconds Timing for main: time 0001-01-01_00:00:20 on domain 2: 0.92541 elapsed seconds Timing for main: time 0001-01-01_00:00:24 on domain 2: 0.92848 elapsed seconds Timing for main: time 0001-01-01_00:00:24 on domain 1: 3.92829 elapsed seconds Timing for main: time 0001-01-01_00:00:28 on domain 2: 0.93069 elapsed seconds Timing for main: time 0001-01-01_00:00:32 on domain 2: 0.93314 elapsed seconds Timing for main: time 0001-01-01_00:00:36 on domain 2: 0.93447 elapsed seconds Timing for main: time 0001-01-01_00:00:36 on domain 1: 3.95087 elapsed seconds Timing for main: time 0001-01-01_00:00:40 on domain 2: 0.94396 elapsed seconds Timing for main: time 0001-01-01_00:00:44 on domain 2: 0.93751 elapsed seconds Timing for main: time 0001-01-01_00:00:48 on domain 2: 0.93741 elapsed seconds Timing for main: time 0001-01-01_00:00:48 on domain 1: 3.97565 elapsed seconds Timing for main: time 0001-01-01_00:00:52 on domain 2: 0.93471 elapsed seconds Timing for main: time 0001-01-01_00:00:56 on domain 2: 0.93481 elapsed seconds Timing for main: time 0001-01-01_00:01:00 on domain 2: 0.93528 elapsed seconds Timing for Writing wrfout_d02_0001-01-01_00:01:00 for domain 2: 0.03285 elapsed seconds Timing for main: time 0001-01-01_00:01:00 on domain 1: 3.99505 elapsed seconds Timing for Writing wrfout_d01_0001-01-01_00:01:00 for domain 1: 0.03183 elapsed seconds d01 0001-01-01_00:01:00 wrf: SUCCESS COMPLETE WRF ``` RELEASE NOTE: Introduce a Windows-based WRF build and run via the free Unix-like CYGWIN environment.
Loading