Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Error Building CESM: Cannot Find -lnetcdf

AshaJain

Asha Jain
New Member
Hello, I am porting CESM2.2 onto a CentOS 7 Linux machine. I have been playing around with the config_compilers.xml settings, but I am not able to resolve the following issue when building cesm from ./case.build.

ld: cannot find -lnetcdf
ld: cannot find -lmkl_cdft_core
ld: cannot find -lmkl_scalapack_lp64
ld: cannot find -lmkl_blacs_intelmpi_lp64

I have confirmed that netcdf, lapack and blas are installed. I've attached my config_compilers.xml and Macros.make. Any help to understand and solve this problem is greatly appreciated!
 

Attachments

  • Macros.make.txt
    2.3 KB · Views: 2
  • config_compilers.txt
    20.8 KB · Views: 4

jedwards

CSEG and Liaisons
Staff member
You failed to mention the name of your machine and I don't see any listed in config_compilers.xml
mkl is provided with the intel compiler and if properly configured on your system should be found without any settings in cesm.
 

AshaJain

Asha Jain
New Member
Hello, the machine name is viking-sky. Are you suggesting that there is no need to specify the mkl path in the machine specific compiler settings?
 

jedwards

CSEG and Liaisons
Staff member
config_compilers.xml expects to have environment variable NETCDF defined - is it? mkl should be in the intel
compiler distribution, you can look for it there and add that path to config_compilers.xml as well. If you don't have mkl
you should remove the mkl flags from SLIBS in the compiler definition. If you do have it you should use mkl instead of blas and lapack.
 

AshaJain

Asha Jain
New Member
I believe I do have mkl. I tried adding the path to the SLIBS flag for viking-sky:

-L/cluster/apps/intel/2017.2.174/compilers_and_libraries_2017.2.174/linux/mkl/lib/intel64 -lmkl_rt

I also tried -mkl flag. Both of these attempts resulted in:
ld: cannot find -lmkl_cdft_core
ld: cannot find -lmkl_scalapack_lp64
ld: cannot find -lmkl_blacs_intelmpi_lp64
 
Top