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

Merge multiple of cov file #23

Open
sklee0913 opened this issue Oct 12, 2024 · 2 comments
Open

Merge multiple of cov file #23

sklee0913 opened this issue Oct 12, 2024 · 2 comments

Comments

@sklee0913
Copy link

sklee0913 commented Oct 12, 2024

Hi,

Gad to use this one for my project.
I have many thousands of coverage files ( 20k files), with multiple covergroups and thousands coverpoints.
It seems that the merge function got trouble when merging and I had to separate merge-list-file to merge them one by one, when merging them at the same time: huge RAM usage happened and killed the section by memory leak.

pyucis merge $(cat merge.lists) -o merge.xml

I believe that I can support to fix this issue or optimize it, but how can I help you?

@sklee0913
Copy link
Author

i am not python dev. so, how can i start modify & debug this software.
Thanks. I will try to dev and share

@hapv3
Copy link

hapv3 commented Oct 17, 2024

Hi dev,

Same person (sklee) , I propose the method like this. the ideal is mergeing each of read input, not read all and merge later.

modified at def merge(args): function

out_if = output_desc.fmt_if()
out_db : UCIS = out_if.create()
db_if : FormatIfDb = input_desc.fmt_if()
merger = DbMerger()

for input in args.db:
    print("read and merge: ", input)
    out_db_ref : UCIS = out_if.create()
    db_l : List[UCIS] = []
    try:
        db = db_if.read(input)
        db_l.append(db)
        db_l.append(out_db)
    except Exception as e:
        raise Exception("Failed to read input file %s: %s" % (
            input,
            str(e)
        ))

    try:
        merger.merge(out_db_ref, db_l)
    except Exception as e:
        raise Exception("Merge operation failed: %s" % str(e))

    out_db = out_db_ref
    db.close()

out_db.write(args.out)

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

No branches or pull requests

2 participants