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

machine_time is not defined or accessible Windows #360

Open
ScriBanana opened this issue Oct 21, 2024 · 7 comments
Open

machine_time is not defined or accessible Windows #360

ScriBanana opened this issue Oct 21, 2024 · 7 comments

Comments

@ScriBanana
Copy link

Hi everyone,

I am trying to run a model where I use the primitive machine_time, but I get the following: "machine_time is not defined or accessible in this context. Check its name or declare it." in the editor, so I cannot run it. However, the interactive console gives me the actual machine time when I type it, as expected.

The model works on Linux with no issue. I am currently trying to run it on Windows 11 on a fresh Gama install. I tried the latest release and the stable 1.9.3 one with the same result.

Repo at https://github.com/ScriBanana/SahelFlux

Desktop:

  • OS: Windows 11
  • GAMA version: 1.9.3 with JDK

This may be linked to #172.

@ScriBanana
Copy link
Author

Update: Removing the primitive enables the model in its entirety, so it appears to be specific to machine_time on windows.

@lesquoyb
Copy link
Contributor

Hello, yes machine_time by itself is not supported anymore since 1.9.3, it was actually a deprecated shortcut for gama.machine_time which is now the enforced syntax.
We somehow forgot to write it in the changelog, sorry for the inconvenience.

@ScriBanana
Copy link
Author

Alright, thanks. What is the new alternative, then, please ?

Btw, it is still all over the documentation (https://gama-platform.org/wiki/GlobalSpecies#machine_time, https://gama-platform.org/wiki/OptimizingModels, for example) and still works in the console and doesn't get flagged in Linux, then.

@lesquoyb
Copy link
Contributor

What I meant is that you now have to write gama.machine_time instead of machine_time.

Thanks for the links to the documentation I will add an issue about it on the website's github.
It is normal that it works in the console I think because the context of execution inside is different, though I'll double check that tomorrow.
I didn't get what you meant by "it doesn't get flagged in Linux", does that mean that there are no error messages when you try to use machine_time in the code on linux ?
I reopen the issue just to keep me reminded of those tasks and will close it when done

@lesquoyb lesquoyb reopened this Oct 23, 2024
@ScriBanana
Copy link
Author

OK, noted, thanks.

Yes, no error message from the IDE when calling it in a model file on Linux. Kernel: 6.11.4-zen2-1-zen with Gama version 1.9.3-1 from the AUR.
I did not try to run a file with it headless in windows.

@AlexisDrogoul
Copy link
Member

The error gets flagged on macOS.

@lesquoyb
Copy link
Contributor

It's flagged on windows too, @RoiArthurB could you have a look on linux with the latest git version ?

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

3 participants