oceanmodeling / ufs-weather-model

This repo is forked from ufs-weather-model, and contains the model code and external links needed to build the UFS coastal model executable and model components, including the ROMS, FVCOM, ADCIRC and SCHISM plus WaveWatch III model components.
https://github.com/oceanmodeling/ufs-coastal-app
Other
2 stars 3 forks source link

PIO cannot be found #3

Open platipodium opened 1 year ago

platipodium commented 1 year ago

On my Mac M1 in a consistent conda environment, the ./compile.sh fails to find the installed PIO library


$> ./compile.sh macosx.gnu "-DAPP=COASTALS -DNO_PARMETIS=ON -DOLDIO=ON coastal YES NO

-- Found ESMF: /opt/conda/envs/schism/lib/libesmf.a (found suitable version "8.4.1", minimum required is "8.3.0")
CMake Error at /opt/conda/envs/schism/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find PIO (missing: C Fortran) (Required is at least version
  "2.5.3")
Call Stack (most recent call first):
  /opt/conda/envs/schism/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/Modules/FindPIO.cmake:184 (find_package_handle_standard_args)
  CMakeLists.txt:144 (find_package)

-- Configuring incomplete, errors occurred!
platipodium commented 1 year ago

No I checked presence of PIO:

 ls $CONDA_PREFIX/include/pio*mod
/opt/conda/envs/schism/include/pio.mod          /opt/conda/envs/schism/include/piodarray.mod
/opt/conda/envs/schism/include/pio_kinds.mod    /opt/conda/envs/schism/include/piolib_mod.mod
/opt/conda/envs/schism/include/pio_nf.mod       /opt/conda/envs/schism/include/pionfatt_mod.mod
/opt/conda/envs/schism/include/pio_support.mod  /opt/conda/envs/schism/include/pionfget_mod.mod
/opt/conda/envs/schism/include/pio_types.mod    /opt/conda/envs/schism/include/pionfput_mod.mod

And then gave an additional hint as instructed in CMakeModules/Modules/FindPIO.cmake, i.e. to help by setting env variable PIO_ROOT:

$> export PIO_ROOT=$CONDA_PREFIX
$> ./compile.sh macosx.gnu "-DAPP=COASTALS -DNO_PARMETIS=ON -DOLDIO=ON -DPIO_ROOT=/opt/conda/envs/schism" coastal YES NO

Still doesn't find it

uturuncoglu commented 1 year ago

@platipodium I think we could also open ticket in UFS Weather Model side. I wonder if they are testing Mac regularly our not.

platipodium commented 1 year ago

@platipodium I think we could also open ticket in UFS Weather Model side. I wonder if they are testing Mac regularly our not.

I don't think this is a Mac issue as I am using a self-consistent conda environment. I believe the problem lies in the CMake module.

uturuncoglu commented 3 months ago

@janahaddad At this point we are not supporting macosx.gnu. I think even ufs-weather-model is not regularly checked on Mac. So, this is low priority at this point.

platipodium commented 3 months ago

@janahaddad At this point we are not supporting macosx.gnu. I think even ufs-weather-model is not regularly checked on Mac. So, this is low priority at this point.

As mentioned above, I don't think it's a Mac issue but a conda issue. Has anyone tested this under linux/conda?

uturuncoglu commented 3 months ago

@platipodium I did not use conda but I compiled under Docker container + regular Python without any issue.