iiasa / RE4AFAGRI_platform

Official repository of the RE4AFAGRI modelling platform, H2020 LEAP-RE
https://www.re4afagri.africa
5 stars 1 forks source link

Error and warning messages in M-LED #21

Open Alemayehu-ETH opened 1 month ago

Alemayehu-ETH commented 1 month ago

Hi, I received error and warning messages while running [MLED_hourly.r ] for Rwanda

Error in getGlobalsAndPackages(expr, envir = envir, globals = globals) : The total size of the 4 globals exported for future expression (‘FUN()’) is 1.01 GiB.. This exceeds the maximum allowed size of 850.00 MiB (option 'future.globals.maxSize'). The three largest globals are ‘FUN’ (998.88 MiB of class ‘function’), ‘clusters_voronoi’ (30.31 MiB of class ‘list’) and ‘exact_extract’ (1.35 MiB of class ‘function’) --- Is this size fixed in the backend.r? A higher size also required for Ethiopia

Warning messages 1: In eval(family$initialize) : non-integer #successes in a binomial glm! 2: st_centroid assumes attributes are constant over geometries 3: In st_centroid.sfc(st_geometry(x), of_largest_polygon = of_largest_polygon) : st_centroid does not give correct centroids for longitude/latitude data 4: attribute variables are assumed to be spatially constant throughout all geometries 5: In CPL_crs_from_input(x) : GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order. 6: In .local(x, y, ...) : Polygons transformed to raster CRS (EPSG:NA) --- repeated many times up to number 50

giacfalk commented 1 month ago

Hi @Alemayehu-ETH, I believe this is a memory error. Could you please try following this?

https://github.com/iiasa/RE4AFAGRI_platform/wiki/M-LED#frequent-issues-and-faqs

Also, try this before running the code:

options(future.globals.maxSize= 891289600)

The additional warnings can be safely ignored.

Alemayehu-ETH commented 3 weeks ago

Thanks @giacfalk the memory issue is resolved now, and the model is successfully run for Rwanda but received another error while running for Ethiopia from the electricity access module:

Error in if (!is.na(unique(values(resources)))) { : the condition has length > 1

Regards

giacfalk commented 3 weeks ago

Thanks, @Alemayehu-ETH . Since the Ethiopia model is a new custom version, better to interact directly among us to check what could be wrong in there!

Alemayehu-ETH commented 3 weeks ago

Thank you @giacfalk for the support and I will send you a message if the error persists