Code Monkey home page Code Monkey logo

Comments (7)

MengZhang avatar MengZhang commented on August 11, 2024

Does it only happen in multiple tread mode? I have checked the code for generating batch file and currently it is accept the array of all experiment data and loop it to write command line one by one. Therefore I think it is match with the logic above. I also tried multiple experiment output together to see how the batch file would be generated, and as a result I didn't find the order got shuffled.

from translator-dssat.

frostbytten avatar frostbytten commented on August 11, 2024

It is with the thread mode. Do you have your own thread implementation inside your translator?

from translator-dssat.

MengZhang avatar MengZhang commented on August 11, 2024

I checked my code that I created a class called DssatThreadOutput to wait for your call. I also find that in the thread output, I passed experiment data one by one to the controller output. Therefore, it should create a bunch of zip package with only one experiment inside. As a result, I want to confirm if you have used this class in your side. If so, do you have any code to combine those zips into one zip with all experiment files?
In addition, when the tread mode will be used? By using QuadUI?

from translator-dssat.

frostbytten avatar frostbytten commented on August 11, 2024
  • The front-end tools (QuadUI and API) are calling DssatOutputController.writeFile().
  • The translators should be responsible for packaging all the files into whatever format is necessary for them.
  • Threaded-mode should be used by all translators eventually, for speed.

Here is some pseudo-code for the way I see it working.

ArrayList<String> experimentNames = new ArrayList<String>();
// Since we are receiving packed files, unpack the files.
ArrayList<Map<String, Object>> flat = MapUtil.flatPack(experiementsMap);
for (Map<String, Object> experiment : flat) {
   // Extract the name of the experiment
   experimentNames.add(MapUtil.getValueOr(experiment, "exname", "");
  // Submit this to a thread processor for work
  ...
}

// Use experimentNames to export DSSATBatch.

from translator-dssat.

MengZhang avatar MengZhang commented on August 11, 2024

If front-end tool always call DssatOutputController.writeFile(), then it can be considered as there is no thread implementation inside the DSSAT translator.

from translator-dssat.

frostbytten avatar frostbytten commented on August 11, 2024

Okay. I'll look more into it. I don't see any scrambled processes unless it's threaded.

from translator-dssat.

frostbytten avatar frostbytten commented on August 11, 2024

The error is on the input side. I found the issue and am addressing it on that side.

from translator-dssat.

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.