Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
@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)
- Issue when running Behaviorspace runs in parallel HOT 4
- NetLogo Installer caught in a loop on Windows
- decimal HOT 1
- Build error with arduino extension HOT 5
- Error with TestFilePrimsUTF8
- Error with NetworkUtilsTest findViableInterfaces HOT 1
- NetLogo 3D 6.4 fails to open model that worked in 6.3; shows no menus HOT 5
- Link Agent Monitor Runtime Error when end1 is a number HOT 2
- No documentation on values end1 and end2 in the Links Agent Monitor HOT 1
- BehaviorSpace runtime error if output file is open in Windows HOT 2
- Runtime errors in command tasks do not jump to code location HOT 2
- Anonymous procedures defined outside of the main code tab give unhelpful code locations
- Java erros - I already tried some solutions HOT 2
- The **Indent Automatically** checkbox should have a preference setting for default HOT 1
- Users should have their own folder to add extensions via their home directories HOT 5
- URL is incorrect
- `let` definitions can be accessible to `run` outside of their intended scope
- Allow multi-line strings
- Allow multi-line comments
- Reset-ticks error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netlogo.