@@ -479,3 +479,46 @@ How do I diagnose a failure with a high-resolution run?
479
479
480
480
One possible source of failure with high-resolution runs is lack of memory. To
481
481
diagnose if this is the problem, try a low resolution run first.
482
+
483
+ How can I diagnose errors when building the model?
484
+ ==================================================
485
+
486
+ If the ``./case.build `` step fails, the first step is to inspect the build logs
487
+ in the case build directories. These files are called ``ufs.bldlog.YYMMDD-HHMMSS ``
488
+ and ``atm.bldlog.YYMMDD-HHMMSS ``, and may be compressed using ``gzip ``. In this case,
489
+ unzip them using ``gunzip ``.
490
+
491
+ How can I fix cmake build errors of type: This is now an error according to policy CMP0004
492
+ ==========================================================================================
493
+
494
+ If the model build fails with an error message like:
495
+
496
+ .. code-block :: console
497
+
498
+ CMake Error at CMakeLists.txt:180 (add_executable):
499
+ Target "NEMS.exe" links to item
500
+ "-L/lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64
501
+ -L/lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64
502
+ -lesmf -cxxlib -lrt -ldl
503
+ /lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64/libnetcdff.a
504
+ /lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64/libnetcdf.a
505
+ /lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64/libhdf5_hl.a
506
+ /lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64/libhdf5.a
507
+ /lustre/f2/pdata/esrl/gsd/ufs/modules/NCEPlibs-ufs-v1.1.0/intel-18.0.6.288/cray-mpich-7.7.11/lib64/libz.a
508
+ -g " which has leading or trailing whitespace. This is now an error
509
+ according to policy CMP0004.
510
+
511
+ then this usually means that one of the linker flags that the build process gathered from the ESMF MK file ``esmf.mk `` is either empty
512
+ or has trailing whitespaces. The easiest way to fix this is to locate ``esmf.mk `` (in the NCEPLIBS install directory, under ``lib ``
513
+ or ``lib64 ``) and check the following entries:
514
+
515
+ .. code-block :: console
516
+
517
+ ESMF_F90COMPILEPATHS
518
+ ESMF_F90ESMFLINKRPATHS
519
+ ESMF_F90ESMFLINKPATHS
520
+ ESMF_F90ESMFLINKLIBS
521
+ ESMF_F90LINKOPTS
522
+
523
+ If any of these is empty, simply add ``-g `` and make sure that there is no trailing whitespace added after it. For all others, check
524
+ that there are no trailing whitespaces. It is advisable to make a backup copy of this file before editing it manually.
0 commit comments