Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caught segfault #15

Open
MohammadDara opened this issue Dec 18, 2023 · 0 comments
Open

Caught segfault #15

MohammadDara opened this issue Dec 18, 2023 · 0 comments

Comments

@MohammadDara
Copy link

Running the following sample code in the Apple silicon processors will cause a caught segfault.

library(dismo)
library(rJava)
library(raster)
library(sf)
occurence <- paste(system.file(package="dismo"), '/ex/bradypus.csv', sep='')
occ <- read.table(occurence, header=TRUE, sep=',')[,-1]

# witholding a 20% sample for testing 
fold <- kfold(occ, k=5)
occtest <- occ[fold == 1, ]
occtrain <- occ[fold != 1, ]

files <- list.files(path=paste(system.file(package="dismo"), '/ex',
                               sep=''),  pattern='grd',  full.names=TRUE )
#predictors of the model, the rasters. 
predictors<-stack(files[1:8])

#run the algorithm.
me<-maxent(predictors, occtrain)

The error is:

 *** caught segfault ***
address 0xfffffffffffffff0, cause 'invalid permissions'

Traceback:
 1: rJava::.jcall(mxe, "S", "fit", c("autorun", "-e", afn, "-o",     dirout, "-s", pfn, args))
 2: .local(x, p, ...)
 3: maxent(x, p, ...)
 4: maxent(x, p, ...)
 5: .local(x, p, ...)
 6: maxent(predictors, occtrain)
 7: maxent(predictors, occtrain)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant