mpi-selector.csh.in 811 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/csh
# Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
#
# File installed for Bourne-shell startups to select which MPI
# installation to use.  Not using "alternatives" because we want to be
# able to set per-user level defaults, not just system-wide defaults.

set mpi_selector_dir="@MPI_SELECTOR_DATADIR@"
set mpi_selector_homefile="$HOME/@MPI_SELECTOR_HOME_FILE@"
set mpi_selector_sysfile="@MPI_SELECTOR_SYSCONFDIR@/@MPI_SELECTOR_SYSCONFIG_FILE@"

set mpi_selection=
if (-f "$mpi_selector_homefile") then
    set mpi_selection=`cat $mpi_selector_homefile`
else if (-f "$mpi_selector_sysfile") then
    set mpi_selection=`cat $mpi_selector_sysfile`
endif

if ("$mpi_selection" != "" && -f "$mpi_selector_dir/$mpi_selection.csh") then
    source "$mpi_selector_dir/$mpi_selection.csh"
endif