OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
96 stars 25 forks source link

possible memory leak in buildK (DiagModule.f90) #71

Closed negf closed 3 years ago

negf commented 3 years ago

In buildK (DiagModule.f90) recv_info is defined as derived data type Krecv_data, all but the recv_info(i)%ndimj(maxloc) component are individually deallocated before deallocating the parent recv_info, this missing deallocation caused a memory leak for me. I am not sure if this is the normal Fortran behavior or a problem with the compiler, eitherway as the other components of recv_info are already individually deallocated maybe we should also deallocate recv_info(i)%ndimj before deallocating the parent, just to be safe.

I am on master (commit f5075b9357fae5ac95fbd29560bd4bc360f3d212).

davidbowler commented 3 years ago

Thank you for finding this - recv_info%ndimj should certainly be deallocated. Is it a serious memory leak (in which case we will make this a hot fix on master) or relatively small?

negf commented 3 years ago

I think not so serious, it may add up during longer MD runs, though.

マリウス ビュクル, Ph.D.

b˜I技gt合研究所 ™C能材料コンピュテショナルデザイン研究センタ  “305-8568 茨城hつくば市梅ˆ@ 1-1-1 つくば中央第2

TEL: 029-862-6947 FAX: 029-861-3171 E-mail: marius.buerkle@aist.go.jp

Marius Buerkle, Ph.D.

Research Center for Computational Design of Advanced Functional Materials, AIST

Central2, 1-1-1, Umezono, Tsukuba, 305-8568, Japan

TEL: 029-862-6947 FAX: 029-861-3171 E-mail: marius.buerkle@aist.go.jp



From: David Bowler notifications@github.com Sent: Monday, August 17, 2020 19:47 To: OrderN/CONQUEST-release CONQUEST-release@noreply.github.com Cc: BuerkleMarius marius.buerkle@aist.go.jp; Author author@noreply.github.com Subject: Re: [OrderN/CONQUEST-release] possible memory leak in buildK (DiagModule.f90) (#71)

Thank you for finding this - recv_info%ndimj should certainly be deallocated. Is it a serious memory leak (in which case we will make this a hot fix on master) or relatively small?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOrderN%2FCONQUEST-release%2Fissues%2F71%23issuecomment-674808280&data=02%7C01%7Cmarius.buerkle%40aist.go.jp%7C36cce4b73b2e49ac760608d8429aef54%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637332580487424365&sdata=1R9Xc5aBSp%2BE%2B5ZBSZpXNxOkxAC7GOxdw2F3rLdzl00%3D&reserved=0, or unsubscribehttps://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADINPWUXXNSNUGMIJLCVDBLSBEDD5ANCNFSM4P3ZUH2A&data=02%7C01%7Cmarius.buerkle%40aist.go.jp%7C36cce4b73b2e49ac760608d8429aef54%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637332580487434362&sdata=HXe56hIpNQnzPghDbXAkVMlNsjgbdz1LzoKT00ZCsH8%3D&reserved=0.

davidbowler commented 3 years ago

This should have been fixed by the branch bugfix-diag-memory-leak. Could you please test it @negf ?

negf commented 3 years ago

Thanks for the quick fix, I think the memory leak is fixed with this patch.


マリウス ビュクル, Ph.D.

b˜I技gt合研究所 ™C能材料コンピュテショナルデザイン研究センタ  “305-8568 茨城hつくば市梅ˆ@ 1-1-1 つくば中央第2

TEL: 029-862-6947 FAX: 029-861-3171 E-mail: marius.buerkle@aist.go.jp

Marius Buerkle, Ph.D.

Research Center for Computational Design of Advanced Functional Materials, AIST

Central2, 1-1-1, Umezono, Tsukuba, 305-8568, Japan

TEL: 029-862-6947 FAX: 029-861-3171 E-mail: marius.buerkle@aist.go.jp



From: David Bowler notifications@github.com Sent: Tuesday, August 25, 2020 0:20 To: OrderN/CONQUEST-release CONQUEST-release@noreply.github.com Cc: BuerkleMarius marius.buerkle@aist.go.jp; Mention mention@noreply.github.com Subject: Re: [OrderN/CONQUEST-release] possible memory leak in buildK (DiagModule.f90) (#71)

This should have been fixed by the branch bugfix-diag-memory-leak. Could you please test it @negfhttps://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnegf&data=02%7C01%7Cmarius.buerkle%40aist.go.jp%7Cda170fabf6924f1e617d08d848413220%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637338792133285871&sdata=kl5AWu62v0RTw4oBlNBHc2OMtyNAHA2kYDL6%2Ffhf2eI%3D&reserved=0 ?

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOrderN%2FCONQUEST-release%2Fissues%2F71%23issuecomment-679191835&data=02%7C01%7Cmarius.buerkle%40aist.go.jp%7Cda170fabf6924f1e617d08d848413220%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637338792133285871&sdata=I1ccATBvQVxP3RYZ3aB58qb7AH09DK5BUkkkkDRgXXA%3D&reserved=0, or unsubscribehttps://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADINPWVNQINZXDF5HQRPDEDSCKAKVANCNFSM4P3ZUH2A&data=02%7C01%7Cmarius.buerkle%40aist.go.jp%7Cda170fabf6924f1e617d08d848413220%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637338792133295871&sdata=uh1%2BONAuQF9NpTfIGHrQgF%2Ffhiqp248k%2FT0duuFdu8c%3D&reserved=0.

davidbowler commented 3 years ago

Fixed with #76