Page 1 of 1

Render did not complete

PostPosted: Sat Feb 05, 2022 12:07 pm
by MarvinBarre
Hello, I am using fusion 9

I tried to render a comp with 900 frames and the error message.
Render goes to internal HDD which is almost empty
Sometimes I get a message: Last frame rendered 1 or 0 with this and different comps.
When I try to render any comp my success rate is about 10%.
I copy paste nodes into a new file, restart ...but it is a frustrating process.
I switched from resolve in fusion to stand alone , because fusion 9 was supposed to bug free.

OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clEnqueueNDRangeKernel failed: CL_INVALID_KERNEL_ARGS
OpenCL clCreateImage2D failed: CL_OUT_OF_HOST_MEMORY
OpenCL clCreateImage2D failed: CL_OUT_OF_HOST_MEMORY
Saver1 failed to write to "D:\NEW\OUTRO\RENDER\erase it 16.mov" ("D:\NEW\OUTRO\RENDER\erase it 16.mov") frame 171
Saver1 failed at time 171
OpenCL clCreateImage2D failed: CL_OUT_OF_HOST_MEMORY
Saver1 failed to write to "D:\NEW\OUTRO\RENDER\erase it 16.mov" ("D:\NEW\OUTRO\RENDER\erase it 16.mov") frame 172
Saver1 failed at time 172
ERROR: Render failed at Sat 6:53AM! Last frame rendered: 170.0!

Thank you

Re: Render did not complete

PostPosted: Sat Feb 05, 2022 12:11 pm
by MarvinBarre
I just ran the same render and now the last frame rendered is 185
Also my output format is quick time movies

Re: Render did not complete

PostPosted: Sat Feb 05, 2022 4:57 pm
by Bryan Ray
Fu9 is far from bug free. It's just less buggy than 8 and the early builds of 15. It has plenty of GPU-related issues, and it looks like that's what you're running into here.

Since the GPU acceleration in Fusion 9 doesn't actually make anything faster (in some cases, it's actually slower), I recommend turning it off for all tools.

Here's a comp script that disables GPU and OpenCL processing for all tools in the comp:

Code: Select all
print("Disable GPU Processing")
DEBUG = false

--[[--

Disable GPU v1.0
by Bryan Ray for Muse VFX
2021-06-24

Disables GPU or OpenCL processing for all tools in the comp. Useful for troubleshooting issues with network rendering or instability.
Partners with Enable_GPU_all_tools.lua

Changelog:

   v1.0, 2021-06-24: Added Fusion version detection and handling for the OpenCL controls of
      Fusion 9 and earlier.

Roadmap:
   Detect initial state of GPU controls and store it in CustomData. This will permit the user to
   skip tools that did not have GPU turned when running the partner script.

--]]--

-- ===========================================================================
-- globals
-- ===========================================================================
_fusion = nil
_comp = nil
_fusionVersion = nil

--==============================================================
-- Main()
--
-- Typical set-up for a script developed in an IDE. Sets globals
-- and connects to the active comp. Initializes UI Manger.
--==============================================================

function main()
   -- get fusion instance
   _fusion = getFusion()

   -- ensure a fusion instance was retrieved
   if not _fusion then
      error("Please open the Fusion GUI before running this tool.")
   end
   
   -- get composition
   _comp = _fusion.CurrentComp
   comp = _comp
   SetActiveComp(_comp)

   -- ensure a composition is active
   if not _comp then
      error("Please open a composition before running this tool.")
   end

   dprint("\nActive comp is ".._comp:GetAttrs().COMPS_Name)

   -- Determine Fusion version
   local a, _ = string.gsub(_fusion:GetAppInfo().Version, "%.+%d+", "")
   _fusionVersion = tonumber(a)

   print("Fusion Version ".._fusionVersion)
   local path = ""

   if _fusionVersion <= 9 then

      -- Disable OpenCL
      composition.StartUndo("Disable OpenCL on all nodes")
      for i,tool in ipairs(comp:GetToolList(false)) do
         tool.UseOpenCL = 0
      end
      composition.EndUndo(true)

   elseif _fusionVersion >= 16 then

      -- Disable GPU
      composition.StartUndo("Disable GPU on all nodes")
      for i, tool in ipairs(comp:GetToolList(false)) do tool.UseGPU = 0 end
      composition.EndUndo(true)

   else
      error("This version of Fusion is not yet supported, or version not detected.")
   end


end

--======================== ENVIRONMENT SETUP ============================--

------------------------------------------------------------------------
-- getFusion()
--
-- check if global fusion is set, meaning this script is being
-- executed from within fusion
--
-- Arguments: None
-- Returns: handle to the Fusion instance
------------------------------------------------------------------------
function getFusion()
   if fusion == nil then
      -- remotely get the fusion ui instance
      fusion = bmd.scriptapp("Fusion", "localhost")
   end
   return fusion
end -- end of getFusion()


--========================== DEBUGGING ============================--


---------------------------------------------------------------------
-- dprint(string, suppressNewline)
--
-- Prints debugging information to the console when DEBUG flag is set
--
-- Arguments:
--      string, string, a message for the console
--      suppressNewline, boolean, do not start a new line
---------------------------------------------------------------------
function dprint(string, suppressNewline)
   local newline = "\n"
   if suppressNewline then newline = '' end
   if DEBUG then _comp:Print(string..newline) end
end -- dprint()

---------------------------------------------------------------------
-- ddump(object)
--
-- Performs a dump() if the DEBUG flag is set
--
-- Arguments
--      object, object, an object to be dumped
---------------------------------------------------------------------
function ddump(object)
   if DEBUG then dump(object) end
end -- end ddump()


main()


I'm 90% sure that should run in the free version of Fusion 9. If it doesn't, let me know, and I can mod it slightly.

Hopefully it at least reduces your problems.

One other thing: You're far better off rendering to an image sequence first and then encoding to video in a secondary process, preferably somewhere other than Fusion. Fusion isn't great at handling video, and the further back in versions you go the worse it is. At least when you're rendering to frames, if it ends prematurely, you can pick up from where it stopped instead of having to start from scratch.