IDEAS home Printed from https://ideas.repec.org/p/gta/workpp/6826.html
   My bibliography  Save this paper

Using Python for Parallelization

Author

Listed:
  • van der Mensbrugghe, Dominique

Abstract

This short note describes one way of taking advantage of the multiple cores on most desktop computers. It describes running one of the processes in the GTAP build procedure called ’FIT’. The input to ’FIT’ is a balanced input-output table (IOT), which is adjusted to a number of exogenous elements including aggregate domestic absorption and import and export vectors. It is run for each of the countries/regions in the build, but there is no interaction across countries/regions and thus can be run in parallel. The procedure uses a Python script to run the ’FIT’ procedure, either sequentially or in parallel. Most of the code is generic and thus it can be easily adapted to other programs that can take advantage of parallelism, for example Monte Carlo simulations. For the tested ’FIT’ procedure, it reduces the runtime from 75 minutes to 14 minutes on a relatively new desktop with a 12th Generation Intel Core I-9 CPU with 16 physical cores.

Suggested Citation

  • van der Mensbrugghe, Dominique, 2023. "Using Python for Parallelization," GTAP Working Papers 6826, Center for Global Trade Analysis, Department of Agricultural Economics, Purdue University.
  • Handle: RePEc:gta:workpp:6826
    Note: GTAP Working Paper No. 93
    as

    Download full text from publisher

    File URL: https://www.gtap.agecon.purdue.edu/resources/res_display.asp?RecordID=6826
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Dietz, Simon & Rising, James & Stoerk, Thomas & Wagner, Gernot, 2021. "Economic impacts of tipping points in the climate system," LSE Research Online Documents on Economics 111807, London School of Economics and Political Science, LSE Library.
    2. J Mark Horridge & Ken Pearson, 2006. "Running Simulations Faster on Multi-Processor or 64-Bit PCs via GEMPACK," Centre of Policy Studies/IMPACT Centre Working Papers c15, Victoria University, Centre of Policy Studies/IMPACT Centre.
    3. Simon Dietz & James Rising & Thomas Stoerk & Gernot Wagner, 2021. "Economic impacts of tipping points in the climate system," Proceedings of the National Academy of Sciences, Proceedings of the National Academy of Sciences, vol. 118(34), pages 2103081118-, August.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. van der Mensbrugghe, Dominique, 2023. "Using Python for Parallelization," GTAP Technical Papers 6826, Center for Global Trade Analysis, Department of Agricultural Economics, Purdue University.
    2. Hametner, Markus, 2022. "Economics without ecology: How the SDGs fail to align socioeconomic development with environmental sustainability," Ecological Economics, Elsevier, vol. 199(C).
    3. Rising, James A. & Taylor, Charlotte & Ives, Matthew C. & Ward, Robert E.t., 2022. "Challenges and innovations in the economic evaluation of the risks of climate change," LSE Research Online Documents on Economics 114941, London School of Economics and Political Science, LSE Library.
    4. Rising, James A. & Taylor, Charlotte & Ives, Matthew C. & Ward, Robert E.T., 2022. "Challenges and innovations in the economic evaluation of the risks of climate change," Ecological Economics, Elsevier, vol. 197(C).
    5. Huwe, Vera & Henze, Levi T. & Steitz, Janek, 2023. "16 Gründe für schnelles Handeln: Kipppunkte und ihre Bedeutung für die Klimapolitik," Papers 277908, Dezernat Zukunft - Institute for Macrofinance, Berlin.
    6. Ameur, Hachmi Ben & Han, Xuyuan & Liu, Zhenya & Peillex, Jonathan, 2022. "When did global warming start? A new baseline for carbon budgeting," Economic Modelling, Elsevier, vol. 116(C).
    7. Lazarus, Elias & Brown, Clair, 2022. "Improving the genuine progress indicator to measure comparable net welfare: U.S. and California, 1995–2017," Ecological Economics, Elsevier, vol. 202(C).
    8. Committeri, Marco & Brüggemann, Axel & Kosterink, Patrick & Reininger, Thomas & Stevens, Luc & Vonessen, Benjamin & Zaghini, Andrea & Garrido, Isabel & Van Meensel, Lena & Strašuna, Lija & Tiililä, Ne, 2022. "The role of the IMF in addressing climate change risks," Occasional Paper Series 309, European Central Bank.
    9. Charakopoulos, Avraam & Karakasidis, Theodoros, 2022. "Backward Degree a new index for online and offline change point detection based on complex network analysis," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 604(C).
    10. Sureth Michael & Kalkuhl Matthias & Edenhofer Ottmar & Rockström Johan, 2023. "A Welfare Economic Approach to Planetary Boundaries," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 243(5), pages 477-542, October.
    11. Méjean, Aurélie & Pottier, Antonin & Zuber, Stéphane & Fleurbaey, Marc, 2023. "Opposite ethical views converge under the threat of catastrophic climate change," Ecological Economics, Elsevier, vol. 212(C).
    12. Tobias Adrian & Nina Boyarchenko & Domenico Giannone & Ananthakrishnan Prasad & Dulani Seneviratne & Yanzhe Xiao, 2022. "800,000 Years of Climate Risk," Staff Reports 1031, Federal Reserve Bank of New York.
    13. Javed, Muhammad Shahzad & Jurasz, Jakub & Dąbek, Paweł Bronisław & Ma, Tao & Jadwiszczak, Piotr & Niemierka, Elżbieta, 2023. "Green manufacturing facilities – Meeting CO2 emission targets considering power and heat supply," Applied Energy, Elsevier, vol. 350(C).
    14. Van Ha, Pham & Kompas, Tom, 2016. "Solving intertemporal CGE models in parallel using a singly bordered block diagonal ordering technique," Economic Modelling, Elsevier, vol. 52(PA), pages 3-12.
    15. Souleymane Diallo, 2023. "Natural resource wealth in sub-Saharan Africa: A boon for public investment in renewable energy?," ECONOMICS AND POLICY OF ENERGY AND THE ENVIRONMENT, FrancoAngeli Editore, vol. 2023(2), pages 19-40.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gta:workpp:6826. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Jeremy Douglas (email available below). General contact details of provider: https://edirc.repec.org/data/gtpurus.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.