EconPapers    
Economics at your fingertips  
 

Using Python for Parallelization

Dominique van der Mensbrugghe

GTAP Working Papers from Center for Global Trade Analysis, Department of Agricultural Economics, Purdue University

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.

Date: 2023
Note: GTAP Working Paper No. 93
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://www.gtap.agecon.purdue.edu/resources/res_display.asp?RecordID=6826 (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gta:workpp:6826

Access Statistics for this paper

More papers in GTAP Working Papers from Center for Global Trade Analysis, Department of Agricultural Economics, Purdue University Contact information at EDIRC.
Bibliographic data for series maintained by Jeremy Douglas ().

 
Page updated 2025-03-19
Handle: RePEc:gta:workpp:6826