When trying to execute any commands from MATLAB.jl in julia, the matlab command window opens, and Julia immediately exits with no errors, warnings, or messages. Has anyone else encountered this before? I'm working on translating some MATLAB code to julia and using MATLAB.jl to check that the sparse matrices are the same for both pieces of code.
I'm on a Windows computer and have tried following the instructions on the MATLAB.jl github repo. I've also tried adding Matlab to path and executing the code from the Julia REPL, but keep encountering the same problem.
I can get mxarray executes, however, trying it seems like anything which requires a matlab session causes julia to quit, e.g. mxcall, md"", and MSession.
Was able to solve the problem by opening julia through the command prompt as an administrator and running ] build MATLAB and ] test MATLAB. If the terminal was not opened as administrator, it would build, however, during the testing it would return exit error: 3765269347, which seems to be a windows-specific internal process error.
After this has been done, MATLAB.jl seems to work even when it is not opened directly with admin rights.
Related
I wanted to profile my code in Julia and I installed the package "ProfileView.jl". However, when I run the code the windows is popping for a second and closing immediately.
I have run the script from VS Code and also from the terminal. The code I am profiling is:
using ProfileView
#profview Mesh,MatPointData, AnalysisConstants = setupfunc(T)
In general, you should run ProfileView interactively in a REPL, not as part of a script. If you're using VSCode, you want to start the Julia REPL (Ctrl-Shift-P and then Julia: Start REPL); from the terminal, you want to run an interactive session, i.e., $ julia and not $ julia somescript.jl.
If you simply must use a script (again, not recommended because you'll lose access to some nice interactive functionality in ProfileView), see https://juliagraphics.github.io/Gtk.jl/latest/manual/nonreplusage/.
I am trying to get XRJulia to run, and the first task is to get R to recognise Julia. I followed the answer on this question, which did not solve my problem.
This what I did: After installing Julia I went to the systems variable menu and I added the the bin location of the installation directory, something like “D:\ProgramFiles\Julia-0.6.1\bin” to the path system variable. Note that I am able to start Julia from the command prompt after doing that.
And this is the result:
library(XRJulia)
findJulia(test = TRUE)
[1] FALSE
So, the question is, what am I missing?
I am using R 3.4.2, Julia 0.6.1, and windows 10.
I had similar issue and this is how I found out the issue and fixed it.
First:
library(JuliaCall)
julia_setup()
and no surprise it failed.
Added key Julia_HOME and correct Julia bin path in windows environment setting. Tried again.
Loading setup script for JuliaCall...
However, after a several minutes:
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
So opened Julia and rebuilt RCall.
Tried again and it worked fine.
Tried:
library(XRJulia) findJulia(test = T)
and it all worked out.
I am troubleshooting an issue that I am running into on a new instance of RStudio on a virtual machine. If I run an R script expFit.R in RStudio, it has no problem finding the needed packages (in this case RODBC and minpack.lm) but if I try to run from the command line
c:\"Program Files"\R\R-3.4.1\bin\x64\Rscript.exe e:\expFit.R
I get the error 'minpack.lm' is not a valid installed package. If I move RODBC to be the first package to load, then it errors on that.
The reason that I am running from command line is that in the real application I am running it from a command line stored procedure in SQL. It doesn't work either way (stored procedure or straight command line). I made sure that the path to the packages is a Path variable.
This works on 2 of my other servers, the only difference being that RStudio is installed so that all users can use it on the server that is getting the error, while the other servers have it installed only in my account.
Any advice would be much appreciated!
Rscript.exe is getting hang without closing console after the execution of R script using mxnet package.Can anyone suggest to close the console after the execution
This seems related to this bug:
http://wpkg-users.wpkg.narkive.com/TiZdkHmj/rscript-hanging-when-run-from-wpkg
Adding STDOUT redirection to NUL is an option too. In case Rscript.exe
prints a lot of output on the console (>4kB) it will "block". This is
a known issue with Microsoft WSH.
Try to reduce the verbosity of your script.
When I run a Julia Script that prints "Hello World" on HTCondor, I get the following error
fatal: error thrown and no exception handler available.
Base.InitError(mod=:Pkg, error=Base.KeyError(key="HOME"))
The code runs without a problem on my local Ubuntu machine. I can run
eval julia --version
in a bash script on condor and the output is
julia version 0.5.0
This problem has been discussed in two places on github: one, two.
ENV["HOME"] is used in a single file and the common recommendation is to modify that. However, I cannot change the julia installation on condor.
Is there a way to fix this on the fly before running a script without sudo?
As #sujeet suggested, it is possible to set environmental parameters in condor. The issue is resolved by adding the following line in the condor submit script
Environment = "HOME=""/tmp"""
, which sets the home directory to the tmp. Julia code runs fine then (as long one is careful not to write to home before resetting it in the script itself).