Skip to content

run times #1

Description

@Basquill

hi @rvalavi. Not sure if you want feedback on this tool. Any insight would be appreciated.

  • Note, I have openMP on my desktop. It's in a folder for the Rcpp package. That package isn't a dependency for gdmtools though, so I don't know if openMP is being called upon.

I ran 2-3 trials today. One minor error when I used a terra::vect() to bring in a protected area shapefile. That kicked an error when I ran par_index()

  • Error in par_index(x, pa, mod, n = NULL, ncores = -1, filename = "test") :
  • pa must be a vector, raster or a data frame of GDM transform values for protected areas.

So, I created a dataframe of GDM-transformed values from the pa, and that seemed to work.

To test this function, I simplified my data.


First, I first created both 1 & 3 layer subsets of GDM-transformed rasters. My full GDM model had been fit with 6 layers. I then created pa object with 1 and 3 protected areas.

[I have 20 cores on my computer, but have found it's best not to call them all.]

My first trial (3 layer raster; 3 protected areas)

  • I checked the memory require to process raster
    mem_info()

Memory (GB) (for raster)

check threshold : 1 (memmin)
available : 19.77
allowed (50%) : 9.88
needed (n=1) : 34.16
proc in memory : FALSE
nr chunks : 7

Then I stipulated the intercept from my fitted GDM model

mod <- 0.209

  • test par_index function

par_index(x, pa.gdm.values, mod, n = NULL, ncores = -1, filename = "test") # this ran for 4.5 hours and hadn't finished.


My second trial (1 layer raster; 1 protected area):

  • memory require to process raster
    mem_info()

Memory (GB)
check threshold : 1 (memmin)
available : 19.77
allowed (50%) : 9.89
needed (n=1) : 17.08
proc in memory : FALSE
nr chunks : 4

mod <- 0.209 -- intercept from fitted model

  • test par_index function

par_index(x, pa.gdm.values, mod, n = NULL, ncores = 4, filename = "test") # this ran for 2.5 hours and hadn't finished

Based on your tests, is there anything that you'd do differently? Thanks very much

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions