irena-flextool / flextool

IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems.
https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool
Other
23 stars 5 forks source link

DAG 1/1 failed. Error while executing the `Flextool3` module. #151

Closed hbshrestha closed 9 months ago

hbshrestha commented 9 months ago

While following the Flextool tutorial and trying to run the scenario after 1st step, I got the following error message while executing the Flextool3. image

I have used the input_data_template.sqlite file for Input Data. For results, I created a copy of Results_template.sqlite file and linked to Results.sqlite file as suggested in the tutorial. image

hbshrestha commented 9 months ago

I have even updated the Spinetoolbox and Flextool version in my system. I wonder if the problem is due to the mixing of inputs from init and splat boxes together. The Export_to_csv module run is complete. But the csv files are empty.

ArttuTupala commented 9 months ago

Hi, What is the console message for the failed flextool3? Click it in the design view to show it. The event log is good for input and output errors, but when the flextool has and error, the console output is more informative.

Also, are you sure that you run Export_to_CSV, Flextool3 and Import_results at the same time? (Select them all and run selection). The check mark should be green not yellow if it has actually completed it. Yellow means that it has been excluded and it will try to use the last completed export. If you haven't done anything with yet with Flextool, it might just be empty files.

The mixing of inputs from different sources can cause mistakes, but if you are doing the tutorial, it should be done to an empty database and not getting inputs from init database or other sources.

image

hbshrestha commented 9 months ago

Hi @ArttuTupala Thank you for the response! I think I had forgotten to establish the timeblockSet_timeline relationship last time, which was the cause of the error.

I went through the tutorial again. This time, I was able to run it without any issue: image

hbshrestha commented 9 months ago

However, I have also got the same error while running the SPLAT-Flextool model. image

I will liaise with @e-zaline to figure out the correct configuration to set up the model.

ArttuTupala commented 9 months ago

The error in this picture looks like you have an issue on how the solve: period_timeblockSet is imported to the database. It is somehow not in the correct format.

hbshrestha commented 9 months ago

I found that when I am running all scenarios at once, I get the above-mentioned error: image

However, when I filter the scenarios (using the filter between Input Data and Export to CSV blocks) and run one scenario at a time (e.g., Base scenario), I can complete the Flextool run successfully: image

e-zaline commented 9 months ago

@hbshrestha and @ArttuTupala I have the same issue. One scenario works, two scenario do not. Arttu, you can easily reproduce the bug with the Init database. For instance, base and coal scenarios work when run individually, but if you select both base and coal, you get Failure [exit code:-1].

ArttuTupala commented 9 months ago

Hi, I see the issue now. On the last update the setting of directory where the flextool is run was accidentally changed to source directory. It should be work directory. You should change it back. We will solve the problem in the master branch soon. image

Does this fix the issue?

hbshrestha commented 9 months ago

Thanks @ArttuTupala! I was able to run FlexTool with all the scenarios after executing it in "Work directory" rather than "Source directory".

e-zaline commented 9 months ago

Me too. However it used to work too in the Source directory, no? Or it never did?

jkiviluo commented 9 months ago

If you try to run multiple scenarios in the source directory (which is just one directory), there will be all kinds of problems when the different runs interact (write to same files). So, it can fail in many different ways.

This has now been fixed in the repository too.

hbshrestha commented 5 months ago

Hi @ArttuTupala I was doing a test in my system for a model run, and I have got the DAG 1/1 failed error again even after running only 1 scenario in either source directory or work directory.

In the console, it appears that the GLPSOL has written the mps file. It states that "the problem has no columns. Check that the problem has nodes." I checked and find that there are still node objects in the model. Would you know what could have been the potential cause of this error? image

ArttuTupala commented 5 months ago

Hi, The error that there are no columns means that the problem written is empty and there is nothing to solve. This can be caused if the scenario you are running has no nodes that do anything, meaning that they have balance or are connected to a commodity node, (or that there is no timeline connected to the solve, but this should give another error message). The most common cause for this is that the scenario you are running does not include the alternative where the nodes are.

Sidenote: The DAG 1/1 failed is a toolbox message that states that whatever you tried to run failed. It appears at all and any types of crash.

hbshrestha commented 5 months ago

Thanks @ArttuTupala! It appears that the json file I had linked in the importer was not a proper one. I am currently trying it again by creating a new importer block all together and linking the correct json file.

hbshrestha commented 1 week ago

I got the same error again. This time it gave me the warning that I had to migrate the database. I migrated it as mentioned in #202 after which the FlexTool module could run. image