pangeo-data / xESMF

Universal Regridder for Geospatial Data
http://xesmf.readthedocs.io/
MIT License
189 stars 34 forks source link

Support for ARM architecture for M1 Mac (OS X) #165

Closed guigrpa closed 1 year ago

guigrpa commented 2 years ago

Sorry if this has been asked elsewhere (I couldn't find it). Are there plans to support ARM binaries for M1 Macs?

Levin000 commented 2 years ago

Sorry if this has been asked elsewhere (I couldn't find it). Are there plans to support ARM binaries for M1 Macs?

maybe it's the question of esmpy which depended by xesmf.

1 2
huard commented 2 years ago

@rokuingh Are there plans for ESMpy to be built on ARM?

rokuingh commented 2 years ago

@huard we don't currently have plans for this, but I added a feature request. Unfortunately the ESMF support repo is private but someone will contact you when this issue is prioritized.

rokuingh commented 2 years ago

@huard a port for ARM64 has been added to the upcoming patch release 8.3.1, this will show up in conda-forge when it is available.

huard commented 1 year ago

@guigrpa Do you want to give it a try now ?

guigrpa commented 1 year ago

I will definitely try it out, probably when I come back to this feature of our project in a month or so. Thanks!

kevinrosa commented 1 year ago

Looks like ESMF ARM support has been merged https://github.com/conda-forge/esmf-feedstock/commit/bfdd28c64db029292bdfe19c9dbcba7760c161ed

huard commented 1 year ago

@guigrpa Any news on this ?

philippemiron commented 1 year ago

Just tried to install right now on a M1, and I got the following results:

$ conda install xesmf                                                                                      
Retrieving notices: ...working... done                                                                     
Collecting package metadata (current_repodata.json): done                                                  
Solving environment: done                                                                                  

## Package Plan ##                                                                                         

  environment location: /opt/homebrew/Caskroom/mambaforge/base/envs/dev                                    

  added / updated specs:                                                                                   
    - xesmf                                                                                                

The following packages will be downloaded:                                                                 

    package                    |            build                                                          
    ---------------------------|-----------------                                                          
    esmf-8.4.0                 | nompi_h57e96e1_3        21.4 MB  conda-forge                              
    esmpy-8.4.0                |nompi_py311h756c473_1         231 KB  conda-forge                          
    netcdf-fortran-4.6.0       |nompi_ha19a45f_102         393 KB  conda-forge                             
    xesmf-0.3.0                |             py_0          19 KB  conda-forge                              
    ------------------------------------------------------------                                           
                                           Total:        22.1 MB                                           

The following NEW packages will be INSTALLED:                                                              

  esmf               conda-forge/osx-arm64::esmf-8.4.0-nompi_h57e96e1_3 
  esmpy              conda-forge/osx-arm64::esmpy-8.4.0-nompi_py311h756c473_1 
  netcdf-fortran     conda-forge/osx-arm64::netcdf-fortran-4.6.0-nompi_ha19a45f_102 
  xesmf              conda-forge/noarch::xesmf-0.3.0-py_0                                                  

Proceed ([y]/n)? y                                   

Downloading and Extracting Packages                                                                        

Preparing transaction: done                          

Verifying transaction: done                          
        Executing transaction: done

Then, in ipython:

import xesmf as xe
...
ModuleNotFoundError: No module named 'esmf'  
aulemahal commented 1 year ago

This is issue #212, i.e. a breaking change in ESMpy 8.4. xESMF was adapted to this change in v 0.7.

Is there a reason v 0.3 was installed here, seems quite vintage ?

ARM architecture seems supported in ESMpy 8.3.1, as hinted at above, you could try to downgrade ESMpy if upgrading xESMF fails for now.

philippemiron commented 1 year ago

Yeah, I'm not sure why it installed such an outdated version in my main environment. I've created a new one for xesmf and it's working. Thanks for the fast answer :D

huard commented 1 year ago

Thanks for the update!