vunit icon indicating copy to clipboard operation
vunit copied to clipboard

Error with large arrays and GHDL.

Open qarlosalberto opened this issue 6 years ago • 21 comments

Hello,

Im having problems with:

variable in_mod : integer_array_t;
in_mod := load_csv("./input.csv",g_SIZE_MOD,true);

When input.csv is a large file GHDL crash without reason :S

Thank you.

qarlosalberto avatar Jun 07 '18 14:06 qarlosalberto

How large is "large"? Did you test the limit size that does no crash?

eine avatar Jun 07 '18 14:06 eine

With this file crash:
in_mod_4096FFT_2paral_12mod_10numFFT.txt

With this file doesnt crash:

in_mod_4096FFT_2paral_12mod_10numFFT.txt

qarlosalberto avatar Jun 07 '18 15:06 qarlosalberto

@qarlosalberto No problem on my computer. I'm running GHDL 0.35. What version are you on?

LarsAsplund avatar Jun 07 '18 15:06 LarsAsplund

GHDL 0.36-dev (v0.35-176-gd313f785) [Dunoon edition]
 Compiled with GNAT Version: 7.3.0
 GCC back-end code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2015 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

qarlosalberto avatar Jun 07 '18 15:06 qarlosalberto

@qarlosalberto Ok, so let's make sure we are running exactly the same thing. This is what I tested

library vunit_lib;
context vunit_lib.vunit_context;

entity tb_integer_array_crash is
  generic (runner_cfg : string);
end entity;

architecture tb of tb_integer_array_crash is
begin
  main : process
    variable in_mod : integer_array_t;
  begin
    test_runner_setup(runner, runner_cfg);
    in_mod := load_csv("D:/Downloads/out_maxhold_4096FFT_2paral_12mod_10numFFT.txt",32,true);
    info("Length: " & to_string(length(in_mod)));
    test_runner_cleanup(runner);
  end process;
end architecture;

LarsAsplund avatar Jun 07 '18 15:06 LarsAsplund

Yes, the same.

cruiz@DASPC034:~/repositorio/98410015_MAXHOLD/tb(1-creacion-core)$ python run.py --ide ise --verbose
Compiling into maxhold_top_tb_lib: maxhold_top_tb.vhd passed
Compile passed

Running test: maxhold_top_tb_lib.tb_integer_array_crash.all
Running 1 tests

Starting maxhold_top_tb_lib.tb_integer_array_crash.all
Output file: vunit_out/test_output/maxhold_top_tb_lib.tb_integer_array_crash.all_b61ddf365c91210aa868dc9212d5a2f39d317540/output.txt
fail (P=0 S=0 F=1 T=1) maxhold_top_tb_lib.tb_integer_array_crash.all (10.8 seconds)

==== Summary =========================================================
fail maxhold_top_tb_lib.tb_integer_array_crash.all (10.8 seconds)
======================================================================
pass 0 of 1
fail 1 of 1
======================================================================
Total time was 10.8 seconds
Elapsed time was 10.9 seconds
======================================================================
Some failed!
--! Librería estándar.
library ieee;
--! Elementos lógicos.
use ieee.std_logic_1164.all;
--! Funciones aritméticas.
use ieee.numeric_std.all;
--
library std;
use std.textio.all;


-- vunit
library vunit_lib;
context vunit_lib.vunit_context;

use vunit_lib.array_pkg.all;
use vunit_lib.integer_array_pkg.all;


library vunit_lib;
context vunit_lib.vunit_context;

entity tb_integer_array_crash is
  generic (runner_cfg : string);
end entity;

architecture tb of tb_integer_array_crash is
begin
  main : process
    variable in_mod : integer_array_t;
  begin
    test_runner_setup(runner, runner_cfg);
    in_mod := load_csv("/home/cruiz/repositorio/98410015_MAXHOLD/tb/in_mod_4096FFT_2paral_12mod_10numFFT.csv",32,true);
    info("Length: " & to_string(length(in_mod)));
    test_runner_cleanup(runner);
  end process;
end architecture;

qarlosalberto avatar Jun 07 '18 15:06 qarlosalberto

@qarlosalberto Looks like GHDL then but you should probably verify that 0.35s work on you side to make sure that there are no other environmental issues.

LarsAsplund avatar Jun 07 '18 16:06 LarsAsplund

Ok, im going to try!

qarlosalberto avatar Jun 07 '18 16:06 qarlosalberto

@qarlosalberto Any news on this one?

LarsAsplund avatar Jun 13 '18 09:06 LarsAsplund

I will back tomorrow to the work, I was compiling GHDL 0.35 :)

qarlosalberto avatar Jun 13 '18 11:06 qarlosalberto

I have the same problem. I have done this tests:

  • In my PC: Ubuntu 18.04
GHDL 0.36-dev (v0.35-176-gd313f785) [Dunoon edition]
 Compiled with GNAT Version: 7.3.0
 GCC back-end code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2015 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  • In a Ubuntu 18.04 Docker:
cruiz@dabd098c2a33:~/98410015_MAXHOLD/tb$ ghdl --version
GHDL 0.35rc1 (2017-03-01-551-gdb2a0faa) [Dunoon edition]
 Compiled with GNAT Version: 7.3.0
 GCC back-end code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2015 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It can be a RAM problem? I have 8G. I can try in other PC with 16G.

qarlosalberto avatar Jun 18 '18 16:06 qarlosalberto

@LarsAsplund I can reproduce the issue with the latest ghdl/ext:vunit image. Rename the attached file to either tgz or tar.gz, extract it and run docker run --rm -itv $(pwd):/src -w /src ghdl/ext:vunit python3 run.py.

vunit-342.txt

@qarlosalberto I think that it is not related to memory:

vunit-342

eine avatar Jun 19 '18 01:06 eine

@qarlosalberto I ran with the --log-level debug flag and receives the return code -11. Tristan at GHDL suggests that this may be related to ghdl/ghdl#611.

LarsAsplund avatar Jun 28 '18 07:06 LarsAsplund

Thank you :)

qarlosalberto avatar Jun 28 '18 09:06 qarlosalberto

Close as GHDL bug?

kraigher avatar Aug 16 '18 18:08 kraigher

It has been resolved:

https://github.com/ghdl/ghdl/issues/611

qarlosalberto avatar Jan 21 '19 07:01 qarlosalberto

@qarlosalberto did you set the stack size with ulimit or did it work as is?

eine avatar Jan 21 '19 17:01 eine

mmmm... with ulimit and my GHDL version doesn't work. I am going to try with the new GHDL version.

qarlosalberto avatar Jan 28 '19 15:01 qarlosalberto

@umarcor Should we close this issue? I dont know if it is still on? If it is, #494 could track that issue maybe

std-max avatar May 31 '22 17:05 std-max

@std-max, I'm not sure it's the same issue. @qarlosalberto do you mind trying with a recent version of GHDL?

umarcor avatar Jun 01 '22 14:06 umarcor

Sorry, I haven't tried it with a recent version.

El mié., 1 jun. 2022 16:54, Unai Martinez-Corral @.***> escribió:

@std-max https://github.com/std-max, I'm not sure it's the same issue. @qarlosalberto https://github.com/qarlosalberto do you mind trying with a recent version of GHDL?

— Reply to this email directly, view it on GitHub https://github.com/VUnit/vunit/issues/342#issuecomment-1143714590, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNN4RY7UYOJSPJSGBGW5YDVM52R5ANCNFSM4FD2IFHQ . You are receiving this because you were mentioned.Message ID: @.***>

qarlosalberto avatar Jun 02 '22 20:06 qarlosalberto