run simulation via command line

   2712   4   1
User Avatar
Member
8 posts
Joined: April 2020
Offline
Hi, it's probably a very noob question but i cannot find a proper documentation online.
I'd like to run a simulation on Linux and save the output files and the log in specific folders.

I created a dop and i was able to run the simulation (and save the outputs) using GUI buttons in Houdini.
How can i reproduce all this via command line?

Here's my command line

/opt/hfs18.0.499/bin/hbatch /home/ciara/Documents/Houdini_test/myscene.hipnc 

Thanks for the help

Attachments:
simulation command line.png (404.7 KB)

User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
You can use the same command-line:

hbatch /home/ciara/Documents/Houdini_test/myscene.hipnc

To see all the switches, just do:

hbatch --help

Sean
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
8 posts
Joined: April 2020
Offline
thantks mrCatfish. i tried your solution but i encountered some issues and error messages. What am i doing wrong?

1st attempt
/opt/hfs18.0.499/bin/hbatch /home/ciara/Documents/Houdini_test/crashMan.hipnc
hbatch Version 18.0.499 (Compiled on Jun 16 2020)
WARNING: Entered non-commercial session mode.


2nd attempt
/opt/hfs18.0.499/bin/hbatch /home/ciara/Documents/Houdini_test/fluid.hipnc
/ -> /opt/hfs18.0.499/bin/hbatch /home/ciara/Documents/Houdini_test/fluid.hipnc
/opt/hfs18.0.499/bin/hbatch (4): Command 'f' not specific enough


3rd attempt
/opt/hfs18.0.499/bin/hbatch -f start 1 end 20 /home/ciara/Documents/Houdini_test/fluid.hipnc
hbatch Version 18.0.499 (Compiled on Jun 16 2020)
Unknown file type start
Unknown file type 1
Unknown file type end
Unknown file type 20
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
You have to send commands to hbatch, either by piping a command file or using -c on the command line.

e.g.

$:/hip> hbatch test.hip -c "render /out/geometry1 -f 1 20; quit;"
hbatch Version 18.0.460 (Compiled on May  8 2020)

Rendering geometry1
$:/hip> 

hbatch is just houdini without an interface. Look at the help for hscript for how to script a non-gui session. There's also hython if you prefer to script in python.
Edited by jsmack - Aug. 6, 2020 16:46:04
User Avatar
Member
8 posts
Joined: April 2020
Offline
nice, it worked. Thanks
  • Quick Links