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

There are memory leaks in a series of case tests #3553

Closed
8 tasks
hongriTianqi opened this issue Jan 25, 2024 · 4 comments · Fixed by #4012 or #4020
Closed
8 tasks

There are memory leaks in a series of case tests #3553

hongriTianqi opened this issue Jan 25, 2024 · 4 comments · Fixed by #4012 or #4020
Assignees

Comments

@hongriTianqi
Copy link
Collaborator

Describe the Code Quality Issue

Test case 103_PW_15_CS_CF
Test case 103_PW_15_CS_CF_bspline
Test case 103_PW_CF_CS_S1_smallg
Test case 103_PW_15_CF_CS_S1_smallg
Test case 103_PW_CF_CS_S2_smallg
Test case 103_PW_15_CF_CS_S2_smallg
Test case 103_PW_OU_CS_CF
Test case 107_PW_W90
Test case 108_PW_RE
Test case 109_PW_CR
Test case 109_PW_CR_fix_a
Test case 109_PW_CR_fix_ab
Test case 109_PW_CR_fix_abc
Test case 109_PW_CR_fix_ac
Test case 109_PW_CR_fix_b
Test case 109_PW_CR_fix_bc
Test case 109_PW_CR_fix_c
Test case 109_PW_CR_moveatoms
Test case 111_PW_elec_add
Test case 111_PW_elec_minus
Test case 111_PW_S2_elec_add
Test case 111_PW_S2_elec_minus
Test case 112_PW_dipole
Test case 112_PW_efield
Test case 113_PW_gatefield
Test case 120_PW_KP_MD_MSST
Test case 120_PW_KP_MD_NHC
Test case 150_PW_15_CR_VDW3
Test case 170_PW_MD_1O
Test case 170_PW_MD_2O
Test case 201_NO_15_f_pseudopots
Test case 201_NO_15_pseudopots
Test case 201_NO_OU_pseudopots
Test case 201_NO_upf201_pseudopots
Test case 201_NO_KP_15_CF_CS_Si
Test case 201_NO_KP_DJ_CF_CS_GaAs
Test case 201_NO_KP_DJ_Si
Test case 203_NO_bspline
Test case 203_NO_CF_CS_S1_smallg
Test case 203_NO_CF_CS_S2_smallg
Test case 204_NO_KP_AFM
Test case 204_NO_KP_FM
Test case 204_NO_KP_NC
Test case 204_NO_NC_magnetic
Test case 205_NO_FD_smearing
Test case 205_NO_FX_smearing
Test case 602_NO_deepks_d_H2O_scf_lda2pbe
Test case 603_NO_deepks_H2O_multik
Test case 603_NO_deepks_CH4
Test case 603_NO_deepks_ethanol
Test case 603_NO_deepks_watertrimer
Test case 603_NO_deepks_H2O_bandgap
Test case 603_NO_deepks_SiO2_bandgap_multik

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Identify the specific code file or section with the code quality issue.
  • Investigate the issue and determine the root cause.
  • Research best practices and potential solutions for the identified issue.
  • Refactor the code to improve code quality, following the suggested solution.
  • Ensure the refactored code adheres to the project's coding standards.
  • Test the refactored code to ensure it functions as expected.
  • Update any relevant documentation, if necessary.
  • Submit a pull request with the refactored code and a description of the changes made.
@hongriTianqi
Copy link
Collaborator Author

The above results are derived from: https://deepmodeling.github.io/abacus-develop/

@hongriTianqi
Copy link
Collaborator Author

This is related to #3431

@hongriTianqi
Copy link
Collaborator Author

Firstly get a file named abacus-develop.html using:

wget -O abacus-develop.html https://deepmodeling.github.io/abacus-develop/

Then get results using the following script:

from bs4 import BeautifulSoup

# Read HTML file
with open("abacus-develop.html", "r") as file:
    content = file.read()

soup = BeautifulSoup(content, 'html.parser')

# Find all h2 tags containing test case names
test_case_elements = soup.find_all('h2')

# Initialize a list to hold names of tests with specific memory leaks
relevant_test_names = []

for test in test_case_elements:
    # Find the next sibling that is a div with the required class
    div_sibling = test.find_next_sibling("div", class_="language-bash highlighter-rouge")
    if div_sibling:
        # Find all span elements with class 'c' within this div
        leak_spans = div_sibling.find_all('span', class_='c')
        for span in leak_spans:
            if 'abacus-develop' in span.text:
                relevant_test_names.append(test.text.strip())
                break  # Found the relevant leak, no need to check further

for i in range(len(relevant_test_names)):
    print(relevant_test_names[i])

@mohanchen mohanchen self-assigned this Jan 28, 2024
@mohanchen
Copy link
Collaborator

We will have someone to manage this memory leak and rise issues if needed.

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 a pull request may close this issue.

3 participants