Giter VIP home page Giter VIP logo

Comments (9)

niktre avatar niktre commented on May 29, 2024

these things can be moved to examples, as there is no real testing (the test framework with assert is not used at all).
@acfogarty ?

from espressopp.

acfogarty avatar acfogarty commented on May 29, 2024

They are "testing" some functions/interfaces, at least just for whether it runs without crashing. Another option would be to delete the slowest parts of the scripts, all the file I/O. But I agree it's not really worth it and we should just move them to examples, with the long-term goal of someday having unit tests for those functions...

from espressopp.

junghans avatar junghans commented on May 29, 2024

The other thing we could do is to mark some tests as big, long or nightly and have them off by default and only enable them in some of the travis builds.

On the other hand we could also just reduce the number of steps for pi_water and polymer_melt_tabulated in the tests and copy a longer version in examples.

from espressopp.

niktre avatar niktre commented on May 29, 2024

I think for pi_water it is even not possible. At least I haven't seen this possibility. There psfwrite takes quite some time

from espressopp.

fedepad avatar fedepad commented on May 29, 2024

Ok, regarding psfwrite I notice that it can suffer the same problem as writexyz at the python level, i.e. looping through all the particles. For example, in the case of writexyz this can be made faster already at the python level by using configurations (this is for example what fastwritexyz does and there are orders of magnitude of difference when dumping a lot of particles, see #77 .
The problem here is that mass and q is needed in addition and right now I don't think (actually don't remember ;)) that this info is passed on with the "Configuration" approach used by fastwritexyz.
This only one part and intuition given I've seen this in #77 because don't know how long the second loop in psfwrite takes (the one over the interactions)...

from espressopp.

junghans avatar junghans commented on May 29, 2024

How about just doing pi_water and polymer_melt_tabulated for just one time step to test the API and putting a more physical version in examples?

from espressopp.

acfogarty avatar acfogarty commented on May 29, 2024

@junghans Looks like pi_water already runs for only one time step.

@fedepad I think that doing anything to speed up psfwrite is not worth the effort. PSF files only contain info that doesn't change during a simulation, so in practice the user would only call psfwrite a maximum of one time per simulation. So in real applications it doesn't matter if psfwrite is a bit slow, it still takes a completely negligeable amount of time compared to the total simulation time.

I actually added a unit test for psfwrite recently, in testsuite/python_tools, and this test is taking only around 0.4 sec (because I deliberately wrote the test for a tiny number of particles).

from espressopp.

junghans avatar junghans commented on May 29, 2024

@acfogarty: then we have to decrease the system size for pi_water.

from espressopp.

govarguz avatar govarguz commented on May 29, 2024

@junghans Yeah, I think that is better, in particular because they are not benchmarking related!

from espressopp.

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.