marlonecobos / kuenm

kuenm: An R package for detailed calibration and construction of Maxent Ecological Niche Models.
63 stars 24 forks source link

prepare_swd and kuenm_cal_swd are too slow #61

Open lcsjunior opened 11 months ago

lcsjunior commented 11 months ago

Hi, I have been helping my wife and her colleague to run their analyzes in R and I have made my computer available for this.

It turns out that prepare_swd has created a huge amount of files in the background, more than 600,000 files.

While kuenm_cal_swd has been inefficient and slow, I have made 16GB available for max.memory java, but consumption and processing are low.

Following commands:

prepare_swd(occ = occurrences, species = "species", longitude = "longitude", 
            latitude = "latitude", data.split.method = "random", 
            train.proportion = 0.7, raster.layers = vars, sample.size = 10000,
            var.sets = "all_comb", min.number = 7, save = TRUE, 
            name.occ = "occ", back.folder = "Background", set.seed = 1)

and...

kuenm_cal_swd(occ.joint = oj, occ.tra = otr, occ.test = ote, 
              back.dir = back, batch = bcal, out.dir.models = candir, 
              reg.mult = regm, f.clas = "basic",max.memory = 16384, 
              args = NULL, maxent.path = mxpath,
              selection = "OR_AICc",threshold = 5, rand.percent = 50, 
              iterations = 500, kept = TRUE, out.dir.eval = cresdir)

Is there any way to improve this? Use more threads, parallel processing, etc.? Parameterization?

Is it normal and expected for kuenm to take more than a week to complete?

NimoLululu commented 10 months ago

I am not sure but maybe you can have a try. opent and edit maxent.bat in txt, adjust the maximum memorry.

lcsjunior commented 10 months ago

Hi @NimoLululu, thanks for the feedback. Unfortunately this ran for more than ten days with memory at 8192 for maxent. So the pc is idle while running. Efficiency is not good.