Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Sbatch fluent

    • blanca.cerda
      Subscriber

      Hello, 
      I am trying to run fluent by commands. 
      Using the interactive window is something like:

      srun fluent -r23.2.0 2ddp -g -t20 -case
      /solve/dual-time-iterate
      /file/write-case-data
      /exit/close-fluent
       
      This works really good, then i can read the results and everything works well.
      But trying the same commands through an sbatch file shows me the error after running the case and the data, considering the commands like a directory. 
      The sbatch looks something like this because is how the cluster works. 

      #!/bin/bash
      #---------------Script SBATCH ----------------
      #SBATCH -J Simulacion
      #SBATCH -p general
      #SBATCH -n 1
      #SBATCH -c 20
      #SBATCH --mem-per-cpu=1000
      #SBATCH --mail-user=mail@mail.com
      #SBATCH --mail-type=ALL
      #SBATCH -o Simulacion152040_%j.err.out
      #SBATCH -e Simulacion152040_%j.err.out

      #-----------------Toolchain---------------------------
      ml purge
      ml intel/2022.00
      # ----------------Modulos----------------------------
      ml  ANSYS/2023R2  
      # ----------------Comando--------------------------
      export OMP_PLACES=cores
       
      srun fluent -r23.2.0 2ddp -g -t20 -case
      /solve/dual-time-iterate
      /file/write-case-data
      /exit/close-fluent
       
      Running this, i got: 

       
      Is there a way from fluent to do all this properly? 
      Thanks in advance
    • Rob
      Forum Moderator

      Looks like the Slurm script is trying to action the Fluent commands rather than them being used in Fluent. I'd favour launching Fluent with a journal, so the command launches Fluent with a journal which contains the read case & data, run, write case & data, exit.  The Fluent part is covered in the User's Guide,  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v242/en/flu_ug/flu_gs_starting.html   The Slurm part is likely something your IT people control. 

    • blanca.cerda
      Subscriber

       

       

      Hello dear, 

      I tried using a journal file, that i created as a text file, Thanks for the advice.
      It works

       

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.