{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/can-large-language-models-write-parallel-code","title":"Can Large Language Models Write Parallel Code?","arxiv_id":"2401.12554","date":"2024-01-23","proceeding":null,"authors":["Daniel Nichols","Joshua H. Davis","Zhaojun Xie","Arjun Rajaram","Abhinav Bhatele"],"abstract":"Large language models are increasingly becoming a popular tool for software development. Their ability to model and generate source code has been demonstrated in a variety of contexts, including code completion, summarization, translation, and lookup. However, they often struggle to generate code for complex programs. In this paper, we study the capabilities of state-of-the-art language models to generate parallel code. In order to evaluate language models, we create a benchmark, ParEval, consisting of prompts that represent 420 different coding tasks related to scientific and parallel computing. We use ParEval to evaluate the effectiveness of several state-of-the-art open- and closed-source language models on these tasks. We introduce novel metrics for evaluating the performance of generated code, and use them to explore how well each large language model performs for 12 different computational problem types and six different parallel programming models.","url_abs":"https://arxiv.org/abs/2401.12554v3","url_pdf":"https://arxiv.org/pdf/2401.12554v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"can-large-language-models-write-parallel-code","repo_url":"https://github.com/parallelcodefoundry/ParEval","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"code-completion","task_name":"Code Completion"},{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.12554","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.12554"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/parallelcodefoundry/ParEval","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":18,"unverified":1},"by_repo_kind":{"official":{"samples":19,"ran":18,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"de2d759b067567af","entry":"all_equal","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"drivers/util.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/drivers/util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"de2d759b067567af"}},{"code_sha256_prefix":"e7bbb8f061c2443c","entry":"already_has_results","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"drivers/run-all.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/drivers/run-all.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7bbb8f061c2443c"}},{"code_sha256_prefix":"0938e73682f13d8b","entry":"any_in","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/bin-the-stack.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/bin-the-stack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0938e73682f13d8b"}},{"code_sha256_prefix":"98ceec1f11b8e7a0","entry":"buildk","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/metrics.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98ceec1f11b8e7a0"}},{"code_sha256_prefix":"b588819cf6250c27","entry":"clean_output","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/clean-outputs.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/clean-outputs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b588819cf6250c27"}},{"code_sha256_prefix":"8d9bdc243671a23f","entry":"efficiencyk","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/metrics-scaling.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/metrics-scaling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d9bdc243671a23f"}},{"code_sha256_prefix":"e011cbcff09dc44b","entry":"get_correctness_df","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/metrics.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e011cbcff09dc44b"}},{"code_sha256_prefix":"2f1ce38ddef63dc9","entry":"get_env_var","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/generate-gemini.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/generate-gemini.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f1ce38ddef63dc9"}},{"code_sha256_prefix":"fc1387d6dfa3f110","entry":"get_function_name","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/generate-gemini.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/generate-gemini.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc1387d6dfa3f110"}},{"code_sha256_prefix":"60484b445abb73b5","entry":"get_max_tokens_per_second","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/generate-gemini.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/generate-gemini.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60484b445abb73b5"}},{"code_sha256_prefix":"85d8ccfa5ba4fb7b","entry":"get_max_tokens_per_second","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/generate-openai.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/generate-openai.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"85d8ccfa5ba4fb7b"}},{"code_sha256_prefix":"d55502b35fc3f4c1","entry":"has_balanced_brackets","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"generate/clean-outputs.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/generate/clean-outputs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d55502b35fc3f4c1"}},{"code_sha256_prefix":"311658ebceb020fe","entry":"has_outputs","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/create-dataframe.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/create-dataframe.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"311658ebceb020fe"}},{"code_sha256_prefix":"9430b9d58bca314d","entry":"load_json","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"drivers/util.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/drivers/util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9430b9d58bca314d"}},{"code_sha256_prefix":"c1d07cc2f1b9ecf6","entry":"nCr","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/metrics-scaling.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/metrics-scaling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c1d07cc2f1b9ecf6"}},{"code_sha256_prefix":"24736464e5b48a38","entry":"read_json","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/bin-the-stack.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/bin-the-stack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"24736464e5b48a38"}},{"code_sha256_prefix":"084d0107c87254df","entry":"speedupk","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/metrics-scaling.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/metrics-scaling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"084d0107c87254df"}},{"code_sha256_prefix":"6eee785f978e2422","entry":"uses_mpi","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"analysis/bin-the-stack.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/analysis/bin-the-stack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6eee785f978e2422"}},{"code_sha256_prefix":"9c46438f56d92741","entry":"await_input","repo":"parallelcodefoundry/ParEval","repo_kind":"official","path":"drivers/util.py","file_url":"https://github.com/parallelcodefoundry/ParEval/blob/HEAD/drivers/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c46438f56d92741"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}