GithubHelp home page GithubHelp logo

Comments (12)

stephentetley avatar stephentetley commented on June 13, 2024 1

I can now run gradlew.bat test with Flix head. I haven't tried through IntelliJ but I'd be hopeful it would work as it seems the memory residency problem is fixed - I'm not hearing my PC paging and I can use other programs will gradlew.bat test runs in the background.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

@stephentetley I created a gradle.properties in the project root with:

org.gradle.jvmargs=-Xmx4g -Xms128m

and I can run ./gradlew clean test. Does that work for you?

(I should note that sometimes if you don't run clean indeed you might get strange errors.)

Another note: I believe GitHub runners only have 7GB of memory, so it should be possible.

Can you check and report back?

from flix.

stephentetley avatar stephentetley commented on June 13, 2024

Thanks Magnus, not a success I'm afraid.

I killed ./gradlew clean test after 1 hour 17 minutes. Prior to new typer test all would about 10-12 minutes on my PC.

I still saw the same sort of memory errors as per the trace posted to the discussion thread, I think after 20 to 30 minutes the JVM was just trying to service the memory problems and unable to evaluate any further tests.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

That's annoying. I will have to check whether my configuration is actually respecting gradle.properties.

Whats your OS and Java version? How much memory does the JVM use with/without the gradle.properties (according to the OS)?

I am also puzzled because the GitHub runners should only have 7GB memory and they seem to run fine.

The good news is that we will replace the Boolean unification stuff, which is very likely the culprint, with a better strategy in the near future (see #7542)

from flix.

stephentetley avatar stephentetley commented on June 13, 2024

Windows (and PowerShell though I can't see that would make a difference). Java 21.

I can try again on Ubuntu at the weekend although that didn't work within IntelliJ.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

I can confirm that the memory usage increases to about 9GB.

Not sure why Gradle is not respecting my limit :/

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

As an experiment, in build.gradle can you try to change the testAll task to:

task testAll(dependsOn: ['testClasses'], type: JavaExec) {
    mainClass = 'org.scalatest.tools.Runner'
    args = ['-s', 'ca.uwaterloo.flix.TestAll', '-o']
    jvmArgs = ['-Xmx4g']
    classpath = sourceSets.test.runtimeClasspath
    standardInput = System.in
}

This is dropping the -P flag for parallel execution and enforcing a memory limit.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

On my my machine, when limited to 3G, the testAll still completes within a reasonable time.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

(Note to self: gradle.properties is not used when running with type: JavaExec).

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

@stephentetley Hi Stephen. Did you have a chance to try without the -P flag?

from flix.

stephentetley avatar stephentetley commented on June 13, 2024

Thanks Magnus, I forgot to try. I will look at it tomorrow evening.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

We have modified master so tests no longer run in parallel. (Only parallel within one Flix instance). That should make memory usage smaller and predictable.

We have also started tracking memory usage here: https://arewefast.flix.dev/

Let me know if it still does not work within IDEA.

from flix.

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.