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

Omp #21

Closed
wants to merge 19 commits into from
Closed

Omp #21

wants to merge 19 commits into from

Conversation

jguterl
Copy link
Contributor

@jguterl jguterl commented Apr 14, 2020

Implementation of OpenMP directives in the Fortran module generator (in wrappergenerator.c only, not implemented for derived types).
New Function: Read an input file which contains the list of variables which are:

  1. declared threadprivate in the module where they are declared
  2. added to initialization/clear routines where they are associated/cleared (if pointer) and initialized in each thread
  3. add to copy routines created for each package where variables from the master thread are copied into variables in each thread (equivalent to an OpenMP directive copyprivate).
    New Forthon flags:
    --omppackage XXX,YYY,ZZZ : looks to implement omp directives for packages XXX,YYY,ZZZ
    --ompvarlistfile path/to/list.txt : where list.txt is a single column/multiple rows ascii file containing a list of variables which will be treated as threadprivate
    --ompverbose : Verbose mode
    --ompforceall : all variables declared in modules built with Forthon will be declared threadprivate(for debug purpose only, use with caution)

Tested only for UEDGE

@dpgrote
Copy link
Owner

dpgrote commented Apr 15, 2020

Thanks for the changes. There's a lot here and it'll take a bit of time to understand what it is doing. Something that would be very helpful is to add general comments to the code describing what the additions are doing. For example, what is the function writef90ompcopyhelper doing and why are the OmpCopy modules needed?

I do have some general questions. Will the list of variables change? If it is a static list (for each package), could this be handled by using variables attribute instead of having a separate file listing the variables?

Is the ompackage needed, since each call to Forthon is creating one package?

Unfortunately, however, Forthon still needs to support python2. I know you put in some work to convert the code to python3, but I can't accept those changes. Please only make changes in parts of the code that are relevant to the main changes. With many small changes elsewhere, it makes it difficult to verify the changes and could lead to unexpected subtle bugs. I would much prefer multiple small PRs rather than one big one.

@jguterl
Copy link
Contributor Author

jguterl commented Apr 15, 2020 via email

@jguterl
Copy link
Contributor Author

jguterl commented Oct 5, 2020 via email

@dpgrote dpgrote mentioned this pull request Oct 13, 2020
@jguterl jguterl closed this Oct 19, 2020
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.

2 participants