Code Monkey home page Code Monkey logo

Comments (9)

kodingkoning avatar kodingkoning commented on June 27, 2024

Looking at other information about sbt, it seems that it's an issue of trying to build without being root. Is there a way to manually set where to build?

I also tried building incrementally, and when I run netlogo/compile in sbt, that works fine.

from netlogo.

LaCuneta avatar LaCuneta commented on June 27, 2024

Hey Elizabeth, sorry you ran into this issue. It's definitely odd, if you're able to update the submodule extensions using git, you should be able to build them. Root permissions should not be required to run sbt. One way to check is to just open a terminal in the NetLogo repository, cd extensions/array, and then run sbt package to see if you can run the extension packaging standalone. If that fails then probably there is some odd file permissions issue. If it works, then the problem would have to be with how NetLogo's sbt session is creating the sub-processes to build the extensions.

Is there a way to manually set where to build?

By default sbt builds to a target/ folder for each sub-project in the repo, so, for example, array will build to extensions/array/target/ There may be a way to change that, but I've never had to before.

One thing to note, depending on why you're trying to build NetLogo you may not need the extensions. If you're just making changes to the UI or adding a new primitive or something you can just use netlogo/run to test your work, or something like netlogo/Test/language to run language tests. Building the extensions, as happens with running dist/buildNetLogo is necessary when packaging a NetLogo release and sometimes when you're testing out an extension from within the NetLogo repository.

from netlogo.

kodingkoning avatar kodingkoning commented on June 27, 2024

When I run sbt package it works fine. If I then go back to the top directory, I still get the same error. I could probably do without the array extension, but I would prefer having it.

When I try ./sbt netlogo/run, then I get an error about opening the X11 window server. I'm trying to run this headless. How can I do that without running ./sbt all?

from netlogo.

LaCuneta avatar LaCuneta commented on June 27, 2024

For running headlessly from sbt, just use netlogo/runMain org.nlogo.headless.Main and then add command line switches as per the BehaviorSpace documentation.

Example: netlogo/runMain org.nlogo.headless.Main --model "../models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo" --experiment "Wolf Sheep Simple model analysis"

If you can be more specific about what changes you are making and testing to the NetLogo code, I can better advise on avoiding running the all command - again it's usually used when running the full test suite or when bundling NetLogo for distribution, so most of it isn't necessary for development.

from netlogo.

kodingkoning avatar kodingkoning commented on June 27, 2024

I tried with the textbook model: ./sbt netlogo/runMain org.nlogo.headless.Main --model models/IABM\ Textbook/chapter\ 4/Wolf\ Sheep\ Simple\ 5.nlogo --experiment "Wolf Sheep Simple model analysis"

But I get the error:

[error] Expected whitespace character
[error] netlogo/runMain
[error]                ^

Am I correct in running this from sbt, or is there a different executable I'm meant to use?

from netlogo.

LaCuneta avatar LaCuneta commented on June 27, 2024

Right, so the command I wrote assumed you'd started an interactive session with just ./sbt. If you want to start sbt and run a command: ./sbt "netlogo/runMain org.nlogo.headless.Main --model \"../models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo\" --experiment \"Wolf Sheep Simple model analysis\""

from netlogo.

LaCuneta avatar LaCuneta commented on June 27, 2024

And just to ask the question, are you intending to do NetLogo development, as in changes to Java or Scala files to alter how NetLogo runs? If you just want to run a NetLogo model headlessly you just need to install one of the packages and follow the BehaviorSpace directions I'd linked before, no need to use git/sbt/etc.

from netlogo.

kodingkoning avatar kodingkoning commented on June 27, 2024

Great, that's working for me now!

I am planning to make modifications to NetLogo, mostly in optimizations for performance. I haven't implemented any changes yet -- I'm still trying to get a baseline.

from netlogo.

LaCuneta avatar LaCuneta commented on June 27, 2024

@kodingkoning Awesome, that sounds great. If you need any other info on working around the failing extension builds or on your optimization work, just let me know.

from netlogo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.