Difference between revisions of "The On Ramp/Level 1/Solve (Compressible)"

From PHASTA Wiki
Jump to: navigation, search
Line 32: Line 32:
 
  date
 
  date
  
After compilation, confirm that the compressible PHASTA executable has been built:
+
After compilation, confirm that the compressible PHASTA executable has been built by locating:
 +
 
 +
Example_Build/bin/phastaC.exe
 +
 
 +
This is the executable specifically for compressible simulations. You can also see `phastaIC.exe` for incompressible cases.
 +
 
 +
==Creating the Executable==
 +
Create the runPHASTA.sh bash script in your 8-1-Chef/Run directory. Where you see <pathtoBuildDir> include your path to your build directory where you retrieved the input.config file.
 +
 
 +
#!/bin/bash
 +
 +
rm $1-procs_case/doubleRun-check
 +
 +
#export PHASTA_CONFIG=/users/jopa6460/git-phasta/build_phasta/Example_Build
 +
export PHASTA_CONFIG=<pathtoBuildDir>
 +
 +
mpirun -np $1 $PHASTA_CONFIG/bin/phastaC.exe 2>&1 | tee $1.out
 +
 
 +
Remember to turn the file into an executable as was done for the build script above. Hint: <code>chmod +x</code> command.
 +
 
 +
This completes the setup needed to launch compressible simulations.

Revision as of 23:36, 2 June 2025

Overview

This page walks you through the process of configuring, compiling, and identifying the correct executable for running compressible PHASTA simulations. These steps assume you have generated and partitioned a mesh using Prepping the Grid for Chef and The On Ramp/Level 1/Partition.

Building PHASTA for Compressible Simulations

Use the following script to configure and compile PHASTA with compressible physics enabled. This ensures that both compressible and incompressible functionalities are available.

#!/bin/bash

Target=Example_Build
mkdir Example_Build
rm -r $Target/*
cd $Target

export PKG_CONFIG_PATH=/users/skinnerr/tools/git-petsc/build_ompi210_gnu63/lib/pkgconfig/

cmake \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_Fortran_COMPILER=gfortran \
-DCMAKE_BUILD_TYPE=Debug \
-DPHASTA_INCOMPRESSIBLE=ON \
-DPHASTA_COMPRESSIBLE=OFF \
-DPHASTA_USE_LESLIB=ON \
-DLESLIB=/users/matthb2/libles1.5/libles-debianjessie-gcc-ompi.a \
-DCASES=/home/mrasquin/develop-phasta/phastaChefTests \
-DPHASTA_TESTING=OFF \
../../phasta-next/

make -j8
echo "Target: $Target"
date

After compilation, confirm that the compressible PHASTA executable has been built by locating:

Example_Build/bin/phastaC.exe

This is the executable specifically for compressible simulations. You can also see `phastaIC.exe` for incompressible cases.

Creating the Executable

Create the runPHASTA.sh bash script in your 8-1-Chef/Run directory. Where you see <pathtoBuildDir> include your path to your build directory where you retrieved the input.config file.

#!/bin/bash

rm $1-procs_case/doubleRun-check

#export PHASTA_CONFIG=/users/jopa6460/git-phasta/build_phasta/Example_Build
export PHASTA_CONFIG=<pathtoBuildDir>

mpirun -np $1 $PHASTA_CONFIG/bin/phastaC.exe 2>&1 | tee $1.out

Remember to turn the file into an executable as was done for the build script above. Hint: chmod +x command.

This completes the setup needed to launch compressible simulations.