ropensci / nlrx

nlrx NetLogo R
https://docs.ropensci.org/nlrx
GNU General Public License v3.0
77 stars 12 forks source link

Problems running nlrx on an HPC #58

Closed JoLetsch closed 1 year ago

JoLetsch commented 2 years ago

Hello there,

I was using nlrx on my local mashine, as well as on an linux HPC. Everything was working fine, despite getting a bunch of warning messages:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.openide.util.lookup.implspi.ActiveQueue$Impl (file:/work3/jonas/netlogo/NetLogo%206.1.1/app/extensions/.bundled/nw/gephi-toolkit-0.8.2.jar) to field java.lang.ref.ReferenceQueue.lock WARNING: Please consider reporting this to the maintainers of org.openide.util.lookup.implspi.ActiveQueue$Impl WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Then suddently, and in the middle of a larger job, there were problems on the HPC. The individual jobs didnt finish and I got these reappearing warning messages (every 30 sec):

Nov 29, 2021 11:19:10 AM java.util.prefs.FileSystemPreferences syncWorld WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. Nov 29, 2021 11:19:40 AM java.util.prefs.FileSystemPreferences syncWorld WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. Nov 29, 2021 11:20:10 AM java.util.prefs.FileSystemPreferences syncWorld WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

I cannot figgure out what the problem is, since it seems to be an issue with java and not R. I set JAVA_HOME path, but this is pretty much all I can do, since I dont know java. Do you have any idea what the issue could be?

Here are the first lines of my sessionInfo():

R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.1 LTS

This is the openjdk version and the JAVA_HOME path I am using:

openjdk version "11.0.11" 2021-04-20

/usr/lib/jvm/java-11-openjdk-amd64

Let me know if you more sessionInfo output or other information.

Thanks a lot in advance!

bitbacchus commented 2 years ago

Hm, I'm not sure but I'd suspect that there is an issue with the network plugin in NetLogo. It apparently uses the gephi-toolkit, which seems to be picky about the Java version your are using. Reading this issue https://github.com/gephi/gephi/issues/2189, I'd first try to export LIBGL_ALWAYS_SOFTWARE=1 and see if that gets rid of the issue, then try different Java versions (Java 8, also try Oracle Java) and have another look at the issue reports on gephi and/or NetLogo's NW extention.

I hope you find a solution and please report back!

Sebastian

JoLetsch commented 2 years ago

Thanks for the qucik reply! I followed your advice and installed Java 8, which got rid of the first bunch of warning messages related to the network plugin.

However, I still get the reappearing warning messages and the job does not finish:

Dec 02, 2021 12:53:50 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Dec 02, 2021 12:54:20 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Dec 02, 2021 12:54:50 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

After I stop the job with strg+c I get this error message:

Error in `$<-.data.frame`(`*tmp*`, "siminputrow", value = 1) : 
  replacement has 1 row, data has 0

Do you have any idea what could be the reason?

The output of java -version:

java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
CaraAGallagher commented 1 year ago

Hello OP! Were you ever able to solve this issue? I'm encountering the same problem and it seems to happen regardless of whether I use nlrx or just headless netlogo. For me, it looks like it creates 99 java virtual machines everytime I submit a job even if I'm only running e.g. 20 simulations. Super weird and I can't figure it out so if you were able to solve this issue I'd be really interested in hearing how you went about it!

JoLetsch commented 1 year ago

Hello, in the end I figured out that the jobs are running all the way to the end despite the warning messages. However, I still dont know what these warning messages really mean.

nldoc commented 1 year ago

I am closing this issue because the warnings/errors are not related to nlrx but java/netlogo in general.