====== ANSYS FLUENT in batch ====== ANSYS FLUENT is commercial software that may only be used by research groups running a private license server. You must know the port and license server name to run this example. ===== Submitting job ===== Copy a Grid Engine script file and all necessary input files to your working directory, and then - Login headnode. - Start workgroup shell. - Change to your working directory. - Submit the job. Sample commands here demonstrate example for : (cluster ''mills.hpc'', user ''traine'' in workgroup ''it_css''). However, same commands are also applicable for cluster ''farber'' ssh traine@mills.hpc.udel.edu workgroup -g it_css cd /lustre/work/it_css/users/traine/fluent qsub fluent-3ddp.qs The working directory ''/lustre/work/it_css/users/traine/fluent'' has the Grid Engine script file ''fluent-3ddp.qs'' that starts FLUENT with the input file with instructions to read the case file, run a solver and write the solution data file. FLUENT's log files, data files and script output files will be stored in the working directory after the job completes. ===== Downloading example ===== An example that shows how to submit a batch mpi job to execute fluent 3ddp with an input journal file can be downloaded from the link: [[http://www.udel.edu/it/research/files/cluster/fluent-3ddp-mpi.tar.gz|fluent-3ddp-mpi.tar.gz]]. On Mills, the commands wget http://www.udel.edu/it/research/files/cluster/fluent-3ddp-mpi.tar.gz tar -zxf fluent-3ddp-mpi.tar.gz will get and extract the files to the directory ''fluent-3ddp-mpi'', with the files: - **''fluent-3ddp.qs''** — Grid Engine script to execute ''fluent 3ddp'' with input file: ''input-3d'' - **''input-3d''** — Fluent journal input files with the command to read ''3d.cas'' - **''3d.cas''** — Fluent case file. ANSYS/fluent is a licensed product, so you must export a valid value of the ''ANSYSLMD_LICENSE_FILE'' variable to gain access to fluent on Mills. The exact value should be obtained from the owner of the license. Without a proper value, the script output will contain a message such as: ANSYS LICENSE MANAGER ERROR:Could not connect to any license server. The server is down or is not responsive. ===== Running example ===== Sample session from login to submission: wombat:~ jdoe$ ssh traine@mills.hpc.udel.edu ............................................................ Mills cluster (mills.hpc.udel.edu) This computer system is maintained by University of Delaware IT. Links to documentation and other online resources can be found at: http://docs.hpc.udel.edu/ For support, please contact consult@udel.edu ............................................................ Last login: Mon Oct 1 15:50:17 2012 from wombat.us.udel.edu [traine@mills ~]$ cd /lustre/work/it_css/users/traine [traine@mills traine]$ wget http://www.udel.edu/it/research/files/cluster/fluent-3ddp-mpi.tar.gz --2012-10-01 15:46:12-- http://www.udel.edu/it/research/files/cluster/fluent-3ddp-mpi.tar.gz Resolving www.udel.edu... 128.175.13.63 Connecting to www.udel.edu|128.175.13.63|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 154348 (151K) [application/x-gzip] Saving to: “fluent-3ddp-mpi.tar.gz” 100%[==================================================================>] 154,348 --.-K/s in 0.003s 2012-10-01 15:46:12 (48.7 MB/s) - “fluent-3ddp-mpi.tar.gz” saved [154348/154348] [traine@mills traine]$ tar -zxvf fluent-3ddp-mpi.tar.gz fluent-3ddp-mpi/ fluent-3ddp-mpi/3d.cas fluent-3ddp-mpi/input-3d fluent-3ddp-mpi/fluent-3ddp.qs [traine@mills traine]$ cd fluent-3ddp-mpi [traine@mills fluent-3ddp-mpi]$ vi fluent-3ddp.qs * You **must** edit this file to gain access to this licensed product. Follow the usage directions in the comments. [traine@mills fluent-3ddp-mpi]$ workgroup -g it_css [(it_css:traine)@mills fluent-3ddp-mpi]$ qsub fluent-3ddp.qs Your job 82746 ("fluent-3ddp.qs") has been submitted ===== Files ===== ==== Batch file ==== ''fluent-3ddp.qs'' file: (Must supply a port and license server) #$ -pe openmpi 4 #$ -l psm_endpoints=1 source /opt/shared/valet/docs/valet.sh export ANSYSLMD_LICENSE_FILE=port@ls.udel.edu vpkg_require ansys echo "-- begin fluent run --" fluent 3ddp -g -i input-3d -t$NSLOTS -pinfiniband -mpi=openmpi -ssh echo "-- end fluent run --" ==== Input file ==== ''input-3d'' file: ; Read case file rc 3d.cas ; Initialize the solution /solve/init/init ; Calculate 50 iterations it 50 ; Write data file wd it50-3d.dat ; Calculate another 50 iterations it 50 ; Write final data file wd 3d.dat ; Exit Fluent exit yes ==== Output file ==== The fluent output with be in the queue script output file between the "-- begin fluent run --" and "-- end fluent run --" lines. For example: -- begin fluent run -- /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -g -i input-3d -t4 -pinfiniband -mpi=openmpi -ssh /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -g -i input-3d -t4 -pinfiniband -mpi=openmpi -ssh -sgeup /opt/shared/ansys/14/v140/fluent/fluent14.0.0/cortex/lnamd64/cortex.14.0.0 -f fluent -g -i input-3d -newcx (fluent "3ddp -pinfiniband -host -alnamd64 -r14.0.0 -t4 -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-11579 -path/opt/shared/ansys/14/v140/fluent -sge -ssh") Loading "/opt/shared/ansys/14/v140/fluent/fluent14.0.0/lib/fluent.dmp.114-64" Done. /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -pinfiniband -host -alnamd64 -t4 -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-11579 -path/opt/shared/ansys/14/v140/fluent -sge -ssh -cx n015.mills.hpc.udel.edu:50609:47657 /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -pinfiniband -host -alnamd64 -t4 -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-11579 -path/opt/shared/ansys/14/v140/fluent -sge -ssh -cx n015.mills.hpc.udel.edu:50609:47657 -sgeup Starting /opt/shared/ansys/14/v140/fluent/fluent14.0.0/lnamd64/3ddp_host/fluent.14.0.0 sge host -cx n015.mills.hpc.udel.edu:50609:47657 "(list (rpsetvar (QUOTE parallel/function) "fluent 3ddp -flux -node -alnamd64 -r14.0.0 -t4 -pinfiniband -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-12092 -sge -ssh") (rpsetvar (QUOTE parallel/rhost) "") (rpsetvar (QUOTE parallel/ruser) "") (rpsetvar (QUOTE parallel/nprocs_string) "4") (rpsetvar (QUOTE parallel/auto-spawn?) #t) (rpsetvar (QUOTE parallel/trace-level) 0) (rpsetvar (QUOTE parallel/remote-shell) 1) (rpsetvar (QUOTE parallel/path) "/opt/shared/ansys/14/v140/fluent") (rpsetvar (QUOTE parallel/hostsfile) "/tmp/fluent-sge-cnf-traine-12092") )" Welcome to ANSYS FLUENT 14.0.0 Copyright 2011 ANSYS, Inc.. All Rights Reserved. Unauthorized use, distribution or duplication is prohibited. This product is subject to U.S. laws governing export and re-export. For full Legal Notice, see documentation. Build Time: Oct 25 2011 11:19:48 EDT Build Id: 10398 Loading "/opt/shared/ansys/14/v140/fluent/fluent14.0.0/lib/flprim.dmp.1119-64" Done. -------------------------------------------------------------- This is an academic version of ANSYS FLUENT. Usage of this product license is limited to the terms and conditions specified in your ANSYS license form, additional terms section. -------------------------------------------------------------- Host spawning Node 0 on machine "n015" (unix). /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -flux -node -alnamd64 -t4 -pinfiniband -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-12092 -sge -ssh -mport 10.54.50.15:10.54.50.15:56389:0 /opt/shared/ansys/14/v140/fluent/fluent14.0.0/bin/fluent -r14.0.0 3ddp -flux -node -alnamd64 -t4 -pinfiniband -mpi=openmpi -cnf=/tmp/fluent-sge-cnf-traine-12092 -sge -ssh -mport 10.54.50.15:10.54.50.15:56389:0 -sgeup Starting fixfiledes /opt/shared/ansys/14/v140/fluent/fluent14.0.0/multiport/mpi/lnamd64/openmpi/bin/mpirun --app /tmp/fluent-appfile.12486 ------------------------------------------------------------------------------ ID Comm. Hostname O.S. PID Mach ID HW ID Name ------------------------------------------------------------------------------ host net n015 Linux-64 12165 0 19 Fluent Host n3 openmpi n015 Linux-64 12616 0 3 Fluent Node n2 openmpi n015 Linux-64 12615 0 2 Fluent Node n1 openmpi n015 Linux-64 12614 0 1 Fluent Node n0* openmpi n015 Linux-64 12613 0 0 Fluent Node Selected system interconnect: InfiniBand ------------------------------------------------------------------------------ Initializing SGE Done. Reading journal file input... > Multicore SMT processors detected. Processor affinity set! ; Read case file rc 3d.cas Reading "3d.cas"... Using buffering for scanning file. 4000 hexahedral cells, zone 2, binary. 1600 quadrilateral wall faces, zone 3, binary. 100 quadrilateral pressure-outlet faces, zone 4, binary. 100 quadrilateral velocity-inlet faces, zone 5, binary. 11100 quadrilateral interior faces, zone 7, binary. 4961 nodes, binary. 4961 node flags, binary. Building... mesh auto partitioning mesh by Metis (fast), distributing mesh parts...., faces...., nodes...., cells...., materials, interface, domains, mixture zones, default-interior velocity_inlet.1 pressure_outlet.2 wall fluid parallel, Done. > ; Initialize the solution /solve/init/init > ; Calculate 50 iterations it 50 iter continuity x-velocity y-velocity z-velocity time/iter 1 1.0000e+00 3.0626e+01 0.0000e+00 0.0000e+00 0:00:01 49 2 5.2224e-01 1.8645e-02 9.7302e-04 9.3701e-04 0:00:01 48 3 3.4389e-01 1.1462e-02 3.6203e-04 3.3080e-04 0:00:01 47 4 2.6015e-01 7.1708e-03 1.8307e-04 1.6784e-04 0:00:02 46 5 1.6257e-01 3.6794e-03 1.1499e-04 1.1104e-04 0:00:02 45 6 1.1773e-01 2.9507e-03 1.0063e-04 9.8831e-05 0:00:01 44 7 8.9668e-02 2.6900e-03 9.9205e-05 9.6483e-05 0:00:01 43 8 7.2522e-02 2.5473e-03 8.9085e-05 8.7391e-05 0:00:01 42 9 5.9407e-02 2.3933e-03 7.3671e-05 7.2378e-05 0:00:01 41 10 4.3260e-02 2.1616e-03 6.6998e-05 6.6789e-05 0:00:01 40 11 3.3065e-02 2.0107e-03 6.3300e-05 6.2885e-05 0:00:01 39 iter continuity x-velocity y-velocity z-velocity time/iter 12 2.6991e-02 1.8833e-03 5.8103e-05 5.7767e-05 0:00:01 38 13 2.0547e-02 1.7679e-03 5.2381e-05 5.2213e-05 0:00:01 37 14 1.6036e-02 1.6245e-03 4.5816e-05 4.5595e-05 0:00:01 36 15 1.2198e-02 1.4862e-03 4.0081e-05 3.9796e-05 0:00:01 35 16 9.6683e-03 1.3218e-03 3.5188e-05 3.4946e-05 0:00:01 34 17 7.5870e-03 1.1556e-03 3.0637e-05 3.0361e-05 0:00:01 33 18 5.5529e-03 9.9136e-04 2.6857e-05 2.6885e-05 0:00:01 32 19 4.1636e-03 8.3279e-04 2.4361e-05 2.4271e-05 0:00:00 31 20 3.2192e-03 6.8891e-04 2.2513e-05 2.2368e-05 0:00:00 30 21 2.5922e-03 5.5693e-04 2.0894e-05 2.0774e-05 0:00:00 29 22 2.2036e-03 4.4272e-04 1.9067e-05 1.9030e-05 0:00:00 28 iter continuity x-velocity y-velocity z-velocity time/iter 23 1.8422e-03 3.4535e-04 1.6883e-05 1.6860e-05 0:00:00 27 24 1.5145e-03 2.6291e-04 1.4504e-05 1.4497e-05 0:00:00 26 25 1.2806e-03 1.9693e-04 1.2115e-05 1.2065e-05 0:00:00 25 26 1.0292e-03 1.4402e-04 9.8752e-06 9.8899e-06 0:00:00 24 ! 27 solution is converged 27 8.3820e-04 1.0405e-04 7.8272e-06 7.8486e-06 0:00:00 23 > ; Write data file wd it50-3d.dat Writing "it50-3d.dat"... Done. > ; Calculate another 50 iterations it 50 iter continuity x-velocity y-velocity z-velocity time/iter ! 27 solution is converged 27 8.3820e-04 1.0405e-04 7.8272e-06 7.8486e-06 0:00:01 50 ! 28 solution is converged 28 6.7773e-04 7.3765e-05 6.0637e-06 6.0806e-06 0:00:01 49 > ; Write another data file wd 3d.dat Writing "3d.dat"... Done. > ; Exit Fluent exit The current case has not been saved. OK to discard? [cancel] yes -- end fluent run -- ==== Data files ==== The files "it50-3d.dat" and "3d.dat" are written and stored in the working directory. You can load them along with the ''3d.cas'' file for further post-processing and visualization. ===== Additional Resources ===== * [[https://www.3ds.com/products-services/simulia/products/abaqus/|ANSYS Fluent]]