Giter Site home page Giter Site logo

Comments (5)

tclune avatar tclune commented on June 11, 2024 1

OK - I think I have at least a glimmer as to what is going on now, but I think it is the compiler that is likely at fault. I took a shortcut when introducing "test annotations" of which Disable is the main use. Each test is itself a dictionary of annotations. (My shortcut was to use inheritance (is-a) rather than composition (has-a).) But the dictionary itself uses allocatable components and should be deallocated when the test goes out of scope. For cases without Disable, the dictionary remains empty.

The problem with my theory is that there is no guarantee that another implementation would solve the problem, and none of the approaches I've contemplated are quite trivial. For my own notes, I'll list what I've thought of so far:

  1. Add a clear() method to the Test class hierarchy and make sure that it is called in the driver. High probability of solving the memory leak, but rather a step in the wrong direction in terms of basic design.
  2. Upgrade the dictionary to from my v1 implementation to v1. A useful thing on its own, but not very likely to change the results.
  3. Switch things so that the Test class "has-a" dictionary of annotations. This would improve the design from a loose-coupling perspective, but probably has other design implications that I'm not immediately seeing.
  4. Just realized a variant on (1) Just make the top most TestSuite object in the driver allocatable, and deallocate it at the end. Much easier than(1), does not really impact design. Might leave the internal dictionary as a leak, as I still think this is a compiler "bug".

I'll try to attempt (4) next weekend.

from pfunit.

tclune avatar tclune commented on June 11, 2024 1

Apologies for the delay in following up. I took some downtime last weekend and jumped back in this weekend. Unfortunately there is something wrong with the gfortran configuration on my laptop, as I was unable to build pFUnit. (CI tests say all is good, so?) So went to build on our computing center cluster instead, and ... somehow I'm locked out.

Hopefully one or both of these issues are resolved quickly tomorrow morning and I can attempt some of the workarounds I mentioned previously.

from pfunit.

tclune avatar tclune commented on June 11, 2024 1

OK - am now in an environment where I can reproduce the issue. Amusingly the first few things I tried actually made the leak slightly worse.

Switching to the newer implementation of my poor-man STL container analogs seems to have eliminated the leaks. But while I was at it, I went ahead and switched the treatment of annotations to "has-a" from "is-a". That was easier than I thought it would be, and is generally cleaner code.

Running CI for merge into develop branch now.

from pfunit.

tclune avatar tclune commented on June 11, 2024

To be honest, I'm a bit (pleasantly) surprised that you are not seeing a modest leak for the non-disabled case. Been a while since I looked into the @disable logic, but will try to see if I can spot anything obvious.

from pfunit.

tclune avatar tclune commented on June 11, 2024

Alas, my changes apparently break Intel in a way that I cannot readily find a workaround. Some sort of memory corruption so that it ends up with invalid pointers to individual tests, but some tests run through without issue.

I'm actually a bit surprised because I figured that a shallower inheritance chain would be less stressful for the compiler.

It also broke NAG in a somewhat surprising way, but there I was able to find a simple workaround.

from pfunit.

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.