Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running m4ra_gtfs_traveltimes on windows is impossible due to mc.cores>1 #24

Open
idshklein opened this issue May 8, 2023 · 1 comment

Comments

@idshklein
Copy link

trying to run m4ra_gtfs_traveltimes on windows fails due to the fact that num_cores gets the number of cores on the computer, which is larger than 1. num_cores is fed into mcapply mc.cores argument,without the possibilty of changing the parameter. is m4ra not suitable for windows?

@mpadge
Copy link
Member

mpadge commented May 9, 2023

Thanks for asking @idshklein. This package is still under heavy development, so not really ready for "general consumption" just yet, and also not really documented at all. Short answer to your question is here:
https://github.com/ATFutures/m4ra/blob/b57c1cb9c921082d086c68aab883254369ffe13a/R/utils.R#L29-L39
So you just need to:

Sys.setenv ("M4RA_NUM_CORES" = 4) # or whatever

Note that everything really is designed to run in parallel, and running on single core, or even only a few, will generally take a long time to calculate. You also need to actively look at dynamic memory consumption, because depending on how big your GTFS feed is, the routines can require more memory than what is available.

Can I ask what you'd be using this for? I'd be happy to help further if it's an interesting project. It's currently being tested exclusively for my own purposes (mostly https://urbananalyst.city), but would be great to have a second use-case for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants