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 how we file datapatterns work #35

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

bwatkinson
Copy link
Collaborator

Previously when the option -datapattern file/wholefile was used, XDD would open the file for every target and keep it open till the run was over. This is really unnecessary as the file only needs to be opened to read the datapattern in to set the datapattern in the target. Once that has happen, the file can immediately be closed. This is a good idea as there are limits to how many files can be opened in Linux (ulimit). XDD should not tie up the number of avialable open file descriptors just to set a datapattern over an entire XDD run.

The code has been updated to open the file, set the target data_pattern buffer, and then immediately close the file. I have added a new functional test case test_xdd_file_datapattern.sh to test out that these this modification did not break the expected functionality of -datapattern file/wholefile.

src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
src/client/parse_func.c Outdated Show resolved Hide resolved
Previously when the option -datapattern file/wholefile was used, XDD
would open the file for every target and keep it open till the run was
over. This is really unnecessary as the file only needs to be opened to
read the datapattern in to set the datapattern in the target. Once that
has happen, the file can immediately be closed. This is a good idea as
there are limits to how many files can be opened in Linux (ulimit). XDD
should not tie up the number of avialable open file descriptors just to
set a datapattern over an entire XDD run.

The code has been updated to open the file, set the target data_pattern
buffer, and then immediately close the file. I have added a new
functional test case test_xdd_file_datapattern.sh to test out that these
this modification did not break the expected functionality of
-datapattern file/wholefile.

There was also just some general cleanup of the code that was done as
part of this PR.

Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
@bwatkinson
Copy link
Collaborator Author

@MigeljanImeri I went ahead and squashed everything into one commit.

@MigeljanImeri MigeljanImeri merged commit 0b1aaab into MigeljanImeri:xdd-2.0 Mar 20, 2024
4 checks passed
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