IT++ Polar Code

Please take a look at the PolarCode source code and documentation.

PolarCode provides IT++ functions for the training, encoding and decoding of polar codes. Like turbo and LDPC codes, polar codes facilitate near-capacity operation. However, unlike turbo and LDPC codes, polar codes do not require an iterative decoder. You can find out more about polar codes in Erdal Arikan’s paper.

Copyright © 2010 Robert G. Maunder. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

45 Responses to “IT++ Polar Code”

  1. Raul Says:

    Sorry, I like to know how you compile your code, or how I can use since I’m new in using C + + and do not know why I can not compile it. I have already Gcc installed and the IT + + and running. Thanks

  2. Rob Says:

    Hello Raul,

    You can download a version of the source code that includes the makefile that I use from…
    http://users.ecs.soton.ac.uk/rm/wp-content/PolarCode110Project.zip
    On a Linux or Mac computer, compilation should be as simple as typing ‘make’ in the PolarCode110 directory. However, this might depend on how IT++ is installed on your computer.

    Hope this helps, Rob.

  3. raul Says:

    Dear Robb.

    Your bar program works for me great, but now I need to use a channel BAWGN, the problem is the calculation of Bhattacharya. You, how do you calculate in your program?, I’ve seen you use it but not as programs. If I could help with this we agradeseía.

    regards
    Raul

  4. Rob Says:

    Hello Raul,

    The polar code program will use a BAWGN channel if you set the variable…
    channel=0;

    Take care, Rob.

  5. raul Says:

    Hello Robb

    Sorry but I do not understand where I have put that parameter, and if so, that means that automatically give me the values ​​for the channel BWGN. The thing is I\’m using the Polar Code of your program to apply to other cases, that\’s why I wondered about as I had with the calculation of echo Batacharrya.

    Greetings and thank you very much

  6. Rob Says:

    Hi Raul,

    That parameter is set on line 114 of main.c. It is set to channel=0 by default, which will give you the BAWGN channel.

    Take care, Rob.

  7. Liu Tong Says:

    Sorry, Now I want to simulate polar codes under BEC channel. But this simulation packege is only for AWGN and Rayleigh channel .Can you tell me where to revise to suit for BEC and BSC channel ? Thanks a lot.

  8. Rob Says:

    Hi Liu Tong,

    All you need to do is write some code that will set the LLRs in encoded_llrs to appropriate values. More specifically, LLRs that correspond to erased bits should be set to 0. LLRs that correspond to unerased 0-valued bits should be set to +infinity, using the set_to_plus_infinity function. LLRs that correspond to unerased 1-valued bits should be set to -infinity, using the set_to_minus_infinity function.

    Take care, Rob.

  9. Liu Tong Says:

    Hi, Rob
    Thanks for your advise. But I still have a question. according to your simulatoin code. u_hat is bvec type which can hold only two variables: 0 and 1 , but in bec channel , u_hat may have thress possibles: 0,1 and uncertainty. I don’t know your simulation package is suitable for BEC without revisal . Thansk a lot.

  10. Rob Says:

    Hi Liu Tong,

    You don’t need to modify this to get my code to work with the BEC channel. u_hat is an hard decision output from my code. The BEC channel provides the input to my code in form of an llr_frame. You need to put the three values (+infinity, 0 and -infinity) into this. You don’t need to worry about u_hat.

    Take care, Rob.

  11. gilbert Says:

    Hi,
    there is a problem if K is equal to N. Maybe to change PolarCode.cpp.127: if(K > N) -> if(K >= N)?

    thx

  12. Rob Says:

    Hello Gilbert,

    Thanks for this, I will give it a try.

    Take care, Rob.

  13. chuyi qian Says:

    HI, Rob I am trying to simulate fountain coding scheme with HARQ I wonder how I can model the fountain code, could you give me some advice? Thanks

  14. Rob Says:

    Hello Chuyi Qian,

    A fountain decoder uses the same components as an LDPC decoder, namely check nodes and variable nodes. I keep meaning to write some Matlab functions for these, but I’m afraid that I haven’t gotten around to this yet. I’m sure you’d be able to find some elsewhere on the Internet though…

    Take care, Rob.

  15. Ahmed elshahawy Says:

    Dear all
    Im a phd student at lancaster uni,and im studying polar codes.please can any one help me with the program.if any one can give the program of polar codes for BEC and BAWGN it would be great and very helpful.
    Many thnx

  16. Rob Says:

    Hi Ahmed,

    The code I have provided here will simulate a polar code for BAWGN. It can be very easily adapted for BEC as well - take a look at the following comment to find out how…
    http://users.ecs.soton.ac.uk/rm/resources/cpolarcode/#comment-5977

    Take care, Rob.

  17. aitezaz Says:

    Hi Rob,
    Thanks for your time and effort. I am currently working on Belief Propagation decoding for polar codes … What i am finding is that for fixed number of iterations polar codes (designed for BEC(.5) ) with n=11 (code length 2^n) perform inferior to the codes with n=10. My understanding was that the larger the code length is, the better the performance should be under identical settings. Is there some catch that I can’t get ?

    Thanks again

  18. Rob Says:

    Hi Aitezaz,

    LDPC codes having longer code lengths perform better because this allows greater freedom for the code structure to be randomised. It is possible that a longer code length does not improve the polar code performance because its code structure is not randomised. One thing you may like to look into is the girth of your factor graph. It may be that for some reason, lengthening the code has caused some small loops to be created within the factor graph - these damage the performance of belief propagation…

    Take care, Rob.

  19. Aitezaz Says:

    Thanks Rob!
    I really appreciate your taking out time to help us.
    The girth of polar codes is 12 irrespective of the length. So I am afraid that may not be the reason for this bad performance since its the same for n=10 and n=11. You’ll have to forgive me I don’t understand what do you mean by randomizing in the context of polar codes. As polar codes are highly structured codes and they don’t have any random structure in them. I was wondering if it is a known phenomenon that has already been discussed somewhere (even in LDPC context). I will be very thankful to you if you can guide me to a few references or keywords to search.

  20. Rob Says:

    Hello Aitezaz,

    I’m afraid that I’ve reached the edge of my understanding of polar codes. Since the girth is constant with the code length, I don’t think that is the problem. I wonder if the structured nature of polar codes means that more iterations are required for good information at one of the code to propagate to the other end. Perhaps this is why the performance is suffering - you may like to try iterating between the check nodes and the variable nodes more times…

    Take care, Rob.

  21. Rob Says:

    Sarah says “Hi Rob,
    I have a question about polar codes.For polar codes, we have the Bhattacharyya parameter in advance before transmitting. Since Bhattacharyya parameter could estimate the performance of each bit channel, can we say that the bits with lower Bhttacharyya parameters are better protected than others?
    Thank your very much.
    Sarah”

    Hi Sarah,

    You are correct - different bits have different amounts of protection in the polar code. The polar decoder will decode the best protected bits first and use them to help decode the least protected bits.

    Take care, Rob.

  22. Sarah Says:

    Hi Bob,
    Thank you for your kind reply. Did you do BP decoding?
    Regards,
    Sarah

  23. Rob Says:

    Hello Sarah,

    I’m afraid that I have never tried using belief propagation for decoding a polar code.

    Take care, Rob.

  24. Nyakec Says:

    Thanks for this code, I can see it uses prob. computation, how can this be changed for QAM?

  25. Rob Says:

    Hi Nyakec,

    Please see my response to your other comment at…
    http://users.ecs.soton.ac.uk/rm/resources/matlabcapacity/#comment-9742

    Take care, Rob.

  26. Ahmed Elshahawy Says:

    Dear Rob,
    thanks for your reply but i still can use your program as i got only C++ and matlab so could you please send me the link again and tell me where is the AWGN pOLAR CODES IS LOCATED AND HOW CAN I RUN IT.
    Many Thanks
    Kind Regards
    Ahmed Elshahawy

  27. Rob Says:

    Hi Ahmed,

    I’m afraid that I only have a Polar code for IT++. I’m not sure if you realise, but IT++ is just a set of libraries for C++ - you can install it and then run my code.

    Take care, Rob.

  28. Ahmed Elshahawy Says:

    Dear Rob.

    Thank you very much for your reply ..do you know if can download IT++ fow windows xp and and which website is good to load it++ ??
    regards
    Ahmed

  29. Rob Says:

    Hi Ahmed,

    You can download IT++ from…
    http://itpp.sourceforge.net/current/

    Take care, Rob.

  30. Ahmed Elshahawy Says:

    Dear Rob
    Is’t ok to tell me how do u calculate the Bhattcharya Parameter for AWGN please as im stuck at this point ???

  31. Rob Says:

    Hello Ahmed,

    I’m afraid that it was a long time ago that I worked on this and I can’t remember how to do this. However, in an AWGN channel, W(y|x) is a Gaussian distribution. You will have to replace the sum over y with an integral dy.

    Take care, Rob.

  32. LJ Kong Says:

    Dear Rob,

    List decoding can improve SC decoder performance, Could you share the List decoding program? Many thanks.

    BR/LJ

  33. Rob Says:

    Hello LJ,

    I’m afraid that I don’t have any code for list decoding…

    Take care, Rob.

  34. Ankit Says:

    hi can you plz send me the detail dat i can implement polar code on Matlab

  35. Rob Says:

    Hello Ankit,

    I’m afraid that I don’t have a Matlab version of the polar code. However, Matlab is not too dissimilar from IT++, so it should be fairly easy for you to convert it.

    Take care, Rob.

  36. LJ Kong Says:

    Dear Rob,

    how to explain the eq. (5) in Erdal Arikan’s paper. why divide by 2^(N-1) and the scope of sum ? I can understand the explanation in the paper, but not the equation. Many thanks .

    BR
    LJ

  37. Rob Says:

    Hello LJ,

    I’m afraid that it was so long ago that I looked at this paper that I can’t remember what this means. I’ve just had a look at the paper, but it hasn’t jogged my memory.

    Sorry for not being much help, Rob.

  38. Ankit Says:

    In decoder how we can detect and correct errors?

    Is SC decoder and its latest architecture good to implement on DSP?

    What if we increase blocklength?

  39. Rob Says:

    Hi Ankit,

    There is a lot of research at the moment about how to implement decoding in hardware - the tricky thing is achieving a high throughput for the BCJR decoder, since it is not well suited to parallel processing. For large block lengths, the sliding window technique can be used to increase the parallelism and reduce the memory requirement.

    Take care, Rob.

  40. Stojan Says:

    Hi Rob,

    I also try to compile the code, however I fail. I have installed g++ and itpp.

    This is what I get when I type make.

    root@ubuntu:~/Downloads/PolarCode110# ls
    bin Makefile obj src
    root@ubuntu:~/Downloads/PolarCode110# make

    checking dependencies

    root@ubuntu:~/Downloads/PolarCode110#

    Also When I execute a.out I am not able to do this.

    root@ubuntu:~/Downloads/PolarCode110/bin# ls
    a.out
    root@ubuntu:~/Downloads/PolarCode110/bin# ./a.out
    bash: ./a.out: cannot execute binary file

    Any sugestions how to solve this.

    Regards,

    Stojan Kitanov

  41. Stojan Says:

    Hi Rob,
    I am not able to compile the code. This is what I get.
    root@ubuntu:~/Downloads/PolarCode110# ls
    bin Makefile obj src
    root@ubuntu:~/Downloads/PolarCode110# make

    checking dependencies

    Also I can not execute a.out file after compilation.

    root@ubuntu:~/Downloads/PolarCode110#
    root@ubuntu:~/Downloads/PolarCode110/bin# ls
    a.out
    root@ubuntu:~/Downloads/PolarCode110/bin# ./a.out
    bash: ./a.out: cannot execute binary file

    Any sugestions how to do this.

    Regards,

    Stojan Kitanov

  42. Rob Says:

    Hi Stojan,

    If you want to recompile the code, you should type “make clean” to remove the pre-compiled version and then “make” to recompile it.

    You need to change the permissions of a.out to make it executable. You may be able to do this by right clicking on the file and going to properties.

    Take care, Rob.

  43. Stojan Says:

    Hi Rob,

    I checked the properties of the file and it is marked as executable (i.e. to run as a program). So something else is wrong. As I said I have installed g++ and it++ both with sudo apt get install command.

    Otherwise I followed the commands make clean and make. And this what I get:
    root@ubuntu:~/Downloads/PolarCode110# make clean
    remove all objects
    root@ubuntu:~/Downloads/PolarCode110# make

    checking dependencies

    compiling object file \"obj/main.o\" …
    compiling object file \"obj/PolarCode.o\" …
    compiling object file \"obj/robprob.o\" …
    src/robprob.cpp: In function ‘RobProb::pvalues RobProb::to_pvalues(const vec&)’:
    src/robprob.cpp:621:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::vec RobProb::to_vec(const pvalues&)’:
    src/robprob.cpp:631:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues RobProb::add(const pvalues&, const pvalues&, RobProb::JacobianType)’:
    src/robprob.cpp:671:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalue RobProb::sum(const pvalues&, RobProb::JacobianType)’:
    src/robprob.cpp:689:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalue RobProb::product(const pvalues&)’:
    src/robprob.cpp:731:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::entropy(const pvalues&)’:
    src/robprob.cpp:746:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues RobProb::to_lvalues(const vec&, double)’:
    src/robprob.cpp:766:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::vec RobProb::to_vec(const lvalues&, double)’:
    src/robprob.cpp:776:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues RobProb::jacobian(const lvalues&, const lvalues&, RobProb::JacobianType)’:
    src/robprob.cpp:811:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalue RobProb::jacobian(const lvalues&, RobProb::JacobianType)’:
    src/robprob.cpp:829:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalue RobProb::sum(const lvalues&)’:
    src/robprob.cpp:873:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::entropy(const lvalues&)’:
    src/robprob.cpp:887:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues RobProb::log(const pvalues&)’:
    src/robprob.cpp:908:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues RobProb::exp(const lvalues&)’:
    src/robprob.cpp:921:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::mat RobProb::to_mat(const pvalues_frame&, RobProb::MatrixType)’:
    src/robprob.cpp:943:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:951:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::to_pvalues_frame(const mat&, RobProb::MatrixType)’:
    src/robprob.cpp:985:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:996:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::add(const pvalues_frame&, const pvalues_frame&, RobProb::JacobianType)’:
    src/robprob.cpp:1039:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::normalize(const pvalues_frame&)’:
    src/robprob.cpp:1052:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::equalize(const pvalues_frame&)’:
    src/robprob.cpp:1063:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const pvalues_frame&, const pvalues&)’:
    src/robprob.cpp:1077:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const pvalues_frame&)’:
    src/robprob.cpp:1095:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::mat RobProb::to_mat(const lvalues_frame&, RobProb::MatrixType, double)’:
    src/robprob.cpp:1123:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:1131:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::to_lvalues_frame(const mat&, RobProb::MatrixType, double)’:
    src/robprob.cpp:1165:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:1176:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::jacobian(const lvalues_frame&, const lvalues_frame&, RobProb::JacobianType)’:
    src/robprob.cpp:1213:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::normalize(const lvalues_frame&)’:
    src/robprob.cpp:1226:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::equalize(const lvalues_frame&)’:
    src/robprob.cpp:1237:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const lvalues_frame&, const lvalues&)’:
    src/robprob.cpp:1250:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const lvalues_frame&)’:
    src/robprob.cpp:1268:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::log(const pvalues_frame&)’:
    src/robprob.cpp:1284:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::exp(const lvalues_frame&)’:
    src/robprob.cpp:1295:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::vec RobProb::to_vec(const plr_frame&, double)’:
    src/robprob.cpp:2288:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::plr_frame RobProb::to_plr_frame(const vec&, double)’:
    src/robprob.cpp:2298:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::plr_frame RobProb::add(const plr_frame&, const plr_frame&, RobProb::JacobianType)’:
    src/robprob.cpp:2331:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const plr_frame&, const RobProb::plr&)’:
    src/robprob.cpp:2346:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const plr_frame&)’:
    src/robprob.cpp:2364:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::pvalues_frame RobProb::to_pvalues_frame(const plr_frame&)’:
    src/robprob.cpp:2395:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::plr_frame RobProb::to_plr_frame(const pvalues_frame&)’:
    src/robprob.cpp:2405:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::vec RobProb::to_vec(const llr_frame&, double)’:
    src/robprob.cpp:2416:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::to_llr_frame(const vec&, double)’:
    src/robprob.cpp:2426:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::jacobian(const llr_frame&, const llr_frame&, RobProb::JacobianType)’:
    src/robprob.cpp:2465:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::jacobian_xor(const llr_frame&, const llr_frame&, RobProb::JacobianType)’:
    src/robprob.cpp:2483:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const llr_frame&, const RobProb::llr&)’:
    src/robprob.cpp:2497:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const llr_frame&)’:
    src/robprob.cpp:2515:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const llr_frame&, const bvec&)’:
    src/robprob.cpp:2611:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2652:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2672:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2716:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2756:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘void RobProb::display_llr_histograms(const llr_frame&, const bvec&)’:
    src/robprob.cpp:2793:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2834:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2854:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:2898:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::generate_gaussian_llr_frame(const bvec&, double)’:
    src/robprob.cpp:3004:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp:3020:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::generate_bec_llr_frame(const bvec&, double)’:
    src/robprob.cpp:3035:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::lvalues_frame RobProb::to_lvalues_frame(const llr_frame&)’:
    src/robprob.cpp:3047:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::to_llr_frame(const lvalues_frame&)’:
    src/robprob.cpp:3057:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::llr_frame RobProb::log(const plr_frame&)’:
    src/robprob.cpp:3069:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘RobProb::plr_frame RobProb::exp(const llr_frame&)’:
    src/robprob.cpp:3080:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::ivec RobProb::hard(const pvalues_frame&)’:
    src/robprob.cpp:3151:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::ivec RobProb::hard(const lvalues_frame&)’:
    src/robprob.cpp:3162:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::bvec RobProb::hard(const plr_frame&)’:
    src/robprob.cpp:3190:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘itpp::bvec RobProb::hard(const llr_frame&)’:
    src/robprob.cpp:3201:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    src/robprob.cpp: In function ‘double RobProb::mutual_information(const llr_frame&, const bvec&)’:
    src/robprob.cpp:2732:129: warning: ‘bin_offset’ may be used uninitialized in this function [-Wuninitialized]
    src/robprob.cpp:2732:117: warning: ‘bin_width’ may be used uninitialized in this function [-Wuninitialized]
    src/robprob.cpp: In function ‘void RobProb::display_llr_histograms(const llr_frame&, const bvec&)’:
    src/robprob.cpp:2770:6: warning: ‘bin_offset’ may be used uninitialized in this function [-Wuninitialized]
    src/robprob.cpp:2914:117: warning: ‘bin_width’ may be used uninitialized in this function [-Wuninitialized]

    creating binary \"bin/a.out\"
    /usr/bin/ld: cannot find -lfftw3
    /usr/bin/ld: cannot find -llapack
    /usr/bin/ld: cannot find -lblas
    collect2: ld returned 1 exit status
    make: *** [bin] Error 1
    root@ubuntu:~/Downloads/PolarCode110#

    Any idea how to fix this.

    Best regards,

    Stojan Kitanov

  44. Rob Says:

    Hi Stojan,

    The error messages show that your installation of IT++ does not have lfftw3, llapack and lblas, which it requires. I’m afraid that I don’t know how to fix this because it has been a long time since I last installed IT++. My advice would be for you to visit the IT++ webpage and look for help there.

    With regard to a.out, the only other thing that I can think of is that the permissions of the file may not be granting you access to it. For this, I’m afraid that I must refer you to the ubuntu webpages for help…

    Take care, Rob.

  45. Stojan Says:

    Hi Rob,

    I managed to compile it and to run the ./a.out file in bin.

    I installed the packages:

    sudo apt-get install fftw3-dev
    sudo apt-get install liblapack-dev

    After that I was able to compile it and to run the a.out file in bin folder.
    Thanks for your help.
    Would you give me any sugestions how to continue with the simulations.

    Regards,

    Stojan

Leave a Reply

Security Code: