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

dfilemaker: Specify desired tree with options -d, -n, -s, -f #604

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

ofaaland
Copy link
Collaborator

Author: JoAnne Levatin levatin1@llnl.gov

dfilemaker: Specify desired tree with options -d, -n, -s, -f

Support complex tree with control over data, depth of tree,
number of files,  and more.

* Use getopt_long to support both short and long options
* Added option "-d" for directory tree depth
* Added option "-f" for fill type, specifying data for files should
  contain all random values, all 0's, all 0xAAAAAAAA, or 0xFFFFFFFF.
* Added option "-n" for number of files.
* Added option "-r" for ratio of files to directories (not implemented)
* Added option "-s" for file size
* Added option "-w" for directory tree width (not implemented)
* Modified "-s" option to use mfu abtoull to parse terms with KB, MB, GB.
* specify ranges for "-d", "-n", "-s", and "-w"
  (ie create files 1K-1M in size)

Author: Olaf Faaland faaland1@llnl.gov

Address review comments for PR #269 made by Adam

dfilemaker: address review comments for PR #269

* Remove whitespace at end of line
* Replace printf/fflush with MFU_LOG for consistency with other tools
* Switch file sizes ot uint64_t
  per Adam Moody this is what other tools use for file size
* brace style change
  change braces and indenting for if/while/for blocks to match rest of code
* remove JoAnne dfilemaker makefile
  JoAnne added a makefile for testing, but CMake will generate one for us

Replaces PR #269

@ofaaland ofaaland changed the title B faaland filemaker pr269 1 dfilemaker: Specify desired tree with options -d, -n, -s, -f Nov 20, 2024
@ofaaland ofaaland requested a review from carbonneau1 November 20, 2024 23:45
@ofaaland ofaaland self-assigned this Nov 20, 2024
@ofaaland ofaaland force-pushed the b-faaland-filemaker-pr269-1 branch from 8df7801 to 51376e1 Compare November 21, 2024 17:37
@ofaaland
Copy link
Collaborator Author

Rebased on main, which advanced when I merged #605 unrelated to dfilemaker

Copy link
Collaborator

@carbonneau1 carbonneau1 left a comment

Choose a reason for hiding this comment

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

I guess I came too late.

levatin1 and others added 2 commits November 21, 2024 15:45
Support complex tree with control over data, depth of tree,
number of files,  and more.

* Use getopt_long to support both short and long options
* Added option "-d" for directory tree depth
* Added option "-f" for fill type, specifying data for files should
  contain all random values, all 0's, all 0xAAAAAAAA, or 0xFFFFFFFF.
* Added option "-n" for number of files.
* Added option "-r" for ratio of files to directories (not implemented)
* Added option "-s" for file size
* Added option "-w" for directory tree width (not implemented)
* Modified "-s" option to use mfu abtoull to parse terms with KB, MB, GB.
* specify ranges for "-d", "-n", "-s", and "-w"
  (ie create files 1K-1M in size)

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
* Remove whitespace at end of line
* Replace printf/fflush with MFU_LOG for consistency with other tools
* Switch file sizes ot uint64_t
  per Adam Moody this is what other tools use for file size
* brace style change
  change braces and indenting for if/while/for blocks to match rest of code
* remove JoAnne dfilemaker makefile
  JoAnne added a makefile for testing, but CMake will generate one for us

Also, address minor issues noted
* remove unused variable ifac
* clarify filltype in code, using an enum for the types supported
* respect --help argument and exit
* clarify usage of buf

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
@ofaaland ofaaland force-pushed the b-faaland-filemaker-pr269-1 branch from 51376e1 to 7d9049e Compare November 21, 2024 23:46
@ofaaland ofaaland merged commit fc70c2c into hpc:main Nov 21, 2024
@ofaaland ofaaland deleted the b-faaland-filemaker-pr269-1 branch November 21, 2024 23:48
Copy link
Collaborator

@carbonneau1 carbonneau1 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.

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