Please take into account the following considerations:

  1. According to the GPL license, there is no legal requirement to reference Madagascar when you use it.
  2. Please consider contributing your paper to Madagascar. Multiple studies have shown that reproducible papers receive more attention from the readers and make a higher impact. Releasing your paper can also help you maintain your own research results. In words of Jon Claerbout,

    “It takes some effort to organize your research to be reproducible. We found that although the effort seems to be directed to helping other people stand up on your shoulders, the principal beneficiary is generally the author herself. This is because time turns each one of us into another person, and by making effort to communicate with strangers, we help ourselves to communicate with our future selves.”

  3. If codes from Madagascar played an important role in the research that led to your paper, referencing it is a scientifically ethical thing to do. As stated by the Ethical Guidelines of the American Mathematical Society,
    “The correct attribution of mathematical results is essential, both because it encourages creativity, by benefiting the creator whose career may depend on the recognition of the work and because it informs the community of when, where, and sometimes how original ideas entered into the chain of mathematical thought.”

Of course, such statements can be applied not only to mathematical ideas but also to computational results.

How to cite Madagascar? Mike Jackson from the Software Sustainability Institute makes a set of clear recommendations for citing software. A citation may look like Madagascar software. Version 1.4. October 2012. https://www.ahay.org/ or more specific with reference to a particular program used and its author. In BibTeX, you can use something like

@Manual{Madagascar,  
author = {{Madagascar Development Team}},  
title = {Madagascar Software, Version~1.4},  
year = {2012},  
address = {https://www.ahay.org/}  
}