标题: How to fix "Fortran runtime error attempt to deallocate unallocated" [打印本页] 作者Author: zako 时间: 2020-1-3 05:33 标题: How to fix "Fortran runtime error attempt to deallocate unallocated" Hello everybody,I need your help about an error message when i run script. I don't know how to fix it.
"Fortran runtime error attempt to deallocate unallocated". 作者Author: sobereva 时间: 2020-1-3 10:15
That means your code has a bug. The code is employing deallocate( ) routine to deallocate an allocatable array, however it has not been allocated before.
It is best to add a conditional judgment statement before this line as: if (allocated(foo)) ...作者Author: zako 时间: 2020-1-3 21:57
please to specify what i should add. I attached the screenshot of the message errorand the file concerned by this error. (, 下载次数 Times of downloads: 36)
上传 Uploaded
点击下载Click to download
[attach] 23241 [/ attach] 作者Author: sobereva 时间: 2020-1-3 22:51
Replace line 41 with below content