8000 Bug fixing · Pull Request #519 · su2code/SU2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug fixing #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 17, 2018
Merged

Bug fixing #519

merged 20 commits into from
Apr 17, 2018

Conversation

ghost
Copy link
@ghost ghost commented Mar 23, 2018

This pull request solves several issues:

  • Single point design is not working when there are more than one surface in MARKER_MONITORING.
  • "and" and "or" are not recognized by some windows compilers (at least with the default parameters). To be consistent with the rest of the code we are using && and ||
  • Fixing the memory deallocation at the end of the the SU2_ softwares.
  • Fixing the multiple definition of the Avg_TotalTemp in the output file.

Once this pull request is approved, the changes will be added to the master repository directly.

@@ -364,7 +364,7 @@ def obj_df(dvs,config,state=None):
# For multiple objectives are evaluated one-by-one rather than combined
# MARKER_MONITORING should be updated to only include the marker for i_obj
# For single objectives, multiple markers can be used
config['MARKER_MONITORING'] = marker_monitored[i_obj]
if (n_obj>1): config['MARKER_MONITORING'] = marker_monitored[i_obj]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the array of monitored markers is extended to accommodate this situation in config.py (~line 514), and there is a single objective-with-multiple-surfaces regression test; do you have a case you can send me where this wasn't working? Or if you see an issue with that test that I previously missed I wouldn't mind looking into it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fpalacios yes, I commented a bit too quickly; I do see the behavior that you mention. I think the line previously mentioned helps with getting the value of the objective but not the gradient.
While I was testing this on my end I also noticed that there is an issue if you list the same objective multiple times (for example, if you wanted to weight the drag contribution from one surface more than another), where since it has the same key the previous dict entry is overwritten. Do you mind if I add an error catching that to your PR?

I am taking a look back through it but so far I think your solution will be good - and better to fix the performance in master now and worry about elegant improvements in the develop branch.

@ghost
Copy link
Author
ghost commented Mar 26, 2018 via email

@ghost
Copy link
Author
ghost commented Mar 26, 2018 via email

@economon
Copy link
Member

Thanks for sorting this out @hlkline and @fpalacios. Once this and the other PR that I have open for "memory fixes" are ready and merged, why don't we put out a small maintenance release, v6.0.1?

@ghost
Copy link
Author
ghost commented Mar 27, 2018 via email

@economon
Copy link
Member

Not sure. I am having the same issue on the memory fixes PR. It seems to hang around the Jones cases, but I have run valgrind and don't see any issues. Perhaps it is a problem with Python v3. I am working on this...

@economon
Copy link
Member
economon commented Apr 3, 2018

Ok, the tests are passing for this one now after the fix from the other PR. Anything else you would like to add? Otherwise, let's review and merge this next.

Copy link
Member
@economon economon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I may add a small commit or two for other clean up, but we will merge this very soon. Thanks!

@ghost
Copy link
Author
ghost commented Apr 9, 2018

Thanks Tom, what was the problem with the regression test? I'm going to add some other small fixes.

@economon
Copy link
Member

@fpalacios : there were two main issues with the regressions. Both are time out problems if Travis waits for over 10 minutes without any console output. The first was that we need to flush the output for Python 3 for each regression test, otherwise there is too long between cases and sometimes it fails. The second is that sometimes it takes too long to download the test cases, so I have added the keywords 'travis_wait 90' in the call to the entire python script in .travis.yml in order to extend the 10 minute restriction to 90 min. We still need to reduce the time for the tests overall, but it seems to be stable for the time being.

@ghost
Copy link
Author
ghost commented Apr 14, 2018

Thanks @economon, it was not an easy fix.

There are still some problems with the memory deallocation. As soon as we fix those issues we should accept this pull request and create a new minor release because some of the changes in this branch are really important.

@economon
Copy link
Member

Couldn’t agree more. We will release v6.0.1 right after this merge.

Is it complete now? Or is there still a memory issue? I can help - please let me know.

@ghost
8000 Copy link
Author
ghost commented Apr 15, 2018

Thanks, now it is working but I don't like the solution: I have commented out the deallocation of CSurfaceMovement and CFreeFormDefBox in SU2_GEO.cpp. I have worked on this problem for a while without a satisfactory solution... to check the issue, just uncomment

// if (surface_movement != NULL) delete [] surface_movement;
// if (rank == MASTER_NODE) cout << "Deleted CSurfaceMovement class." << endl;

// if (FFDBox != NULL) {
// for (iFFDBox = 0; iFFDBox < MAX_NUMBER_FFD; iFFDBox++) {
// if (FFDBox[iFFDBox] != NULL) {
// delete FFDBox[iFFDBox];
// }
// }
// delete [] FFDBox;
// }
// if (rank == MASTER_NODE) cout << "Deleted CFreeFormDefBox class." << endl;

in SU2_GEO and execute SU2_GEO default.cfg

Please let me know if you want to work on this issue for a while or we should postpone the fixing of this memory problem.

NACA.zip

@economon economon merged commit 612393d into develop Apr 17, 2018
@economon economon deleted the feature_2master branch April 17, 2018 23:48
CatarinaGarbacz pushed a commit that referenced this pull request Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0