-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two GMT.jl threads conflict? #1386
Comments
So if I got it right you want to run parallel jobs. Allowing this should be possible in principle but it needs a solution to create unique file names for each Julia session. I'll think more about this. |
Thanks for the clarification. |
You could try this hack to see if works. The default PS file name is the one that you get with
Now the two names should not conflict (but there are some other tmp names used by some modules that would do, though their use is much less frequent). |
Actually you can test it even a bit further. I committed a change in the master version where if the environment variable |
I tested the first method (changing GMT.PSname[1]), and it worked great. |
I have one command line with GMT.jl running a program. Trying to run the same code but for different part of data in another command line. I then found that the GMT.jl in the first command-line quitted with error. The GMT.jl won't work in the 2nd command line either. Question: could two GMT.jl work in the same machine?
Many thanks.
LH
=========error message from the 1st command line =====
Error: /undefined in e3
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1974 1 3 %oparray_pop 1973 1 3 %oparray_pop 1961 1 3 %oparray_pop 1817 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:767/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:159/250(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 461267
psconvert [ERROR]: System call ['/home/liming/.julia/artifacts/4883a6685d86b068da934537a444a6d170d71730/bin/gs' -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true '/tmp/GMTjl_liming.ps' 2> './psconvert_2099957c.bb'] returned error 256.
ERROR: Something went wrong when calling the module. GMT error number = 79
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] gmt(::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/gmt_main.jl:161
[3] showfig(d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_T::String, K::Bool, fname::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:3929
[4] finish_PS_module(::Dict{Symbol, Any}, ::Vector{String}, ::String, ::Bool, ::Bool, ::Bool, ::GMTgrid{Float32, 2}, ::Vararg{Any})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:4214
[5] grdimage(cmd0::String, arg1::GMTgrid{Float32, 2}, arg2::Nothing, arg3::Nothing; first::Bool, kwargs::Base.Pairs{Symbol, Any, NTuple{9, Symbol}, NamedTuple{(:show, :interp, :frame, :coast, :colorbar, :par, :fmt, :savefig, :dpi), Tuple{Bool, String, NamedTuple{(:axes, :annot), Tuple{NTuple{4, Symbol}, Bool}}, NamedTuple{(:shore, :ocean, :coast, :frame, :show), Tuple{NamedTuple{(:level, :pen), Tuple{Int64, Tuple{Float64, Symbol}}}, Symbol, Bool, NamedTuple{(:axes, :grid, :annot, :ticks), Tuple{String, Int64, Int64, Int64}}, Bool}}, NamedTuple{(:pos, :color, :show, :frame), Tuple{NamedTuple{(:anchor, :length, :horizontal, :offset), Tuple{Symbol, Tuple{Float64, Float64}, Bool, Tuple{Int64, Float64}}}, GMT.GMTcpt, Bool, NamedTuple{(:ylabel, :ticks, :annot), Tuple{Symbol, Symbol, Symbol}}}}, NamedTuple{(:MAP_ANNOT_ORTHO, :MAP_TITLE_OFFSET), Tuple{Symbol, Float64}}, Symbol, String, Int64}}})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:123
[6] grdimage
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:53 [inlined]
[7] #grdimage#348
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:218 [inlined]
[8] grdimage
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:218 [inlined]
[9] plot_a_layer(x::GMTgrid{Float32, 2}, file_out::String, x_min::Int64, x_max::Int64, x_step::Int64, y_label::String)
@ Main ./REPL[3]:14
[10] process_layer_batch(x::GMTgrid{Float32, 2}, m::GMTgrid{Float32, 2}, data_path1::String, fig_path::String, this_variable::String, Pixel_type::String, x_min::Int64, x_max::Int64, x_step::Int64, y_label::String, year_list::Vector{DateTime}, freq::String)
@ Main ./REPL[4]:41
[11] top-level scope
@ ./REPL[58]:12
=========error message from the 2nd command line ===========
gmtset [ERROR]: Could not create file gmt.conf
ERROR 1: Point outside of projection domain
sh: 1: cannot create ./psconvert_2123775c.bb: Permission denied
psconvert [ERROR]: System call ['/home/liming/.julia/artifacts/4883a6685d86b068da934537a444a6d170d71730/bin/gs' -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true '/tmp/GMTjl_liming.ps' 2> './psconvert_2123775c.bb'] returned error 512.
ERROR: Something went wrong when calling the module. GMT error number = 79
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] gmt(::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/gmt_main.jl:161
[3] showfig(d::Dict{Symbol, Any}, fname_ps::String, fname_ext::String, opt_T::String, K::Bool, fname::String)
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:3929
[4] finish_PS_module(::Dict{Symbol, Any}, ::Vector{String}, ::String, ::Bool, ::Bool, ::Bool, ::GMTgrid{Float32, 2}, ::Vararg{Any})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/common_options.jl:4214
[5] grdimage(cmd0::String, arg1::GMTgrid{Float32, 2}, arg2::Nothing, arg3::Nothing; first::Bool, kwargs::Base.Pairs{Symbol, Any, NTuple{9, Symbol}, NamedTuple{(:show, :interp, :frame, :coast, :colorbar, :par, :fmt, :savefig, :dpi), Tuple{Bool, String, NamedTuple{(:axes, :annot), Tuple{NTuple{4, Symbol}, Bool}}, NamedTuple{(:shore, :ocean, :coast, :frame, :show), Tuple{NamedTuple{(:level, :pen), Tuple{Int64, Tuple{Float64, Symbol}}}, Symbol, Bool, NamedTuple{(:axes, :grid, :annot, :ticks), Tuple{String, Int64, Int64, Int64}}, Bool}}, NamedTuple{(:pos, :color, :show, :frame), Tuple{NamedTuple{(:anchor, :length, :horizontal, :offset), Tuple{Symbol, Tuple{Float64, Float64}, Bool, Tuple{Int64, Float64}}}, GMT.GMTcpt, Bool, NamedTuple{(:ylabel, :ticks, :annot), Tuple{Symbol, Symbol, Symbol}}}}, NamedTuple{(:MAP_ANNOT_ORTHO, :MAP_TITLE_OFFSET), Tuple{Symbol, Float64}}, Symbol, String, Int64}}})
@ GMT ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:123
[6] grdimage
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:53 [inlined]
[7] #grdimage#348
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:218 [inlined]
[8] grdimage
@ ~/.julia/packages/GMT/Mxc9g/src/grdimage.jl:218 [inlined]
[9] plot_a_layer(x::GMTgrid{Float32, 2}, file_out::String, x_min::Int64, x_max::Int64, x_step::Int64, y_label::String)
@ Main ./REPL[3]:14
[10] process_layer_batch(x::GMTgrid{Float32, 2}, m::GMTgrid{Float32, 2}, data_path1::String, fig_path::String, this_variable::String, Pixel_type::String, x_min::Int64, x_max::Int64, x_step::Int64, y_label::String, year_list::Vector{DateTime}, freq::String)
@ Main ./REPL[4]:41
[11] top-level scope
@ ./REPL[53]:12
The text was updated successfully, but these errors were encountered: