mikael_k_witte@jpl_nasa_gov
New Member
In trying to compile CESM2.1.0 on my MacBook Pro (OS: Mojave 10.14.4/Darwin 18.5.0) for use in single column mode (i.e. SCAM), I've been using the README.md file included in $CIMEROOT/config/machines/userdefined_laptop_template to guide me through a homebrew-centric install and I wanted to make the developers aware of some deviations from the instructions given that I've run into. So far, the most frustrating experience was with installation of cprnc as opposed to compiling/running the model itself -- in fact, cprnc was the very last piece of the puzzle to come together. Disclaimer: I don't have an in-depth understanding of how cmake or make work, so I suspect there's a basic fix for the issues I highlight below that I'm just not aware of. In particular, I imagine there's a straightforward mechanism to pass compiler options to make but I couldn't figure out the right search terms to find a relevant example on stackoverflow, netcdf forum, etc. In README.md, the following instructions are given (I'm skipping things that worked fine. Again, this is only for the homebrew set up; I don't know how it would differ using macports):- install third party libraries from homebrew or macports. - home brew Install science tap : brew install gcc --without-multilib cmake mpich hdf5 --enable-fortran netcdf --enable-fortran Note: If you see an error while running create_newcase that
indicates perl can't find XML::LibXML, you may need to install
p5-xml-libxml as well.COMMENTS: The science tap has been deprecated; there is a legacy tap "brewsci/science" but I skipped straight to the brew formula given, which also had some issues. The "--without-multilb" option for gcc has been deprecated since Darwin is now fully 64-bit and the "--enable-fortran" option for hdf5 and netcdf is also gone. Most importantly, homebrew does NOT have a mechanism for enabling parallel I/O with hdf5/netcdf. I ended up uninstalling the homebrew taps and compiling hdf5 and netcdf from source code to enable parallel I/O. Note that this did NOT require a separate PnetCDF install, which appears to be necessary only if parallel I/O in the netcdf-2 format is desired; parallel netcdf-4 I/O can be enabled without any external package. - Some of the shell scripts used by cesm hard code "gmake" instead
of using the GMAKE variable from env_build.xml. To work around
this, you should install gnu make, or simply create a link from
make to gmake in you path. mkdir -p ${HOME}/local/bin ln -s `whereis make` ${HOME}/local/bin/gmake cat >> ${HOME}/.bashrc
indicates perl can't find XML::LibXML, you may need to install
p5-xml-libxml as well.COMMENTS: The science tap has been deprecated; there is a legacy tap "brewsci/science" but I skipped straight to the brew formula given, which also had some issues. The "--without-multilb" option for gcc has been deprecated since Darwin is now fully 64-bit and the "--enable-fortran" option for hdf5 and netcdf is also gone. Most importantly, homebrew does NOT have a mechanism for enabling parallel I/O with hdf5/netcdf. I ended up uninstalling the homebrew taps and compiling hdf5 and netcdf from source code to enable parallel I/O. Note that this did NOT require a separate PnetCDF install, which appears to be necessary only if parallel I/O in the netcdf-2 format is desired; parallel netcdf-4 I/O can be enabled without any external package. - Some of the shell scripts used by cesm hard code "gmake" instead
of using the GMAKE variable from env_build.xml. To work around
this, you should install gnu make, or simply create a link from
make to gmake in you path. mkdir -p ${HOME}/local/bin ln -s `whereis make` ${HOME}/local/bin/gmake cat >> ${HOME}/.bashrc