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

Example now failing after update to R 4.1.1 and RStudio 2021.09.0 Build 351 #234

Closed
jjvenky opened this issue Nov 2, 2021 · 7 comments
Closed

Comments

@jjvenky
Copy link
Contributor

jjvenky commented Nov 2, 2021

After the update to R 4.1.1 and the necessary update of RStudio to 2021.09.0 Build 351, I had to reinstall all my R packages. This was fine (and expected) in Ubuntu 20.04.3 LTS.

Now, following the example from https://github.com/aemon-j/LakeEnsemblR/

> # 2. Run ensemble lake models
> run_ensemble(config_file = config_file, model = model)
Loading water temperature observations...[2021-11-02 14:05:21]
Finished loading water temperature observations![2021-11-02 14:05:22]
Running models... (Have you tried parallelizing?) [2021-11-02 14:05:22]
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file './FLake/output/output.dat': No such file or directory

The folder './FLake/output' exists but the output.dat does not.

This looks like a workding directory problem but getwd() shows '/home/jvenkiteswaran/tmp/example/feeagh' so './FLake/output' makes sense.

@JFeldbauer
Copy link
Collaborator

I think this might be an issue with the shared libraries and the models not running as a consequence of this. This is described in the wiki (https://github.com/aemon-j/LakeEnsemblR/wiki/Installation-issues).

To be sure if this is the cause of the issue you can run the models on their own using the run-model() function from the model specific packages, e.g.

FLakeR::run_flake(sim_folder = "FLake", verbose = TRUE)
GLM3r::run_glm(sim_folder = "GLM", verbose = TRUE)
GOTMr::run_gotm(sim_folder = "GOTM", verbose = TRUE)
SimstratR::run_simstrat(sim_folder = "Simstrat", par_file = "simstrat.par", verbose = TRUE)

@jjvenky
Copy link
Contributor Author

jjvenky commented Nov 2, 2021

@JFeldbauer OMG I'm in GLIBC hell. I'll walk through that wiki entry.

> FLakeR::run_flake(sim_folder = "FLake", verbose = TRUE)

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:
#0  0x7fd56c4bc32a
#1  0x7fd56c4bb503
#2  0x7fd56bf1420f
#3  0x7fd56c1a88d6
#4  0x55e0ac6fadac
#5  0x55e0ac6fcc51
#6  0x7fd56bef50b2
#7  0x55e0ac6f1ed9
#8  0xffffffffffffffff
Illegal instruction (core dumped)
character(0)
attr(,"status")
[1] 132
Warning message:
In system2(flake_path, wait = TRUE, stdout = TRUE, stderr = "",  :
  running command ''/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/FLakeR/exec/nixflake' flake.nml' had status 132
  
  
  
> GLM3r::run_glm(sim_folder = "GLM", verbose = TRUE)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/exec/nixglm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libgd.so.3)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/exec/nixglm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/exec/nixglm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libtiff.so.5)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/exec/nixglm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libwebp.so.6)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/exec/nixglm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libsqlite3.so.0)
[1] 1




> GOTMr::run_gotm(sim_folder = "GOTM", verbose = TRUE)
/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GOTMr/exec/nixgotm: /home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/GOTMr/extbin/nix/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/x86_64-linux-gnu/libsqlite3.so.0)



> SimstratR::run_simstrat(sim_folder = "Simstrat", par_file = "simstrat.par", verbose = TRUE)

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:
#0  0x7fe7275b032a
#1  0x7fe7275af503
#2  0x7fe72702320f
#3  0x7fe727294c7e
#4  0x55996ae5a860
#5  0x55996ae5e0f8
#6  0x55996ae790dc
#7  0x55996ae51b9e
#8  0x7fe7270040b2
#9  0x55996ae51bd9
#10  0xffffffffffffffff
Illegal instruction (core dumped)
[1] " Simstrat version 2.4"                                                                                 
[2] " This software has been developed at eawag - Swiss Federal Institute of Aquatic Science and Technology"
[3] " "                                                                                                     
[4] " [OK] Configuration: simstrat.par"                                                                     
[5] " [OK] Grid file successfully read"                                                                     
[6] " [OK] Morphology file successfully read"                                                               
[7] " [OK] Initial data file successfully read"                                                             
attr(,"status")
[1] 132
Warning message:
In system2(simstrat_path, wait = TRUE, stdout = TRUE, stderr = "",  :
  running command ''/home/jvenkiteswaran/R/x86_64-pc-linux-gnu-library/4.1/SimstratR/exec/nixsimstrat' simstrat.par' had status 132

@robertladwig
Copy link
Member

A quick fix for GLM3r would be to delete libm.so.6 inside the package, re-install it and try again

@JFeldbauer
Copy link
Collaborator

It should be enough to delet the libm.so.6 files in your local R installlation. This is usually located in your home dir e.g. ~/R/4.1/GLM3r/extbin/nixGLM

@jjvenky
Copy link
Contributor Author

jjvenky commented Nov 2, 2021

Wild. I remove all four libm.so.6 files and the models run.

./R/x86_64-pc-linux-gnu-library/4.1/GOTMr/extbin/nix/libm.so.6
./R/x86_64-pc-linux-gnu-library/4.1/FLakeR/extbin/nix/libm.so.6
./R/x86_64-pc-linux-gnu-library/4.1/GLM3r/extbin/nixGLM/libm.so.6
./R/x86_64-pc-linux-gnu-library/4.1/SimstratR/extbin/nix/libm.so.6

FTR the three versions of libm.so.6 installed in the /lib folder(s) all have different md5sums:

4aaad6c988fb8f356db567c0bf8f0d2d  /lib/x86_64-linux-gnu/libm.so.6
b2c721e8b382f3719927210ab5de9fd5  /lib/i386-linux-gnu/libm.so.6
a403e6f0fdcd5afa42cd6d50b0a09247  /lib32/libm.so.6

@jjvenky
Copy link
Contributor Author

jjvenky commented Nov 2, 2021

I will add (before closing this issue) a note from RStudio about R 4.1 that might be worth noting that there is a new graphics engine https://blog.rstudio.com/2021/06/09/rstudio-v1-4-update-whats-new/ and this might cause some problems.

@jjvenky jjvenky closed this as completed Nov 2, 2021
@tpetzoldt
Copy link

Wild. I remove all four libm.so.6 files and the models run.

> ./R/x86_64-pc-linux-gnu-library/4.1/GOTMr/extbin/nix/libm.so.6

Thanks, I had the same issue with GOTM and after searching the net for + an hour, removing libm.so.6 did the job.

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

4 participants