Last active
February 28, 2021 11:21
-
-
Save anandijain/bc9005f6753e4e437fc8e67fa4d3f7c3 to your computer and use it in GitHub Desktop.
tmap pycall mwe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SciMLBase, SbmlInterface | |
# assumes this is cloned: https://github.com/sbmlteam/sbml-test-suite to homedir | |
path = joinpath(homedir(), "sbml-test-suite/cases/") | |
function extract_xmls() | |
dirs = filter(isdir, readdir(path; join=true)) | |
all_dirs = mapreduce(x -> filter(isdir, readdir(x; join=true)), vcat, dirs) | |
all_files = vcat(readdir.(all_dirs; join=true)...) | |
filter!(x -> occursin(".xml", x), all_files) | |
end | |
all_files = extract_xmls() | |
SciMLBase.tmap(getmodel, all_files) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hmm. never tried this parallelisation. cannot look at it atm. will do tonight.