Skip to content

Instantly share code, notes, and snippets.

@anandijain
Last active February 28, 2021 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandijain/bc9005f6753e4e437fc8e67fa4d3f7c3 to your computer and use it in GitHub Desktop.
Save anandijain/bc9005f6753e4e437fc8e67fa4d3f7c3 to your computer and use it in GitHub Desktop.
tmap pycall mwe
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)
@paulflang
Copy link

hmm. never tried this parallelisation. cannot look at it atm. will do tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment