MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
231 stars 307 forks source link

Enhance lib / lib64 library detection for pnetcdf and netcdf #1203

Open islas opened 2 weeks ago

islas commented 2 weeks ago

The original additions of checking lib64/ for pnetcdf/netcdf (#592) made assumptions that when the variable supplied for the respective library location, if a lib64/ folder exists to use that. This leads to problems when existence of the actual library is not checked and if a lib64/ folder does exist but the library is not installed there. As this configuration layout is not unusual, the fix is to keep the precedence of lib64/, but check that the library exists within the directory before assigning values.

islas commented 2 weeks ago

Future work should consider using pkg-config or any of the pnetcdf-config / nc-config / nf-config to supply the appropriate link / compile flags. This would generally reduce the maintenance burden from rewriting logic that is already provided by those projects. Likewise, this would lean towards more standard package / dependency management rather than project-specific variables.

mgduda commented 1 day ago

@islas The commit message for ef3c4b38 references a commit (3dab782b) that doesn't seem to (no longer?) exists. Could you update the commit message?

islas commented 1 day ago

Ah! I cleaned up with a rebase before updating the remote, but didn't update the appropriate descriptions. Incoming fix

islas commented 1 day ago

islas/MPAS-Model@3dab782 now changed to islas/MPAS-Model@fe46d4f to reference islas/MPAS-Model@0ca4208