Function: finalize
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Performs deinitialization to destroy allocations.
A 2,000 ms timeout interval is added by default (the maximum timeout is 2,000 ms) for the transfer of device logs to ensure the integrity of error- and event-level logs. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (by using the export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0 command) to cancel the timeout.
For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see Log Reference.
Prototype
- C Prototype
1aclError aclFinalize()
- Python Function
1ret = acl.finalize()
Parameters
None
Return Value
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code. 0 on success; else, failure. |
Restrictions
Before an application process exits, this API must be explicitly called to deinitialize the application process. Otherwise, an exception may occur. For example, an error is reported when the application process exits.
You are advised not to call acl.finalize in the destructor call. Otherwise, the process may exit abnormally due to the unknown singleton destruction sequence.