I am trying to compile h5py to run with the mpi4py that comes already compiled with ParaView. As soon as I try to import the h5py package I get the error message:
ValueError: mpi4py.MPI.Status has the wrong size, try recompiling. Expected 40, got 48
I am using Open MPI to build h5py with the --mpi option to make use of the parallel functionalities.
I am suspecting the issue being how I compiled Open MPI but I could not find a flag in the configure script that looks something like the error message.
Any help/link/comment is appreciated.
Related
Until recently I have been using rpy2 to load an R package into a Jupyter notebook running a Python kernel, and use it to read some data from a sqlserver database. A few days ago, I started seeing this error:
import rpy2.robjects as ro
R[write to console]: Error: cons memory exhausted (limit reached?)
Following this error the Python kernel crashes and is restarted by Jupyter. I would like to understand this error, what is causing it and why it has appeared when the same code ran without errors previously.
This answer, on r-devel, suggests that it is an R error produced by exceeding a maximum number of objects:
[Rd] How to debug: Cons memory exhausted
Other than this, there seems to be very little information available about this error.
The error occurs on the first line in my code. This, and the fact that the code ran previously, makes me think something is being cached from a previous sessions. I can import the data in R (using RStudio), so I think this is specific to Jupyter/rpy2 rather than a general R issue. It is not specific to this particular notebook though - if I run the above import in another notebook, on a different kernel, I get the same error. So my questions are:
Is an excess of R Objects the only thing that causes this error, or might it be something else?
Is this likely a caching problem or am I on the wrong track here?
Where might these objects be cached? (and how can I safely clear them?)
I am using jupyterlab in a conda venv on Windows 10 in a remote Amazon workspace. I have no admin privileges. Here are some versions:
import session_info
session_info.show()
-----
rpy2 3.4.4
session_info 1.0.0
-----
Click to view modules imported as dependencies
-----
IPython 7.16.1
jupyter_client 6.1.6
jupyter_core 4.6.3
jupyterlab 2.1.5
notebook 6.0.3
-----
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]
Windows-10-10.0.14393-SP0
-----
Searching SO reveals many ways in which importing robjects can fail, but I can only find one about this specific error (with no answers given):
RPY2 3.3.5 Errors on import
Tangentially, it seems as though this question might be germane:
Is it safe to manually delete all files in pkgs folder in anaconda python?
Is it recommended to clear out $HOME\AppData\Local\conda\conda\pkgs\cache regularly? (UPDATE: There were some quite large files in this cache folder but clearing them did not solve the issue).
UPDATE: I see the same error in Spyder, running outside the venv, so this isn't specific to jupyter.
UPDATE: I can import rpy2. A simple import rpy2 produces no error.
UPDATE:
import rpy2.situation as rps
for row in rps.iter_info():
print(row)
gives:
rpy2 version:
3.4.4
Python version:
3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]
Looking for R's HOME:
Environment variable R_HOME: None
InstallPath in the registry: C:\Program Files\R\R-3.6.1
Environment variable R_USER: None
Environment variable R_LIBS_USER: None
R version:
In the PATH:
Loading R library from rpy2: OK
Additional directories to load R packages from:
None
C extension compilation:
Warning: Unable to get R compilation flags.
Environment variables are not set in rpy2. Could this mean that R_NSIZE is unset, and could this cause the error?
I have fixed this by adding system environment variables: R_HOME, R_USER, and Path. [windows10, R 4.1.0, rpy2 3.4.5, python 3.8]
For me, this problem was caused by a .Rprofile file (a start-up file for R) that was located at %USERPROFILE%\Documents\.Rprofile (on Windows 11) which contained the following R code:
if (interactive()) {
require(conflicted)
}
The initialization of the R interpreter (as done through rpy2) was not able to handle loading the conflicted library. To understand why I created that .Rprofile, please review this tidyverse blog post: https://www.tidyverse.org/blog/2018/06/conflicted/
Commenting out those three lines in the .Rprofile fixed the import rpy2.robjects crash for me.
I am trying to use the Pardiso package in Julia together with the Pardiso library. However, I can’t build the package. When I look into the build log, I see this message:
Looking in “C:\Users\Rodrigo.julia\packages\Pardiso\yZsYO\deps” for libraries
found “C:\Users\Rodrigo.julia\packages\Pardiso\yZsYO\deps\libpardiso600-WIN-X86-64.dll”, attempting to load it…
failed to load due to:
did not find libpardiso, assuming PARDISO 5/6 is not installed
I don't know if I need anything else besides the pardiso.lic and libpardiso600-WIN-X86-64.dll files.
Thanks
I have installed the tensorflow package.
The following commands work fine in R command line
library(tensorflow)
sess = tf$Session
However when I run the same 2 linesin Rstudio I get the following error
Error: Python module tensorflow was not found
Detected Python configuration:
...
numpy: [NOT FOUND]
I suspect its numpy related but I have no idea.
This is my Rstudio information
rstudio::versionInfo()
$version
[1] ‘0.98.1103’
$mode
[1] "desktop"
Do I need to use a different version of Rstudio or is there more setup required to get tensorflow to work?
A bit more details after reading
https://github.com/rstudio/tensorflow/issues/87
import('numpy')
Error in py_module_import(module, convert = convert) : ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified path is invalid.
**************** FINAL EDIT *********************
I got this to work. But I have no idea why or how.
During install_tensorflow() in Rstudio, you are prompted to add the following to your PATH so I did
usr\appdata\local\programs\python\python36\Scripts
I removed it from my PATH and successfully ran tensorflow in Rstudio.
However, I added it back subsequently and could not replicate the error.
In the end I still don't know what is broken in Rstudio or what fixed it
Please use the following command to reload dynamic library paths
sudo ldconfig
I am new in working with linux. I am trying to analyse sequencing data using dropEst pipeline https://github.com/hms-dbmi/dropEst#dropreport. I want to run the DropReport and for that I need to install dropEstR package.
I tried by :
devtools::install_github('hms-dbmi/dropEst/dropestr' , dependencies = T)
as they suggest and I get as an error:
bash: syntax error near unexpected token
`'hms-dbmi/dropEst/dropestr','
Do you have any idea what should I do differently?
I think you are using the "wrong" shell. You have to use R/RStudio, when you want to use the devtools package. From CRAN:
Title Tools to Make Developing R Packages Easier
I just tried you command in RStudio but installation fails in the end:
ERROR: dependency 'Rcpp' is not available for package 'dropestr'
* removing 'C:/R/R-3.4.2/library/dropestr'
Installation failed: Command failed (1)
You have to run such script on RStudio for R. Import your project here and run it.
You can download it from enter link description here
Happy Coding.
I'm trying to build and install JAGS on a cluster that uses GPFS as its filesystem. I'm running into problems with the configure script:
./configure --prefix=$HOME/JAGS/ --with-lapack=/cm/shared/apps/lapack/gcc/64/3.6.0/liblapack.so
Error:
configure: error: "You need to install the LAPACK library"
I'm specifying the location of the dynamic library, but the script doesn't accept that it exists on the system. What is the cause of this?
I figured out the issue. I needed to link to BLAS by using the "--with-blas" flag. The configure script does not have an error message for a missing BLAS link, it instead treats it as a missing reference to the LAPACK library.