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

OpenFAST Registry algorithm change: simplify USE statements #734

Merged
merged 7 commits into from
Sep 28, 2021

Conversation

bjonkman
Copy link
Contributor

Feature or improvement description
This change modifies the Registry code so that the Fortran modules it creates do not contain USE statements for modules that are inherited through other USE statements.

Impacted areas of the software
All Registry-generated *_Types.f90 files

Additional supporting information
This change cleans up the source code in modules; it is hoped that this will also require less memory to build (though this is not verified, yet).

Test results, if applicable
This should have no effect on compiled code, and thus no effect on test results.

This change removes USE statements for modules that are inherited through modules that are explicitly included in the Registry input files. This should reduce the memory required to build the code in certain instances, but should have no effect on the compiled code.
@rafmudaf
Copy link
Collaborator

I did a quick memory-usage comparison using GNU Time. For OpenFAST at dev, the reported memory usage is 2.82 GB. After merging dev into this branch, the same memory-usage profile shows 2.78 GB. These were one-off tests on my laptop (MacBook Pro, macOS 10.15) using GNU 11.2 and compiled with CMake/Make in Release mode with no parallelization in the build.

Here's the commands and results:

  OpenFAST/dev
(base) >>mbp@~/Desktop/of/openfast/build (dev)$ /usr/local/opt/gnu-time/libexec/gnubin/time -v make openfast

< ... removed ... >

[100%] Built target openfast
	Command being timed: "make openfast"
	User time (seconds): 859.34
	System time (seconds): 20.03
	Percent of CPU this job got: 98%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 14:49.00
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 2822976
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 24154
	Minor (reclaiming a frame) page faults: 8909576
	Voluntary context switches: 8847
	Involuntary context switches: 244589
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 998
	Page size (bytes): 4096
	Exit status: 0
  This pull request
(base) >>mbp@~/Desktop/of/openfast/build (f/Registry_Cleanup)$ /usr/local/opt/gnu-time/libexec/gnubin/time -v make openfast

< ... removed ... >

[100%] Built target openfast
	Command being timed: "make openfast"
	User time (seconds): 835.71
	System time (seconds): 17.97
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 14:21.47
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 2784876
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 11215
	Minor (reclaiming a frame) page faults: 8921652
	Voluntary context switches: 9103
	Involuntary context switches: 112032
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 998
	Page size (bytes): 4096
	Exit status: 0

@rafmudaf rafmudaf merged commit 4c2f921 into OpenFAST:dev Sep 28, 2021
Copy link
Collaborator

@rafmudaf rafmudaf left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@bjonkman bjonkman deleted the f/Registry_Cleanup branch October 7, 2021 19:47
@rafmudaf rafmudaf mentioned this pull request Mar 2, 2022
11 tasks
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.

3 participants