简体   繁体   English

HTCondor 分散聚集

[英]HTCondor Scatter Gather

I'm developing a project where I need to reduce a video resolution from 1080p to 720p.我正在开发一个项目,我需要将视频分辨率从 1080p 降低到 720p。 That part is pretty straight forward with the command "ffmpeg -I inputVideo.mp4 -r 60 -s hd720 outputVideo.mp4".该部分使用命令“ffmpeg -I inputVideo.mp4 -r 60 -s hd720 outputVideo.mp4”非常简单。

Now, the idea is using HTCondor, so every Resource receives one part of the video ( Scatter ), reduces it quality, and returns it, so in the end all parts can be put together to make the full video 720p ( Gather ).现在,这个想法是使用 HTCondor,所以每个Resource接收视频的一部分( Scatter ),降低它的质量,然后返回它,所以最后所有部分可以放在一起制作完整的视频 720p( Gather )。 The issue is, every node returns its own segment, so how can I make that the return is the total junction video.问题是,每个节点都返回自己的段,所以我怎样才能使返回的是总路口视频。 I thought of using a.dag file, so after the execution, it would run a script that would merge them, but, for what I understand from the documentation that is run on each node and not in a place where all segments are, which is the client, I guess.我想到了使用 a.dag 文件,所以在执行之后,它会运行一个脚本来合并它们,但是,据我所知,在每个节点上运行的文档中,而不是在所有段所在的地方,是客户,我猜。

So I would like to ask, what do you suggest so I can merge the output video files.所以我想问一下,你有什么建议可以合并输出视频文件。

I think you are on the right track with dagman.我认为你在达格曼的正确轨道上。 Start from a diamond dag like in the docs:从文档中的钻石 dag 开始:

https://htcondor.readthedocs.io/en/stable/users-manual/dagman-applications.html#the-dag-input-file-basic-commands https://htcondor.readthedocs.io/en/stable/users-manual/dagman-applications.html#the-dag-input-file-basic-commands

But maybe you want more than 2 nodes to do the processing -- the scattering.但也许您需要 2 个以上的节点来进行处理——散射。 As each of these HTCondor jobs finishes, the output will be sent back to the submitting machine.当这些 HTCondor 作业中的每一个完成时,输出将被发送回提交机器。 You can either send all of these out to a HTCondor worker node for the final assembly, or, if the assembly is not a cpu-heavy activity, just run it on the submit machine where all the intermediate outputs are.您可以将所有这些发送到 HTCondor 工作节点以进行最终组装,或者,如果组装不是 cpu 密集型活动,则只需在所有中间输出所在的提交机器上运行它。 In HTCondor,a "local universe" job looks just like a normal job, but runs on the submit machine.在 HTCondor 中,“local universe”作业看起来就像一个普通的作业,但在提交机器上运行。 Perhaps the final node that depends on all the scatter nodes could be a local universe job.也许依赖于所有分散节点的最终节点可能是本地 Universe 作业。

At a training session for dagman, there was a similar image processing example with the mandlebrot set.在 dagman 的培训课程中,有一个与 mandlebrot 集类似的图像处理示例。 This link may give you some good ideas:此链接可能会给您一些好主意:

https://opensciencegrid.org/user-school-2019/#materials/day4/part4-ex1-simple-dag/ https://opensciencegrid.org/user-school-2019/#materials/day4/part4-ex1-simple-dag/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM