|
[Sponsors] |
August 1, 2008, 18:07 |
Queueing the simulations
|
#1 |
Guest
Posts: n/a
|
I am running my simulations on Intel dual core processor (windows based). I have parallel licensing using.
Is there a way I can queue up a few runs, so that the machine can keep working even when i am away? In other words, how do i create a batch file to run in ANSYS CFX to queue up the simulations. I read other post where it was mentioned but i guess it was for cfx5 and doesnt work in ANSYS CFX. Thanks in advance |
|
August 1, 2008, 19:45 |
Re: Queueing the simulations
|
#2 |
Guest
Posts: n/a
|
there is a way u can queue up a few runs, then the machine can keep working even when i am away! I just decrease the priority of run, task bar of windows, using low!
|
|
August 2, 2008, 05:16 |
Re: Queueing the simulations
|
#3 |
Guest
Posts: n/a
|
Write the following perl program to have a batch mode run in sequence.
use strict; system "cfx5solve -def your file name.def"; system "cfx5solve -def your second file name.def"; After writing the above text in a notepad save it as .pl file extension & give the file name what you wish, I am taking sample.pl Then type the following in the command prompt of CFX in your working directory of above files. perl sample.pl The run will start automatically & when first run is over the other will start automatically. Do let me know if you have any queries. Regards, Amit Roghs |
|
August 3, 2008, 19:37 |
Re: Queueing the simulations
|
#4 |
Guest
Posts: n/a
|
Hi,
Rogerio's suggestion is a very poor way of doing it. It uses many licenses and also fills up your system memory. Amit's posting shows how to do it using perl but it is much easier to just write a simple batch (Windows) or shell script (unix/linux) and queue them that way. eg, in windows create a file called "doruns.bat" which contains: cfx5solve -definition run1.def cfx5solve -definition run2.def cfx5solve -definition run3.def cfx5solve -definition run4.def Run the batch file (using a command line started from the CFX launcher window) and they will be queued up. Glenn Horrocks |
|
August 4, 2008, 17:18 |
Re: Queueing the simulations
|
#5 |
Guest
Posts: n/a
|
Thanks to all of you, I did what u suggested.
When I run the perl in the command prompt, it says - 'perl' is not recognized as an internal or external command, operable program or batch file. Is there any solution to this problem? |
|
August 5, 2008, 02:07 |
Re: Queueing the simulations
|
#6 |
Guest
Posts: n/a
|
You should run the perl from the Ansys CFX command prompt.
|
|
August 5, 2008, 10:13 |
Re: Queueing the simulations
|
#7 |
Guest
Posts: n/a
|
Ok..Here is what i did:
Open a *.cfx file in ANSYS CFX-Pre. Clicked on Tools - > Command Editor Wrote sample.pl and Hit Process (My file name is sample.pl) I got an error saying CCL parser failed with message parseCCLineH: syntax error near sample.pl |
|
August 5, 2008, 21:13 |
Re: Queueing the simulations
|
#8 |
Guest
Posts: n/a
|
Hi,
Unless you are going to use the functionality of perl (looping, if/then, subroutines etc) then forget perl and use a simple batch script. If all you want to do a sequence of simulations it is much easier. Glenn Horrocks |
|
August 6, 2008, 01:21 |
Re: Queueing the simulations
|
#9 |
Guest
Posts: n/a
|
Dude you dont have to do that in *.cfx
I will write down the steps below. 1.Open the Ansys CFX Launcher(not ansys CFX Pre) 2.Go to Tools 3.There you have any option of command prompt. 4.Once you click it there will be a DOS window opening. 5.After that you gotta write perl sample.pl 6.The job will start running automatically. 7.You wont be able to see it directly. 8.Now open the CFX Solver. 9.Go to File Menu,click Monitor Run in Progress. 10.Give path to the working directory where it is being run. 11. You will be able to see the run convergence and the run details as usual. If you still dont get the procedure then do let me know. Regards, Amit Roghs |
|
December 1, 2014, 17:42 |
|
#10 |
Member
Anonymous
Join Date: Apr 2013
Posts: 34
Rep Power: 13 |
Is there any way to do the same thing in FLUENT?
|
|
December 2, 2014, 01:54 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144 |
Fluent can be run from the command line so you can do it there. I suspect it can also be run through workbench so that is another way. You can also use batch scheduling software like PBS of LSF.
Try the fluent form for details. |
|
February 25, 2016, 21:42 |
|
#12 |
Member
Zack
Join Date: Dec 2015
Location: uk
Posts: 35
Rep Power: 11 |
I have created this batch file , and I got this error.
Unknown command line option year cfx5solve -definition G:\Final Year Project\Different Pitch\-6.25 -6.25Degree.def cfx5solve -definition G:\Final Year Project\Different Pitch\-7.5\-7.5Degree.def cfx5solve -definition G:\Final Year Project\Different Pitch\-8.75\-8.75Degree.def |
|
February 25, 2016, 21:45 |
|
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144 |
Your file path has spaces in it. This confuses the command line interpreter. So put your path in quotes:
cfx5solve -definition "G:\Final Year Project\Different Pitch\-6.25 -6.25Degree.def" |
|
June 23, 2016, 11:21 |
|
#14 |
Member
Thomas B
Join Date: Apr 2016
Location: Germany
Posts: 30
Rep Power: 10 |
Hello,
this topic is pretty old, but as I have a question which relates to it... (I searched the web and the forum but couldn't really find what I was looking for as the Scripting things are not very familiar...) Let us say I want to queue up 3 simulations using a Batch (or Perl) file as suggested by ghorrocks (in the simulations only one Parameter is modified, for instance the 1st with Viscous Work, the 2nd without, and the third with High Speed Compressible Wall Heat Transfer). I need to do this for the week-end because I cannot go to work during it, I would like to start Simulation 1 on friday in the afternoon and then when S1 is finished, I'd like that S2 starts automatically right after and then so does S3. Should I make 3 different projects, which results in:
Because with the two things I propose, the *.def files are never in the same directory. Cheers, Thomas Last edited by Thomasbr; June 24, 2016 at 06:26. |
|
June 23, 2016, 20:47 |
|
#15 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144 |
This is simple:
cd /path/to/first/directory cfx5solve -def DefinitionFile1.def cd /path/to/second/directory cfx5solve -def DefinitionFile2.def etc |
|
June 24, 2016, 10:18 |
|
#16 |
Member
Thomas B
Join Date: Apr 2016
Location: Germany
Posts: 30
Rep Power: 10 |
1. Thanks again for your reply Glenn: I managed to make something work, but only with the command line of the CFX Launcher.
I pasted this into the command prompt (displayed after I launched it via CFX launcher): cd U:\Thomas\Simulation1_files\dp0\CFX\CFX cfx5solve -def "Fluiddynamik CFX.def" cd U:\Thomas\Simulation2_files\dp0\CFX\CFX cfx5solve -def "Fluiddynamik CFX.def" and both simulations are launched one after another as wanted 2. The Batch file doesn't work and if I try to do it manually with the command prompt launched via cmd.exe (and not via the CFX Launcher) it doesn't work either because it seems that it doesn't understand 'cfx5solve'. But as the other method works, it's ok to me. Batch file: ------------------------------------------------------------------ u: REM I need to change the drive from C:\ to U:\ first cd U:\Thomas\Simulation1_files\dp0\CFX\CFX cfx5solve -def "Fluiddynamik CFX.def" cd U:\Thomas\Simulation2_files\dp0\CFX\CFX cfx5solve -def "Fluiddynamik CFX.def" ------------------------------------------------------------------ 3. Do you know how to tell CFX to use "Double Precision"? I tried this (as I could read it in the documentation): cfx5solve -def "my file.def" [-double] But [-double] is not recognized. |
|
June 24, 2016, 10:26 |
|
#17 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
You either need to launch it from CFX' command line or add the full path to the cfx5solve.exe:
Code:
"C:\Program Files\ANSYS Inc\v171\CFX\bin\cfx5solve.exe" -batch -double -par-local -partition NUMBER OF CPU CORES -def yourDEF.def -cont-from-file "path/to/old/result.res" -priority 1 In windows batch (launching from cmd.exe) you could work with "variables" as well: Code:
SET ansyspath="C:\Program Files\ANSYS Inc\v171\CFX\bin\cfx5solve.exe" Code:
%ansyspath% -def YOURDEF.def etc Code:
"C:\Program Files\ANSYS Inc\v171\CFX\bin\cfx5solve.exe" -batch -double -par-local -partition NUMBER OF CPU CORES -def "U:\Thomas\Simulation1_files\dp0\CFX\Fluiddynamik CFX.def" |
|
June 24, 2016, 10:58 |
|
#18 |
Member
Thomas B
Join Date: Apr 2016
Location: Germany
Posts: 30
Rep Power: 10 |
Thank you very much Maxim
I did not know these tricks (sorry for being such a newbie) and it helps me a lot! |
|
June 27, 2016, 06:30 |
|
#19 | |
Member
Thomas B
Join Date: Apr 2016
Location: Germany
Posts: 30
Rep Power: 10 |
Hello,
it worked thanks again The 3 results files are available to be analysed which is rather pleasant. But it seems something went wrong with the Double Precision: below is the beginning of the .out file: Quote:
Does it really mean that the calculations have been performed using simple numerics precision? EDIT: I definitely think yes, because there is a huge difference in the calculation time (and therefore in the number of time steps and the values of them). With the same mesh I have: Double Precision Enabled (old Simulation) 13 hours calculation time, 12500 timesteps, last timestep=6,77e-07s Double Precision Off (simulations performed in the week end) 9 hours calculation time, 8700 timesteps, last timestep=2,2e-05s ---> Though RMS criterion <1e-4s is in both cases fulfilled, the Courant Number with Single Precision Numerics gets rather high |
||
June 27, 2016, 07:56 |
|
#20 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,862
Rep Power: 144 |
Yes, you are correct - you have not used the -double argument correctly so it has not been activated. Please post your batch file and we will try to help you.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Periodic boundary conditions in 3D Eulerian granular flow simulations | dsm | FLUENT | 4 | March 2, 2012 20:04 |
Hardware selection for steady/unsteady incompressible, turbulent and cht simulations | maddalena | OpenFOAM | 2 | July 13, 2011 09:55 |
Timestepping in two - phase Simulations using RSM | challenger85 | CFX | 0 | January 4, 2010 06:00 |
Queueing the simulations | CFDLife | CFX | 4 | August 4, 2008 10:33 |
URANS and Transient Simulations | bob | Main CFD Forum | 0 | October 1, 2003 04:54 |