Pre task command

General discussions and questions.
Post Reply
User avatar
belegdae
Posts: 21
Joined: Tue May 28, 2019 2:10 pm

Pre task command

Post by belegdae »

Hello!

I'm writing a custom submission script for Meshroom, but due to a bug in incrimnetalSFM, it can't execute from windows UNC paths, so needs a windows drive letter mapping.
Is it possible to assign pre-task commands for each render to run before executing a task? I know that pre-commands can be used on blocks, but these run on the server.

Thank you!

Rich
Rich
CGRU 2.3.1, Server - Win 2012 R2, 406x Render Nodes - Windows 10.
User avatar
belegdae
Posts: 21
Joined: Tue May 28, 2019 2:10 pm

Re: Pre task command

Post by belegdae »

As a side note:

I've looked into command concatonation, using & and && to join the commands together, but this seems unreliable once submitted.

If i take the following string:

Code: Select all

call \\server.com\live\_PLUGINS\_TOOLS\_HELPERSCRIPTS\pushDrive.py r: \\server.com\renderfarm\rjh1\MeshroomTrial_003 & if NOT exist r:\01_CameraInit mkdir r:\01_CameraInit & C:\_PLUGINS\_TOOLS\MESHROOM\2019.2.0\AliceVision\Bin\aliceVision_cameraInit.exe --imageFolder "r:\00_SourceImages" --sensorDatabase "C:\_PLUGINS\_TOOLS\MESHROOM\2019.2.0\aliceVision\share\aliceVision\cameraSensors.db" --defaultFieldOfView 45.0 --groupCameraFallback folder --verboseLevel info --allowSingleView 1 --output "r:\01_CameraInit\cameraInit.sfm" & call \\server.com\live\_PLUGINS\_TOOLS\_HELPERSCRIPTS\popDrive.py r:
This is the output from the command varibale fed into

Code: Select all

AF_block.tasks.append()
If ran directly on a machine in the shell, it runs as expected, but through afanasy, it seems the strings are mangled (from double \\ I believe)
Rich
CGRU 2.3.1, Server - Win 2012 R2, 406x Render Nodes - Windows 10.
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Pre task command

Post by timurhai »

Hi.
You want afrender to run something before each task start?
If so, you can use command wrapper - make afrender to run some custom script, that run your pre-command, then, task main command.

But if you want to ensure that some drive is mapped, i think that you can make some script to afrender, that will map drive(s), than start afrender.
- we (me) did so some time, when we were using MS Windows for some rendering.

ps
Better to use Linux for rendering, even if you use (and need) MS Windows workstations.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
belegdae
Posts: 21
Joined: Tue May 28, 2019 2:10 pm

Re: Pre task command

Post by belegdae »

Brilliant idea, I have it working now, thank you!

Sadly I don't have control over the operating systems we use for workstations/rendering, it's a large university with plenty of bureaucracy!

I appreciate the help as always!

Rich
Rich
CGRU 2.3.1, Server - Win 2012 R2, 406x Render Nodes - Windows 10.
User avatar
belegdae
Posts: 21
Joined: Tue May 28, 2019 2:10 pm

Re: Pre task command

Post by belegdae »

Image

It's working! Distributed Meshroom!

Cheers Tim!
Rich
CGRU 2.3.1, Server - Win 2012 R2, 406x Render Nodes - Windows 10.
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Pre task command

Post by timurhai »

Great!
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply