Closed sriharshakandala closed 2 months ago
There is a chance that it can be fixed by changing the operating system. Sorry :)
Can you, please, try installing GNU make with macports or homebrew and try building with it (you will need to run gmake
instead of make
, I guess)?
% gnumake --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
I see the same error with gnumake
Yes, the default version of make
that is available on macOS is GNU make but of a rather old version. It might be that the makefiles of the library rely on features of the tool that are available in the newer versions only. If a newer version from one of the aforementioned package managers does not work, I will try to reproduce the problem tomorrow on my machine.
I installed the latest version of gmake
through homebrew but still see the same error!
% gmake tests
gmake -C tests tests
gmake[1]: Entering directory '/Users/sriharshakandala/work/rte-rrtmgp/tests'
gmake[1]: *** No rule to make target 'mo_heating_rates.o', needed by 'check_variants.o'. Stop.
gmake[1]: Leaving directory '/Users/sriharshakandala/work/rte-rrtmgp/tests'
gmake: *** [Makefile:11: tests] Error 2
% gmake --version
GNU Make 4.4.1
Built for aarch64-apple-darwin23.0.0
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Thank you for checking.
I think that you need to set the RRTMGP_ROOT
shell variable to the absolute path of the root source directory:
export RRTMGP_ROOT=$(pwd)
make tests
@RobertPincus I remember that the variable was mentioned in the README.md
but #246 removed it and I can't find the information in the new documentation. Is it missing there?
I am able to compile with gmake tests
with the following changes:
RRTMGP_ROOT
, RRTMGP_DATA
NCHOME
, NFHOME
FCINCLUDE += -I$(NFHOME)/include
& LDFLAGS += -L$(NFHOME)/lib -L$(NCHOME)/lib
in a couple of makefilesPYTHON-python
to PYTHON-python3
numpy
, dask
and xarray
using pip.I am able to run gmake check
, but the test fails with the following output:
% gmake check
gmake -C tests check
gmake[1]: Entering directory '/Users/sriharshakandala/work/rte-rrtmgp/tests'
echo "Nothing to check in tests/"
Nothing to check in tests/
gmake[1]: Leaving directory '/Users/sriharshakandala/work/rte-rrtmgp/tests'
gmake -C examples/rfmip-clear-sky check
gmake[1]: Entering directory '/Users/sriharshakandala/work/rte-rrtmgp/examples/rfmip-clear-sky'
${PYTHON-python3} /Users/sriharshakandala/work/rte-rrtmgp/examples/compare-to-reference.py \
--ref_dir /Users/sriharshakandala/work/rrtmgp-data/examples/rfmip-clear-sky/reference --tst_dir /Users/sriharshakandala/work/rte-rrtmgp/examples/rfmip-clear-sky \
--var rld rlu rsd rsu --file r??_Efx_RTE-RRTMGP-181204_rad-irf_r1i1p1f1_gn.nc
Variable rld: No diffs
Variable rlu: No diffs
Variable rsd differs (max abs difference: 6.103516e-04; max percent difference: 7.136186e-05%)
Variable rsu differs (max abs difference: 1.831055e-04; max percent difference: 7.249035e-05%)
Tests failed
gmake[1]: *** [Makefile:61: check] Error 1
gmake[1]: Leaving directory '/Users/sriharshakandala/work/rte-rrtmgp/examples/rfmip-clear-sky'
gmake: *** [Makefile:17: check] Error 2
Is this expected?
@skosukhin Thanks for help @sriharshakandala. The documentation clearly needs updating though I guess #290 will address the issues as well?
"clearly needs updating" above means to document that one needs to set environment variables RRTMGP_ROOT, RRTMGP_DATA, and FAILURE_THRESHOLD at least, and potentially add to FCINCLUDE to make netCDF module files available.
Thank you @RobertPincus !
Thanks, @skosukhin . I will increase the tolerance a bit for the clear sky tests!
@sriharshakandala If you're able to run the tests as expected and have the guidance you need out of the box please feel free to close this issue.
Yes. Thanks, @RobertPincus !
Following the recommended build procedure in https://earth-system-radiation.github.io/rte-rrtmgp/how-tos/build-and-test.html
I see that the
make libs
works fine butmake tests
fails with the following errorPlease advise on how this can be fixed!