Remoteexception error on EC2 in parallel julia - parallel-processing

I am trying to run some parallel code in Julia on an Ubuntu Amazon EC2 server and when I try to run it I get the following error:
ERROR: LoadError: MethodError: `+` has no method matching +(::RemoteException, ::RemoteException)
Closest candidates are:
+(::Any, ::Any, ::Any, ::Any...)
in mapreduce_seq_impl at ./reduce.jl:228
while loading /home/ubuntu/GameenderProd.jl, in expression starting on line 8
This is the code that generates the error:
using DecisionTree
#everywhere include("GameenderDrone.jl")
for i=0:4:8
for j=0:4:60
for k=0:4:8
for l=0:4:60
if i + j < 61 && k + l < 61 && (i<k || (i==k && j<=l))
rt=Matrix(0,1)
for q=1:100
library1=creatlib(j,i)
library2=creatlib(l,k)
player1=Player(Int8(1),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library1)[1]))
player2=Player(Int8(2),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library2)[1]))
player1.hand=library1[1:7]
player2.hand=library2[1:7]
rt=[rt; StartTable(library1,library2,player1,player2)]
end
result=pmap(gamerunner,rt)
total=sum(result)-100
rt=Matrix(0,1)
for q=1:100
library1=creatlib(l,k)
library2=creatlib(j,i)
player1=Player(Int8(1),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library1)[1]))
player2=Player(Int8(2),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library2)[1]))
player1.hand=library1[1:7]
player2.hand=library2[1:7]
rt=[rt; StartTable(library1,library2,player1,player2)]
end
negresult=pmap(gamerunner,rt)
total2=200-sum(negresult)
sumtotal=total + total2
output=[total total2 sumtotal]
cd("//home/ubuntu/result")
test=string(i,"C",j,"Lv",k,"C",l,"L.csv")
writedlm(test,output,",")
cd("//home/ubuntu")
end
end
end
end
end
When I test it with one worker on Juliabox (after changing the cd commands) it seems to work. Can anyone explain this error to me?
EDIT: Testing it on Juliabox with 12 workers generates the following error, and it appears the first file finished
juser#juliabox:~$ julia -p 12
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> include("GameenderProd.jl")
Worker 6 terminated.
ERROR (unhandled task failure): EOFError: read end of file
ERROR: LoadError: ProcessExitedException()
Stacktrace:
[1] #568 at ./asyncmap.jl:178 [inlined]
[2] foreach(::Base.##568#570, ::Array{Any,1}) at ./abstractarray.jl:1731
[3] maptwice(::Function, ::Channel{Any}, ::Array{Any,1}, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./asyncmap.jl:178
[4] wrap_n_exec_twice(::Channel{Any}, ::Array{Any,1}, ::Base.Distributed.##204#207{WorkerPool}, ::Function, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./a
syncmap.jl:154
[5] #async_usemap#553(::Function, ::Void, ::Function, ::Base.Distributed.##188#190, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./asyncmap.jl:103
[6] (::Base.#kw##async_usemap)(::Array{Any,1}, ::Base.#async_usemap, ::Function, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./<missing>:0
[7] (::Base.#kw##asyncmap)(::Array{Any,1}, ::Base.#asyncmap, ::Function, ::Array{Any,2}) at ./<missing>:0
[8] #pmap#203(::Bool, ::Int64, ::Void, ::Array{Any,1}, ::Void, ::Function, ::WorkerPool, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:126
[9] pmap(::WorkerPool, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:101
[10] #pmap#213(::Array{Any,1}, ::Function, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:156
[11] macro expansion at /home/juser/GameenderProd.jl:40 [inlined]
[12] anonymous at ./<missing>:?
[13] include_from_node1(::String) at ./loading.jl:569
[14] include(::String) at ./sysimg.jl:14
while loading /home/juser/GameenderProd.jl, in expression starting on line 9

Related

Spring Cloud Config client - how to debug?

After upgrading Spring Cloud libraries to newest version Spring Cloud Config client behaves differently in terms of logging.
In previous version, whenever Spring Cloud Config server was unavailable, I could see log:
Connect Timeout Exception on Url - http://localhost:8888/. Will be trying the next url if available
Currently there's no logs, application simply hangs. After Config Server is available, app also starts an emits all logs at once. It looks like it's caching somehow all logs istead of outputting it immediately.
[INFO] --- spring-boot-maven-plugin:2.5.4:run (default-cli) # gateway-service ---
[INFO] Attaching agents: []
2021-10-07 18:37:02,746 main ERROR Unrecognized format specifier [entityId]
2021-10-07 18:37:02,747 main ERROR Unrecognized conversion specifier [entityId] starting at position 146 in conversion pattern.
2021-10-07 18:38:36,172 main ERROR Unrecognized format specifier [entityId]
2021-10-07 18:38:36,172 main ERROR Unrecognized conversion specifier [entityId] starting at position 147 in conversion pattern.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.4)
2021-10-07 18:38:36.340 INFO 80607 --- [ main] c.y.g.GatewayApplication [%entityId] : Starting GatewayApplication using Java 11.0.12 on ...
In the example above, I was waiting for 30s, before starting Config Server (see timestamps). What is wrong?

Error when trying to render animation with julialang

I am trying to get into animations using the Plots package. I am following this tutorial: https://docs.juliaplots.org/latest/animations/
However when trying to execute the program I get the following error:
ERROR: LoadError: failed process: Process(`/home/olep/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg -v 16 -framerate 3 -i /tmp/jl_h1sGUw/%06d.png -i /tmp/jl_h1sGUw/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y /home/olep/Documents/Studium/Semester2/tutorial_anim_fps30.gif`, ProcessSignaled(11)) [0]
Stacktrace:
[1] run
# ./process.jl:438 [inlined]
[2] (::FFMPEG.var"#4#6"{Cmd})(command_path::String)
# FFMPEG ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:114
[3] (::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String})()
# JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:49
[4] withenv(::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String}, ::Pair{String, String}, ::Vararg{Pair{String, String}, N} where N)
# Base ./env.jl:161
[5] withenv_executable_wrapper(f::Function, executable_path::String, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)
# JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:48
[6] #invokelatest#2
# ./essentials.jl:708 [inlined]
[7] invokelatest
# ./essentials.jl:706 [inlined]
[8] #ffmpeg#7
# ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7 [inlined]
[9] ffmpeg
# ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7 [inlined]
[10] #exe#2
# ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:113 [inlined]
[11] ffmpeg_exe
# ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:125 [inlined]
[12] buildanimation(anim::Animation, fn::String, is_animated_gif::Bool; fps::Int64, loop::Int64, variable_palette::Bool, verbose::Bool, show_msg::Bool)
# Plots ~/.julia/packages/Plots/vVVub/src/animation.jl:98
[13] #gif#232
# ~/.julia/packages/Plots/vVVub/src/animation.jl:64 [inlined]
[14] top-level scope
# ~/Documents/Studium/Semester2/EM2/HW/01/animTest.jl:11
in expression starting at /home/olep/Documents/Studium/Semester2/EM2/HW/01/animTest.jl:11
I am on manjaro (Arch linux).
Any ideas what’s going wrong?
Manjaro:
Reinstall julia -> julia-bin
sudo pamac install julia-bin

Laravel install on Fedora 33

I am trying to create a new Laravel project on my Fedora 33 system as per:
https://laravel.com/docs/8.x/installation#getting-started-on-linux
I run the command and get the following output:
[glen#localhost gclark18]$ sudo curl -s https://laravel.build/example-app | bash
_ _
| | | |
| | __ _ _ __ __ ___ _____| |
| | / _` | '__/ _` \ \ / / _ \ |
| |___| (_| | | | (_| |\ V / __/ |
|______\__,_|_| \__,_| \_/ \___|_|
Warning: TTY mode requires /dev/tty to be read/writable.
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v8.5.14)
[ErrorException]
mkdir(): Permission denied
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
bash: line 16: cd: example-app: No such file or directory
Get started with: cd example-app && ./vendor/bin/sail up
I am not sure why it would not have permission as this is my a folder in my home directory that I have full permissions to.

Sublime Ruby Debugger—connection error with rspec

I am about to code with SublimeText and I have installed the Ruby Debugger Plugin. Everything works fine, but if I want to debug some rspec's the debugger disconnects due to this error:
Debugger exception: [Errno 104] Connection reset by peer
StackTrace: Traceback (most recent call last):
File "/home/philipp/.config/sublime-text-3/Packages/Ruby Debugger/debugge/ruby_imp/ruby_debugger_connector.py", line 102, in reader_thread
bytes = self.client.recv(4096)
ConnectionResetError: [Errno 104] Connection reset by peer
the spec file I am debugging looks like this:
1 | require_relative '../spec_helper'
2 |
3 | describe Parser do
4 | before :each do
5 | #parser = Parser.new '../../../file.txt'
6 | end
7 |
8 | describe '#new' do
9 | it 'raises an error if no input file is given' do
10| lambda { Parser.new }.should raise_exception ArgumentError
11| end
12| end
13| end
I have set a breakpoint at line 5, but the debugger never overcomes line 3. What could that be?

List of all (integer) constants for various types

Does there exist some kind of service, where I can input a system "enum type" (or similar) and get a list of all the possible values?
When debugging with gdb and you encounter an error, it would be nice to quickly get the name of the error, without having to look through related headers files of the header file where the type is defined.
For example the type kern_return_t in OS X is defined in /usr/include/mach/i386/kern_return.h which basically only contains one line of content (no includes):
typedef int kern_return_t;
The valid values are defined in /usr/include/mach/kern_return.h, which makes sense, but I can never remember this path and I would like to speed up this process.
Example:
Input: kern_return_t
Output:
0 | KERN_SUCCESS
1 | KERN_INVALID_ADDRESS
2 | KERN_PROTECTION_FAILURE
3 | KERN_NO_SPACE
4 | KERN_INVALID_ARGUMENT
5 | KERN_FAILURE
6 | KERN_RESOURCE_SHORTAGE
7 | KERN_NOT_RECEIVER
8 | KERN_NO_ACCESS
9 | KERN_MEMORY_FAILURE
...
This is what open -h was made for. I recommend combining it with -s however, like so:
$ open -s iOS -h kern_return
kern_return?
[0] cancel
[1] all
[2] /usr/include/mach/i386/kern_return.h
[3] /usr/include/mach/kern_return.h
[4] /usr/include/mach/machine/kern_return.h
[5] /System/Library/Frameworks/Kernel.framework/Headers/mach/i386/kern_return.h
[6] /System/Library/Frameworks/Kernel.framework/Headers/mach/kern_return.h
[7] /System/Library/Frameworks/Kernel.framework/Headers/mach/machine/kern_return.h
Which header(s) for "kern_return"?

Resources