Problem building Pardiso in Julia on Windows - julia

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

Related

Installing Julia Packages via GitHub

To preface this question I am coming from the perspective of an absolute beginner, trying to learn Julia. I was recommended to try the SciML tutorial and in trying to install it have fallen at the first hurdle.
So far I have:
Installed Julia
Installed Anaconda
Installed Jupyter Notebook
Added "git" through the Anaconda console
Added "IJulia"
From here I have been able to open Jupyter through Anaconda and access Julia 1.7.3 within it. Following this I attempted to follow the instructions on the SciML website for getting started with the tutorial, which is to enter this code:
using Pkg
pkg"add https://github.com/SciML/SciMLTutorials.jl"
using SciMLTutorials
SciMLTutorials.open_notebooks()
However, the second line is throwing this error
invalid git HEAD (reference 'refs/heads/master' not found)
I have also tried installing the package through the Julia console, but recieve the same error.
I am at a loss of how to proceed - I can't find anything in the documentation that suggests why this may be or how to proceed - since I am so new to this I suspect I may have missed a step in my installation process, but can't figure out where that may be.

How to install a Julia package if it fails to install / build on an M1 Mac?

I am trying to use the Twitter.jl package locally on my M1 Mac. However, when I try to install it, I get:
ERROR: Error building `DecFP`:
┌ Warning: Platform `arm64-apple-darwin21.2.0` is not an officially supported platform
└ # BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
ERROR: LoadError: KeyError: key "unknown" not found
DecFP looks like it's an up to date Julia package so I am not sure what the issue would be in this case.
I would like to get a general set of steps to resolve issues like this since I know this package isn't the only one that will have installation issues so hopefully this can be used to help others who have similar issues.
The issue is that Twitter.jl is pulling an old version of OAuth.jl which doesn't work on the M1. I have opened a PR so it pulls a newer version and it should work.
About these cases in general the steps are identifying what package is using BinaryProvider, in this case it's an old MbedTLS that was pulled by an old OAuth. The solutions are, if there is a newer version, change the compat bounds, and if there isn't then one has to build the needed binary using BinaryBuilder.jl and change the dependent packages to use it.
In most cases just opening an issue in github should be enough :).

Cannot install any package in Julia

I had used Julia some months back for a project, and didn't use it since. I hadn't faced problems back then. But now, I absolutely am not able to install any package.
(#v1.5) pkg> add Distributions
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:
Distributions [31c24e10] log:
├─Distributions [31c24e10] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
Any package I install, I am getting the same error. How do I fix it?
This is the status of Pkg:
(#v1.5) pkg> status
Status `C:\Users\jaine\.julia\environments\v1.5\Project.toml`
[6e4b80f9] BenchmarkTools v0.5.0
[7073ff75] IJulia v1.21.2
[91a5bcdd] Plots v1.6.0
[438e738f] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0
[2913bbd2] StatsBase v0.33.0
Given
├─Distributions [31c24e10] has no known versions!
it looks like you have a missing or corrupt package registry. The package manager will reinstall it for you if you delete .julia/registries and try to add the package again.
You can do this from within julia
rm(joinpath(homedir(), ".julia", "registries"), recursive=true, force=true)
These are indeed some of the more tricky situations to resolve so please bear with me as we work through this.
If you are not familiar with the basics of the package manager, it's worth a quick read to check out: https://julialang.github.io/Pkg.jl/v1/getting-started/
Assuming you are now in the Julia Repl, my general work flow for these issues is to remove everything it warns me about. The core problem here is that one of your existing packages is saying it needs a specific version of Distributions.jl but it's not able to add it. So, the first step would be to enter the pkg manager by doing ] and type rm Distributions.
Then, while still in the pkg mode, do resolve and add Distributions.
So the process is to just remove each package the Repl complains about until it stops complaining.
Note: If you run into something like this again, the worst-case scenario is to remove the project and manifest files for the specific Julia version you are using. If you navigate to ".julia/environments" you should be able to completely reset the Julia Env for a specific version there (that way you don't need to actually reinstall Julia).

devtools causes problems in RcppArmadillo packages

The last few days I have been using a lot RcppArmadillo. I have been working on a 3D arrays convolution project. After the initial steep learning curve I managed to create some useful C++ routines using Armadillo. Kudos to Dirk.
Then suddenly RcppArmadillo started doing weird things; I kept getting this message:
Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
It is good practice to register native routines and to disable symbol
search.
This happens in Windows 10. In Linux you may receive the same message but it is quickly fixable with RcppArmadillo::RcppArmadillo.package.skeleton() or following the new instructions in Writing R Extensions - 5.4 Registering native routines. In Windows THIS WILL NOT WORK, though. Why?
To isolate the problem I started with a Virtual Machine (VM) with a fresh R (3.4.1). When you start with the demo that RcppArmadillo builds, it will build the demo without hiccups, no notes, no warning messages. As soon as you install devtools the problems with RcppArmadillo begin.
To reproduce this, you can do the following: (1) start with a fresh R and install the packages required to run only to build your-package with RcppArmadillo (a couple). (2) Build your demo package. You will get no errors. (3) Download the source of any of these packages that I tested: gckrig, GAS, abcrf, AbsFilterGSEA, Amelia, MAVE, SparseFactorAnalysis, RcppProgress, artfima, geospt. All of them use RcppArmadillo. They should build OK providing you fed them with their dependencies. (4) Now, install devtools. Immediately after you will start receiving the message:
Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
It is good practice to register native routines and to disable symbol
search
No mater what I did, I could not get rid off the note. I tried the same packages in Linux and no issue at all. This causes delay because one cannot submit a package to CRAN with that message.
(5) Now, if you uninstall devtools and dependencies and try again building any RcppArmadillo package; NO MORE message register native routines. Beautiful.
I wonder why devtools is causing this conflict. How can we get this fixed? I love devtools but have to keep it uninstalled if I have to work with RcppArmadillo. Tough choices.
EDIT
This is fully reproducible. Here are the steps to reproduce the behavior:
(1) start with a fresh R and install the packages required to build your-package with RcppArmadillo (a couple). Do not install devtools.
(2) Build your demo package. You will get no register native routines errors.
(3) Download the source of any of these packages that I have tested: gckrig, GAS, abcrf, AbsFilterGSEA, Amelia, MAVE, SparseFactorAnalysis, RcppProgress, artfima, geospt. All of them use RcppArmadillo. They should build OK providing you fed them with their dependencies.
(4) Now, install devtools. Try building again with any of the packages above. Immediately after you will start receiving the message: register native routines.
(5) Now, if you uninstall devtools and dependencies and try building again any RcppArmadillo package; no more messages related to register native routines.
EDIT
This has been tested with three Windows 10 virtual machine instances installing R 3.4.1, Rtools from scratch. In all the tests, building packages with RcppArmadillo finish with the message register native routines. If you try to build in Linux -the same package- it will pass with no notes.

R Markdown stops working, after installing MRO

I've been building an HTML document with RMarkdown, and everything was going ok, until I installed Microsoft R open (3.3.2) and now everytime I try "Knitr HTML" it returns the following:
Error : .onLoad failed in loadNamespace() for 'RevoUtilsMath', details:
call: NULL
error: To use RevoUtilsMath you must first install the MKL Math Library.
Visit http://mran.revolutionanalytics.com/download.
If you have previously installed the MKL Math Library,
remove it using Add/Remove Programs, then re-install.
Error: package or namespace load failed for 'RevoUtilsMath'
Execution halted
I also re-installed the MRO, just to understand if something went wrong during the installation, and it still returns that error.
I was wondering if someone had the same difficulty and would like to share how to fix this. I have no idea on how installing MRO has such an influence in R markdown.
It looks to me like this isn't necessarily an issue with RMarkdown, but a compatibility issue with RevoUtilsMath and the MKL libraries. It's referenced on the github for RRO (which Microsoft acquired and is now MRO) here:
https://github.com/RevolutionAnalytics/RRO/issues/152
I haven't experienced the error myself, but there is a google group which references and solves that issue here:
https://groups.google.com/forum/#!topic/rropen/jKfR40DcIbE
The third response down is the users solution, and just below that is a microsoft support rep explaining how to properly setup MKL and RevoMathUtils. Hope that helps!

Resources