I am trying to work through this helloworld MPI example using Julia, but I get the following error message:
mpirun was unable to find the specified executable file, and therefore
did not launch the job. This error was first reported for process
rank 0; it may have occurred for other processes as well.
Does this mean that mpirun doesn't recognize helloworld.jl (this is what I called my Julia script) as the executable? Or is the problem that mpirun doesn't recognize julia as the executable? The command I am executing is mpirun -np 2 julia helloworld.jl. I have also tried mpiexec -n 2 julia helloworld.jl, but I get the same error message. I have Julia 1.5.2 installed on Ubuntu 20.04.1 LTS. Could somebody point me in the right direction?
To answer your question in the comments, by default, the mpiexecjl command will not work as you are experiencing. You need to follow the steps detailed here: https://juliaparallel.github.io/MPI.jl/stable/configuration/ in order to have use of those commands from the terminal. Specifically, you need to make sure you have installed MPI per these instructions: https://juliaparallel.github.io/MPI.jl/stable/configuration/#Building
I can reproduce the mpiexecjl command not working as well even after running the MPI.install_mpiexecjl() in Julia. Following the install steps I linked above resolves this for me locally.
Related
I've had so much trouble trying to install Julia and learn how to use it with jupyter over ssh (ssh for reasons that are to complicated to explain). I am unable to even install IJulia without error. I've followed steps from here and several other places with no luck. When I initially run Pkg.add("IJulia") it's able to install the dependencies but IJulia itself doesn't compile. I try running Pkg.build("IJulia") with no issue, but when I open a julia notebook, the kernel never actually runs. When I try to go back to the julia prompt and run using IJulia, I get errors like the following:
ERROR: LoadError: InitError: SystemError: opening file "[blabla]/mambaforge/envs/jul/share/julia/cert.pem": No such file or directory
and
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to [blabla]/mambaforge/envs/jul/share/julia/compiled/v1.7/IJulia/jl_yfN9Cx.
I've been suffering this for weeks. I feel like it shouldn't be this difficult to get into this language. Has anyone else had issues like this and been able to solve them?
Are you using Ubuntu? I encountered a similar problem in Ubuntu 20.04 recently. I wanted to install IJulia under an anaconda environment but faced the problem that the file {JULIA_DIR}/share/julia/cert.pem (in my case, this file has a path of /home/pc/anaconda3/envs/julia-workspace/share/julia/cert.pem).
The first reference I find on the internet is a solution on the julia discourse. (Actually there is a mistake in this answer, at least on my operation system, that the file that the symbolic link is created from, is /etc/ssl/certs/ca-certificates.crt , not /etc/ssl/certs/ca-certificates.crt )
The problem I faced at this time is that the file /etc/ssl/certs/ca-certificates.crt does not exist! How can it happens? I find this reference that guides me to generate the file ca-certificates.crt (by the way, you may need sudo to run the command update-ca-certificates, which updates the directory /etc/ssl/certs to hold SSL certificates and generates ca-certificates.crt)
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.
I am getting a you must have a tty to run sudo error when I run a shell script with a R script in it.
Weird thing is, it doesn't happen every time. I think it is because of RAM issue, but I am not sure.
This means that you are running on a Linux distribution with 'sudo' configured to require a tty.
Please refer this link for an easy fix:
https://www.shell-tips.com/2014/09/08/sudo-sorry-you-must-have-a-tty-to-run-sudo/
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).
So I am trying to install a program on my windows machine that required me to install Cygwin to install it. So I am working from a README file and assueme I have compiled the code previously correctly (its one line sh build.sh) and when actually trying to use the program I get the following error:
BabakP#Babak /cygdrive/c/Users/BabakP/Desktop/test
$ ./Runlock input.tst output.tst 1
./Ostrich: Exec format error. Binary file not executable.
I guess I am trying to figure out why I am getting this error so any suggestions on how to troubleshoot it would be great!
./Ostrich is a Mac executable. It can't be executed under Cygwin. (A MacOS emulator that runs under Windows or Cygwin is theoretically possible, but I don't know of any such thing.)
Without knowing the details of the software you're trying to install, it's hard to say how or whether you can fix it.
You may be able to rebuild Ostrich from source (if you have the source, and if it's not MacOS-specfic).