#! /bin/ksh

# This script is used for systems that have major filesystem cache
# coherency issues.  It runs sync to sync any filesystem data or
# metadata changes to disk.

# Options:
#   -p -- parallel mode: run sync in an MPI program so all nodes will sync

if [[ "$WHERE_AM_I" == jet ]] ; then
    sync
    if [[ "$1" == "-p" ]] ; then
        $USHhwrf/hwrf_run.sh -spmd -mpiwrap sync
    fi
fi