Hi,
I am trying to run a simple matrix multiplication program using BLAS in
chapel to measure the execution time. However i get the following error on
execution:
blas.chpl:10: error: halt reached - Unknown type in gemm
>
my code:
use BLAS;
> config var num: int =10;
> var array1: [1..num,1..num] int;
> var array2: [1..num,1..num] int;
> var array3: [1..num,1..num] int;
> array1=3;
> array2=5;
> array3=0;
> gemm(array1,array2,array3,1,0);
> writeln(array3);
>
Compiling:
chpl -I$CBLAS_HEADER -L$CBLAS_LIB_PATH -lblas blas.chpl
Contents of $CBLAS_HEADER & CBLAS_LIB_PATH respectively
> cblas_f77.h cblas.h
>
cblas_LINUX.a
>
Not sure where I am going wrong. I tried using GDB to debug
> #4 0x000000000043018e in halt3 (_e0_args=0x4735a0 "Unknown type in gemm",
> _ln=10, _fn=43)
> at ChapelIO.chpl:660
> local__str_literal_295 = {len = 39, _size = 40,
> buff = 0x4731c0 "Cannot call .c_str() on a remote string", owned
> = false,
> locale_id = 0}
> local__str_literal_1545 = {len = 15, _size = 16, buff = 0x47350b
> "halt reached - ",
> owned = false, locale_id = 0}
> tmpstring = {len = 35, _size = 36,
> buff = 0x7ffff00027e0 "halt reached - Unknown type in gemm",
> owned = true,
> locale_id = 0}
> call_tmp = {len = 20, _size = 21, buff = 0x7ffff00026f0 "Unknown
> type in gemm",
> owned = true, locale_id = 0}
> _autoCopy_tmp_ = {len = 20, _size = 21,
> buff = 0x7ffff00026f0 "Unknown type in gemm", owned = true,
> locale_id = 0}
> ret_to_arg_ref_tmp_ = 0x7ffff67f66e0
> ---Type <return> to continue, or q <return> to quit---
> call_tmp2 = {len = 35, _size = 36,
> buff = 0x7ffff00027e0 "halt reached - Unknown type in gemm",
> owned = true,
> locale_id = 0}
> ret_to_arg_ref_tmp_2 = 0x7ffff67f6700
> coerce_tmp = 0
> call_tmp3 = false
> coerce_tmp2 = 0x7ffff00027e0 "halt reached - Unknown type in gemm"
> call_tmp4 = 0x7ffff00027e0 "halt reached - Unknown type in gemm"
> _ref_tmp_ = 0x0
> _ref_tmp_2 = 0x0
> #5 0x000000000042ff56 in halt (s=0x7ffff67f69e0, _ln=10, _fn=43) at
> ChapelIO.chpl:650
> local__str_literal_295 = {len = 39, _size = 40,
> buff = 0x4731c0 "Cannot call .c_str() on a remote string", owned
> = false,
> locale_id = 0}
> call_tmp = {len = 20, _size = 21, buff = 0x4735a0 "Unknown type in
> gemm",
> owned = false, locale_id = 0}
> call_tmp2 = {len = 20, _size = 21, buff = 0x4735a0 "Unknown type
> in gemm",
> owned = false, locale_id = 0}
> ret_to_arg_ref_tmp_ = 0x7ffff67f67d0
> coerce_tmp = 0
> call_tmp3 = false
> coerce_tmp2 = 0x4735a0 "Unknown type in gemm"
> call_tmp4 = 0x4735a0 "Unknown type in gemm"
> ---Type <return> to continue, or q <return> to quit---
> _ref_tmp_ = 0x0
> #6 0x00000000004346e1 in gemm_chpl (A_chpl=0x7ffff0001a10,
> B_chpl=0x7ffff0001e80,
> C_chpl=0x7ffff00022f0, alpha_chpl=1, beta_chpl=0,
> opA_chpl=Op_chpl_N_chpl,
> opB_chpl=Op_chpl_N_chpl, order_chpl=Order_chpl_Row_chpl, ldA_chpl=0,
> ldB_chpl=0,
> ldC_chpl=0, _ln_chpl=10, _fn_chpl=43) at BLAS.chpl:200
> local__str_literal_1750_chpl = {len = 20, _size = 21,
> buff = 0x4735a0 "Unknown type in gemm", owned = false, locale_id
> = 0}
> call_tmp_chpl = 0x7ffff0002260
> ret_to_arg_ref_tmp__chpl = 0x7ffff67f6860
> call_tmp_chpl2 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl2 = 0x7ffff67f6a00
> _ref_tmp__chpl = 0x7ffff67f6a00
> call_tmp_chpl3 = 0x7ffff0002260
> ret_to_arg_ref_tmp__chpl3 = 0x7ffff67f6868
> call_tmp_chpl4 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl4 = 0x7ffff67f6a30
> _ref_tmp__chpl2 = 0x7ffff67f6a30
> call_tmp_chpl5 = 111
> call_tmp_chpl6 = 111
> call_tmp_chpl7 = false
> call_tmp_chpl8 = 0x0
> ---Type <return> to continue, or q <return> to quit---
> ret_to_arg_ref_tmp__chpl5 = 0x0
> call_tmp_chpl9 = {_low = 1, _high = 0, _stride = 0, _alignment =
> 140737219928680,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl6 = 0x0
> _ref_tmp__chpl3 = 0x0
> call_tmp_chpl10 = 0x7ffff0000d90
> ret_to_arg_ref_tmp__chpl7 = 0x7ffff67f6878
> call_tmp_chpl11 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl8 = 0x7ffff67f6a90
> _ref_tmp__chpl4 = 0x7ffff67f6a90
> call_tmp_chpl12 = 0x7ffff0000d90
> ret_to_arg_ref_tmp__chpl9 = 0x7ffff67f6880
> call_tmp_chpl13 = true
> call_tmp_chpl14 = 101
> call_tmp_chpl15 = 101
> call_tmp_chpl16 = true
> call_tmp_chpl17 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl10 = 0x7ffff67f6ac0
> _ref_tmp__chpl5 = 0x7ffff67f6ac0
> call_tmp_chpl18 = 10
> call_tmp_chpl19 = 10
> ---Type <return> to continue, or q <return> to quit---
> call_tmp_chpl20 = {_low = 1, _high = 0, _stride = 0, _alignment =
> 140737219928824,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl11 = 0x0
> _ref_tmp__chpl6 = 0x0
> call_tmp_chpl21 = 140737219928688
> call_tmp_chpl22 = 0
> call_tmp_chpl23 = 0x7ffff0001df0
> ret_to_arg_ref_tmp__chpl12 = 0x7ffff67f6888
> call_tmp_chpl24 = true
> call_tmp_chpl25 = 101
> call_tmp_chpl26 = 101
> call_tmp_chpl27 = true
> call_tmp_chpl28 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl13 = 0x7ffff67f6b20
> _ref_tmp__chpl7 = 0x7ffff67f6b20
> call_tmp_chpl29 = 10
> call_tmp_chpl30 = 10
> call_tmp_chpl31 = {_low = 2, _high = 1, _stride = 140737328933840,
> _alignment = 4358916, _aligned = true}
> ret_to_arg_ref_tmp__chpl14 = 0x0
> _ref_tmp__chpl8 = 0x0
> call_tmp_chpl32 = 5
> ---Type <return> to continue, or q <return> to quit---
> call_tmp_chpl33 = 0
> call_tmp_chpl34 = 0x7ffff0002260
> ret_to_arg_ref_tmp__chpl15 = 0x7ffff67f6890
> call_tmp_chpl35 = true
> call_tmp_chpl36 = 101
> call_tmp_chpl37 = 101
> call_tmp_chpl38 = true
> call_tmp_chpl39 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl16 = 0x7ffff67f6b80
> _ref_tmp__chpl9 = 0x7ffff67f6b80
> call_tmp_chpl40 = 10
> call_tmp_chpl41 = 10
> call_tmp_chpl42 = {_low = 0, _high = 140737328933632, _stride = 0,
> _alignment = 9,
> _aligned = true}
> ret_to_arg_ref_tmp__chpl17 = 0x0
> _ref_tmp__chpl10 = 0x0
> call_tmp_chpl43 = 0
> call_tmp_chpl44 = 32767
> #7 0x0000000000432fa4 in chpl__init_blas (_ln_chpl=1, _fn_chpl=43) at
> blas.chpl:10
> modFormatStr_chpl = 0x473171 "%*s\n"
> modStr_chpl = 0x473168 "blas"
> refIndentLevel_chpl = 0x689974 <moduleInitLevel>
> ---Type <return> to continue, or q <return> to quit---
> call_tmp_chpl = false
> call_tmp_chpl2 = true
> call_tmp_chpl3 = 0x0
> type_tmp_chpl = 0x7ffff0001a10
> call_tmp_chpl4 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl = 0x7ffff67f6d40
> call_tmp_chpl5 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl2 = 0x7ffff67f6d70
> call_tmp_chpl6 = 0x7ffff0000d90
> ret_to_arg_ref_tmp__chpl3 = 0x7ffff67f6c80
> call_tmp_chpl7 = {dom = 0x7ffff0000d90}
> _runtime_type_tmp__chpl = 0x7ffff0000d90
> ret_to_arg_ref_tmp__chpl4 = 0x7ffff67f6c78
> type_tmp_chpl2 = 0x7ffff0001e80
> call_tmp_chpl8 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl5 = 0x7ffff67f6da0
> call_tmp_chpl9 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl6 = 0x7ffff67f6dd0
> call_tmp_chpl10 = 0x7ffff0001df0
> ---Type <return> to continue, or q <return> to quit---
> ret_to_arg_ref_tmp__chpl7 = 0x7ffff67f6c90
> call_tmp_chpl11 = {dom = 0x7ffff0001df0}
> _runtime_type_tmp__chpl2 = 0x7ffff0001df0
> ret_to_arg_ref_tmp__chpl8 = 0x7ffff67f6c88
> type_tmp_chpl3 = 0x7ffff00022f0
> call_tmp_chpl12 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl9 = 0x7ffff67f6e00
> call_tmp_chpl13 = {_low = 1, _high = 10, _stride = 1, _alignment =
> 0,
> _aligned = false}
> ret_to_arg_ref_tmp__chpl10 = 0x7ffff67f6e30
> call_tmp_chpl14 = 0x7ffff0002260
> ret_to_arg_ref_tmp__chpl11 = 0x7ffff67f6ca0
> call_tmp_chpl15 = {dom = 0x7ffff0002260}
> _runtime_type_tmp__chpl3 = 0x7ffff0002260
> ret_to_arg_ref_tmp__chpl12 = 0x7ffff67f6c98
>
I still cannot find what is wrong. Can anyone help me out with this?
Thank you
--
Saurabh Sood
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers