How to increase the limit on the size of the Julia sysimage? - julia

I'm compiling a Julia system image using the PackageCompiler.jl package. And it always worked out for me. But with a large number of libraries in the image, I get an error:
ERROR: system image too large: sysimg.size is 546855112 but the limit is 20000000
How to increase the image size limit? I didn't find such a setting anywhere.
Full backtrace:
[ Info: Building Julia system image.
[ Info: PackageCompiler: Executing /tmp/precomp_execution_file.jl => /tmp/jl_packagecompiler_4K55be/jl_MTxHHo
[ Info: PackageCompiler: Done
- PackageCompiler: compiling incremental system image
ERROR: system image too large: sysimg.size is 546855112 but the limit is 20000000
ERROR: LoadError:
failed process: Process(
`/usr/local/julia/bin/julia --color=auto --startup-file=no '--cpu-target=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' --strip-metadata --sysimage=/usr/local/julia/lib/julia/sys.so --project=/root/.julia/environments/v1.8 --output-o=/tmp/jl_redo10RS1Y.o /tmp/jl_D2nGTKJwrG`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error
#
./process.jl:565 [inlined]
[2] run(::Cmd; wait::Bool)
# Base ./process.jl:480
[3] run(::Cmd)
# Base ./process.jl:477
[4] (::PackageCompiler.var"#20#22")()
# PackageCompiler ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:157
[5] spin(f::PackageCompiler.var"#20#22", s::PackageCompiler.TerminalSpinners.Spinner{Base.PipeEndpoint})
# PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:164
[6] macro expansion
# ~/.julia/packages/PackageCompiler/i90pX/ext/TerminalSpinners.jl:157 [inlined]
[7] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool)
# PackageCompiler ~/.julia/packages/PackageCompiler/i90pX/src/PackageCompiler.jl:128

The latest releases of Julia no longer have this limitation. Simply upgrade your Julia version and you should be good.

Related

BiocCheck() for Bioconductor package submission, doesn't show the LINES with Error/Warn./Notes

I am running BiocCheck("myPackage"), the results makes comments on how many places the problem exists, but doesn't comment on where the problem is. Is there any way to fix that?
BiocCheck("myPackage")
$error
character(0)
$warning
[1] "The following files are over 5MB in size: '.git/objects/pack/pack-3eae63a6b24d5861178a09b58eb0ec4d893242b0.pack'"
$note
[1] " Avoid sapply(); use vapply()"
[2] "Recommended function length <= 50 lines."
[3] "Consider shorter lines; 103 lines (3%) are > 80 characters long."
[4] "Consider multiples of 4 spaces for line indents, 1258 lines(32%) are not."
[5] "Cannot determine whether maintainer is subscribed to the bioc-devel\nmailing list (requires admin credentials). Subscribe here:\nhttps://stat.ethz.ch/mailman/listinfo/bioc-devel"
Found the answer :
BiocCheck:::checkFormatting("myPackage", nlines=Inf)
Works perfectly and shows all the lines with problems.

How to programmatically change zoom in ImageView.imshow

Based on the ImageView.imshow documentation here:
https://github.com/JuliaImages/ImageView.jl
it looks like it should be possible to change the zoom rectangle of an imshow viewer programmatically, however I have not been able to find a concrete example of how to do this and I'm not sure how to create an object of the correct type to send to the signal.
If I do this:
guidict = imshow( videog )
zr = guidict["roi"]["zoomregion"]
zr
I get:
10: "input-21" = ZoomRegion{RInt64}(XY(1..640, 1..480), XY(1..640, 1..480)) ZoomRegion{RInt64}
Aside from the complexity of the types, I don't understand why the zoom region should need to be specified twice as it is here.
In any case if I do:
push!( zr, ZoomRegion{RInt64}( XY(200..280, 280..360), XY(200:280, 280..360) ) )
(where I'm trying to set the zoom to 200:280 in X and 280:360 in Y)
I get the following error:
ERROR: promotion of types UnitRange{Int64} and IntervalSets.Interval{:closed,:closed,Int64} failed to change any arguments
Stacktrace:
[1] error(::String, ::String, ::String) at ./error.jl:42
[2] sametype_error(::Tuple{UnitRange{Int64},IntervalSets.Interval{:closed,:closed,Int64}}) at ./promotion.jl:308
[3] not_sametype(::Tuple{UnitRange{Int64},IntervalSets.Interval{:closed,:closed,Int64}}, ::Tuple{UnitRange{Int64},IntervalSets.Interval{:closed,:closed,Int64}}) at ./promotion.jl:302
[4] promote at ./promotion.jl:285 [inlined]
[5] XY(::UnitRange{Int64}, ::IntervalSets.Interval{:closed,:closed,Int64}) at /home/flynn/.julia/packages/GtkReactive/2h7NX/src/graphics_interaction.jl:93
[6] top-level scope at none:0
Does anyone have a concrete example of how to do this ?
The zoom region is made of two components, full view and current view. When you're pushing to the signal you are only moving the current view [which handles the zooming].
You can use unit ranges when pushing, like this
push!(zr, (200:280, 280:360))
To reset back to the full view you just need to then do this
push!(zr, zr.value.fullview)

vlog-7 error. failed to open design unit file in read mode

i am trying to run an example design by IntelFPGA, using a tcl script provided by Intel. It reports 'error (vlog-7) failed to open unit file "blabla" in read mode. No such file or directory (errno = ENOENT). i can not find the error. Then i tried a modelsim project i used earlier, which used to work. I get the same error! What could be wrong?
At start of tb_run.tcl (run from commandline MODELSIM> VHDL 2008 do tb_run.tcl), this tb_run.tcl file is generated by quartus example
global env ;
# set QUARTUS_INSTALL_DIR "$env(QUARTUS_ROOTDIR)" => initially i thought
# there is something wrong with the rootdir, so i changed to the row
# below:
set QUARTUS_INSTALL_DIR "C:/intelFPGA/18.0/quartus"
set SETUP_SCRIPTS ../setup_scripts
set tb_top_waveform msim_wave.do
set QSYS_SIMDIR "./../setup_scripts"
set TOP_LEVEL_NAME tb_top
source $SETUP_SCRIPTS/mentor/msim_setup.tcl
# Compile device library files
dev_com
================================================
=> dev_com, this is line 29, here the error occurs, see below
modelsim reports:
Modelsim> VHDL 2008 do tb_run.tcl
# C:/intelFPGA/18.0/quartus
# ../setup_scripts
# msim_wave.do
# ./../setup_scripts
# tb_top
# [exec] file_copy
# List Of Command Line Aliases
#
# file_copy -- Copy ROM/RAM files to simulation directory
#
# dev_com -- Compile device library files
#
# com -- Compile the design files in correct order
#
# elab -- Elaborate top level design
#
# elab_debug -- Elaborate the top level design with novopt option
#
# ld -- Compile all the design files and elaborate the top level design
#
# ld_debug -- Compile all the design files and elaborate the top level design with -novopt
#
#
#
# List Of Variables
#
# TOP_LEVEL_NAME -- Top level module name.
# For most designs, this should be overridden
# to enable the elab/elab_debug aliases.
#
# SYSTEM_INSTANCE_NAME -- Instantiated system module name inside top level module.
#
# QSYS_SIMDIR -- Qsys base simulation directory.
#
# QUARTUS_INSTALL_DIR -- Quartus installation directory.
#
# USER_DEFINED_COMPILE_OPTIONS -- User-defined compile options, added to com/dev_com aliases.
#
# USER_DEFINED_VHDL_COMPILE_OPTIONS -- User-defined vhdl compile options, added to com/dev_com aliases.
#
# USER_DEFINED_VERILOG_COMPILE_OPTIONS -- User-defined verilog compile options, added to com/dev_com aliases.
#
# USER_DEFINED_ELAB_OPTIONS -- User-defined elaboration options, added to elab/elab_debug aliases.
#
# SILENCE -- Set to true to suppress all informational and/or warning messages in the generated simulation script.
#
# FORCE_MODELSIM_AE_SELECTION -- Set to true to force to select Modelsim AE always.
# [exec] dev_com
# Model Technology ModelSim - Intel FPGA Edition vlog 10.6c Compiler 2017.07 Jul 26 2017
# Start time: 10:43:14 on Jun 25,2019
# vlog -reportprogress 300 C:/intelFPGA/18.0/quartus/eda/sim_lib/altera_primitives.v -work altera_ver
# ** Error: (vlog-7) Failed to open design unit file "C:/intelFPGA/18.0/quartus/eda/sim_lib/altera_primitives.v" in read mode.
# No such file or directory. (errno = ENOENT)
# End time: 10:43:14 on Jun 25,2019, Elapsed time: 0:00:00
# Errors: 1, Warnings: 0
# ** Error: C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed.
# Error in macro ./tb_run.tcl line 29
# C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed.
# while executing
# "vlog C:/intelFPGA/18.0/quartus/eda/sim_lib/altera_primitives.v -work altera_ver"
# ("eval" body line 1)
# invoked from within
# "eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_primitives.v" ..."
# invoked from within
# "if [string is false -strict [modelsim_ae_select $FORCE_MODELSIM_AE_SELECTION]] {
# eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_CO..."
# ("eval" body line 5)
# invoked from within
# "dev_com "
Don't really know how you managed to solve this problem simply by rebooting. Here is what the problem most likely was about and how I solved it.
We have a statement about the problem:
vlog-7 error. failed to open design unit file in read mode
I was too focused on the "read mode" and tried to figure out why is it forbidden to start declared operation.
However the problem most likely is that you dont really have the actual file in the directory where warning occured.
Then I realised that I eventually changed the name of the folder and thus this file could not be read. Take a look that you didn't make any changes in pathing till your tcl, .do and project files.

git2r::summary() produces different results when called from console and by RStudio

I am trying to write an R package that analyzes Apache Pig GitHub repository with the help of git2r package. I also use testthat package for unit testing.
I have a function, let's call it compute(), which contains code along the lines of:
repo <- repository("C:\normalized\path\to\apache\pig");
allCommits <- commits(repo);
commitSummary <- capture.output(summary(allCommits[[1]]));
print(commitSummary);
The commitSummary is an important part, because I run several regexes on it to recover data like insertions and deletions.
The problem is, when I call compute() from console, it prints out Output 1.
But when compute() is called from my unit test file when I run devtools::test(), it prints out Output 2. (And over the course of me writing this question, after producing Output 2 several times, it produced Output 3.)
When I run the first codeblock in this question from the console, it prints out Output 1, again.
However, when I copy-paste that codeblock into the test file, it prints out Output 3.
I am confused. How is that even possible?
And how can I make sure git2r::summary() uses the format I want?
Output 1
[1] "Commit: d2de56aad939c7c77324066a6f29cc211e29a077"
[2] "Author: Koji Noguchi <knoguchi#apache.org>"
[3] "When: 2016-12-12 23:07:37"
[4] ""
[5] " PIG-5073: Skip e2e Limit_5 test for Tez (knoguchi)"
[6] " "
[7] " "
[8] " git-svn-id: https://svn.apache.org/repos/asf/pig/trunk#1773899 13f79535-47bb-0310-9956-ffa450edef68"
[9] " "
[10] "2 files changed, 18 insertions, 1 deletions"
[11] "CHANGES.txt | -0 + 2 in 1 hunk"
[12] "test/e2e/pig/tests/nightly.conf | -1 +16 in 2 hunks"
[13] ""
Output 2
[d2de56a] 2016-12-12: PIG-5073: Skip e2e Limit_5 test for Tez (knoguchi)
Output 3
[1] " Length Class Mode " " 1 git_commit S4 "
Additional notes that might take away from question's clarity
When I load and call the function calling compute() from the unit test file, it prints out Output 1. Same for calling compute() from working directory set to test folder and exactly same arguments.
To make matters more confusing, up until very recently devtools::test() produced Output 1, then it switched to Output 3 before settling on Output 2.
CRAN's documentation for git2r::summary(object, ...) lists following arguments:
object The commit object.
... Additional arguments affecting the summary produced.
Accepted values of ... are nowhere to be found.
Turns out, there is probably some sort of a namespace-related race condition going on, since there is already a summary() function in base R (and probably some other packages), which explains why there were 3 different outputs.
I just changed every
summary(commitObject)
into
git2r::summary(commitObject)
and everything seems to work again.

gnatpp ceases working after a while

I'm on a mac, and I format my files with "gnatpp -rnb *.ads *adb" and it refuses to format some files. When I create a new file it works, and after a while, when the file grow/age (I couldn't find a pattern), it stops working. It spits the same file as the input, event when I try with -pipe.
What's happening? is there a limit that I would be reaching somewhere? I can't find anything relevant in the help and I have no error relevant error message. The files are all less than 200 lines long.
there is no error message:
maquette:src nraynaud$ gnatpp -w -v -rnb -M150 *.ads
gnatpp 4.9.0
Copyright 2003-2014, AdaCore.
TMPDIR = "/private/var/folders/rb/4gj9qf4j4_765mm9dlfmd0k00000gn/T"
[13] button.ads
[12] driver.ads
[11] last_chance_handler.ads
[10] leds.ads
[9] motor.ads
[8] registers.ads
[7] stm32f4-busses.ads
[6] stm32f4-genericperipheral.ads
[5] stm32f4-gpio.ads
[4] stm32f4-reset_clock_control.ads
[3] stm32f4-sysconfig_control.ads
[2] stm32f4-tim.ads
[1] stm32f4.ads
gnatpp complains that your file does not compile, which is required for gnatpp to work.
From the GNAT User's Guide:
To produce a reformatted file, gnatpp generates and uses the ASIS tree for the input source and thus requires the input to be syntactically and semantically legal. If this condition is not met, gnatpp will terminate with an error message; no output file will be generated.

Resources