Skip to content
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

Updating Python scripts #108

Merged
merged 2 commits into from
Jul 17, 2017
Merged

Conversation

rubenzorrilla
Copy link
Member

Python main scripts have been updated to make them as similar as possible between applications. A unique python script is used for both serial and parallel execution.

Python main scripts have been updated to make them as similar as possible between applications. A unique python script is used for both serial and parallel execution.
Copy link
Member

@loumalouomega loumalouomega left a comment

Choose a reason for hiding this comment

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

I prefer not to use * in the import


# Import define_output
from KratosMultiphysics import *
from KratosMultiphysics.ExternalSolversApplication import *
Copy link
Member

Choose a reason for hiding this comment

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

Why import whit *?

Copy link
Member Author

@rubenzorrilla rubenzorrilla Jul 17, 2017

Choose a reason for hiding this comment

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

A time ago we decided to do the import with * in the main scripts. However, I do not exactly remember why...

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 argument was "simplicity". However in the solvers it should be used without the *

Copy link
Member

Choose a reason for hiding this comment

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

OK

RiccardoRossi
RiccardoRossi previously approved these changes Jul 17, 2017
Copy link
Member

@RiccardoRossi RiccardoRossi left a comment

Choose a reason for hiding this comment

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

looks ok to me (apart for the prints which i am not sure if we want to keep)

if (parallel_type == "OpenMP") or (mpi.rank == 0):
print("")
print(main_model_part)
for properties in main_model_part.Properties:
Copy link
Member

Choose a reason for hiding this comment

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

why do we want to print this? is it for debug purposes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably we can remove this one, or maybe print it when echo_level is larger than one (as is done with other print statements).

loumalouomega
loumalouomega previously approved these changes Jul 17, 2017
Copy link
Member

@loumalouomega loumalouomega left a comment

Choose a reason for hiding this comment

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

OK

@jginternational
Copy link
Member

Will this work with the Release branch?

@rubenzorrilla
Copy link
Member Author

Indeed, this must be in the release branch.

@jginternational jginternational merged commit 6d4979b into master Jul 17, 2017
@jginternational jginternational deleted the feature-updating-python-scripts branch July 17, 2017 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants