gaelforget / MITgcm.jl

Julia interface to MITgcm
https://gaelforget.github.io/MITgcm.jl/dev/
MIT License
21 stars 6 forks source link

[JOSS Review] Repository #106

Open simone-silvestri opened 2 weeks ago

simone-silvestri commented 2 weeks ago
  1. I was able to run the example provided in https://gaelforget.github.io/MITgcm.jl/dev/examples/ on a Linux computer but not on my Mac M1. After some investigation, most likely it was a problem with the optfile for Apple silicon that was recently changed (probably after https://github.com/MITgcm/MITgcm/pull/613). Eventually, I was able to run the advect_xy configuration by specifying a NETCDF_ROOT directory. However, the error message was not instructive so it was difficult to assess the problem. I would suggest more verbose error messages such that the user can diagnose what is wrong (or even report the error through an issue on this repo)
  2. A couple of bugs in the MITgcm_scan_output.jl example:
    • When selecting the ECCO grid the error is UndefVarError: Point2 not defined
    • When selecting the verification grid I get type Missing has no field params_files (I think it refers to the variable sc)
  3. MITgcm.jl_run example: the only case that runs is the advect_xy, all the other configurations fail to build with the error model compilation may have failed
  4. MITgcm_workflow.jl` example:
    • The advect_xy configuration runs and shows a visualization of the results.
    • The other cases fail with the error message KeyError: key :setup not found
  5. I have problems with building other examples such as HS94_animation.jl
  6. Given that most of the examples do not work on my laptop, I think it might be a configuration issue from my side. Providing a non-pluto example that produces a headless visualization (such as with CairoMakie) would help me test the repo on a remote linux machine.
  7. as written in #105 (and given point 7.) I would add an example that runs in the terminal (for non-GUI people like myself) so that it is not necessary to open Pluto which requires a graphical user interface
gaelforget commented 2 weeks ago
  1. I was able to run the example provided in https://gaelforget.github.io/MITgcm.jl/dev/examples/ on a Linux computer but not on my Mac M1. After some investigation, most likely it was a problem with the optfile for Apple silicon that was recently changed (probably after new build-options file for darwin arm64 MITgcm/MITgcm#613).

Sorry for this! I had not updated the default version of MITgcm that MITgcm.jl uses. Should work now with MITgcm.jl v0.4.0 that uses MITgcm-checkpoint68.

Eventually, I was able to run the advect_xy configuration by specifying a NETCDF_ROOT directory. However, the error message was not instructive so it was difficult to assess the problem. I would suggest more verbose error messages such that the user can diagnose what is wrong (or even report the error through an issue on this repo)

The NETCDF_ROOT issue seems to come from MITgcm itself, and maybe there's a bug with the genmake2 script that creates the Makefile.

Found these two issue : https://github.com/MITgcm/MITgcm/issues/82 & https://github.com/MITgcm/MITgcm/issues/635 . I believe there was some explanation about NETCDF_ROOT in the documentation but strangely that seems to have been cut, making things worse.

Like you, I find that I need NETCDF_ROOT defined to build the verification examples. But even if I do (line below that matches what I see in nc-config --all) then genmake2 turns off mnc (the package that would generated netcdf files). The examples run but generate binary output.

`export NETCDF_ROOT='/opt/homebrew/Cellar/netcdf/4.9.2_1/'

And If undefined NETCDF_ROOT then we end up with an incorrect Makefile that has :

LIBS = -L/opt/homebrew/Cellar/netcdf-fortran/4.6.1/lib -lnetcdff -lnetcdf -lnetcdf

simone-silvestri commented 2 weeks ago

Sorry for this! I had not updated the default version of MITgcm that MITgcm.jl uses. Should work now with MITgcm.jl v0.4.0 that uses MITgcm-checkpoint68.

Thanks, then I'll try again after updating the repo and setting the NETCDF_ROOT flag

gaelforget commented 2 weeks ago

2 A couple of bugs in the MITgcm_scan_output.jl example: When selecting the ECCO grid the error is UndefVarError: Point2 not defined When selecting the verification grid I get type Missing has no field params_files (I think it refers to the variable sc)

Should be fixed after https://github.com/gaelforget/MITgcm.jl/pull/108 and https://github.com/gaelforget/MITgcm.jl/pull/109

gaelforget commented 2 weeks ago

3 MITgcm.jl_run example: the only case that runs is the advect_xy, all the other configurations fail to build with the error model compilation may have failed

Should be fixed (using v0.4.0 of MITgcm.jl, NETCDF_ROOT, + https://github.com/gaelforget/MITgcm.jl/pull/110)

gaelforget commented 2 weeks ago

4 MITgcm_workflow.jl` example: The advect_xy configuration runs and shows a visualization of the results. The other cases fail with the error message KeyError: key :setup not found

6 I have problems with building other examples such as HS94_animation.jl

Should be fixed (using v0.4.0 of MITgcm.jl, NETCDF_ROOT -- to support ARM laptops)

gaelforget commented 2 weeks ago

7 Given that most of the examples do not work on my laptop, I think it might be a configuration issue from my side. Providing a non-pluto example that produces a headless visualization (such as with CairoMakie) would help me test the repo on a remote linux machine. 8 as written in https://github.com/gaelforget/MITgcm.jl/issues/105 (and given point 7.) I would add an example that runs in the terminal (for non-GUI people like myself) so that it is not necessary to open Pluto which requires a graphical user interface

Will address this @ https://github.com/gaelforget/MITgcm.jl/issues/105

Good points!

gaelforget commented 2 weeks ago

7 Given that most of the examples do not work on my laptop,

Hi @simone-silvestri

About building on your laptop, can you try with export NETCDF_ROOT=/opt/homebrew ?

This fixed it for me.

See jahn's suggestion @ https://github.com/MITgcm/MITgcm/issues/846#issuecomment-2181691225

simone-silvestri commented 1 week ago

Thanks @gaelforget, today I ll test the changes and update you

gaelforget commented 1 week ago

Great! Thank you

ps. I am about to release v0.4.1

gaelforget commented 1 week ago

Given that most of the examples do not work on my laptop, I think it might be a configuration issue from my side. Providing a non-pluto example that produces a headless visualization (such as with CairoMakie) would help me test the repo on a remote linux machine.

done

ps. about configuration issue from my side, I had the same issue I think on new Mac laptop. see https://github.com/MITgcm/MITgcm/issues/846

as written in https://github.com/gaelforget/MITgcm.jl/issues/105 (and given point 7.) I would add an example that runs in the terminal (for non-GUI people like myself) so that it is not necessary to open Pluto which requires a graphical user interface

done

ps. I don't think that running Pluto notebooks requires a graphical user interface. In a terminal window, or batch, using Pluto; Pluto.activate_notebook_environment("nb.jl"); include(nb.jl) as well as PlutoSliderServer.export_notebook("nb.jl") should work.

gaelforget commented 1 week ago

All set of this issue (1 to 8)?