troubleshooting_parallel_operations {enmSdmX}R Documentation

Troubleshooting parallel operations

Description

This is a guide to solving issues with running functions that can use more than one core. This includes the trainXYZ functions, bioticVelocity, and predictEnmSdm. Each of these function has the argument cores. By default, the value of cores is 1, so the function will use only one core. By setting this higher, you can use more cores on your machine. However, occasionally you will run into the error:
Error in checkForRemoteErrors(lapply(cl, recvResult)) :
2 nodes produced errors; first error: object '.doSnowGlobals' not found
This means that the worker "nodes" (different instances of R started by the function to run in parallel) cannot find the doParallel package, even if it is installed on your system.

There are several solutions to this issue. One of them may work for you, and none are inherent to enmSdmX, as far as I can tell.

Anti-virus is blocking R

Strangely enough, running R in parallel sometimes looks like you are accessing the internet to anti-virus software. So, it may block access to other instances of R. You will have to do some surgery on your anti-virus software settings to find where to change this.

Your R packages are not stored in the "traditional" place

R has a default directory where packages are stored on any system. If your packages are stored in a different place, worker nodes may not be able to find them if you use setwd to change the working directory. I do not know if you have to set the working directory back to the default for your system, or if you have to change it to the folder that contains the folder where your R packages reside (for me, they are the same directory). You can see what your current working directory is using getwd. RStudio will often change this directory automatically.

So, if you get this error, try using setwd to set your working directory to the default one for your system, or to the folder that contains the folder that contains your packages.

Let me know

I'm always game to help you track down your problems (with this package, not necessarily in general). The best way is to create an issue on GitHub.

Exorcise your computer

Not responsible for damage to your computer.


[Package enmSdmX version 1.1.2 Index]