|
@@ -0,0 +1,56 @@
|
|
|
+# StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
+#
|
|
|
+# Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
|
|
|
+#
|
|
|
+# StarPU is free software; you can redistribute it and/or modify
|
|
|
+# it under the terms of the GNU Lesser General Public License as published by
|
|
|
+# the Free Software Foundation; either version 2.1 of the License, or (at
|
|
|
+# your option) any later version.
|
|
|
+#
|
|
|
+# StarPU is distributed in the hope that it will be useful, but
|
|
|
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
+#
|
|
|
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
|
|
|
+#
|
|
|
+
|
|
|
+PROGNAME=starpu_env
|
|
|
+
|
|
|
+usage()
|
|
|
+{
|
|
|
+ echo "Tool to set StarPU environment variables"
|
|
|
+ echo ""
|
|
|
+ echo "Usage: source $PROGNAME directory"
|
|
|
+ echo ""
|
|
|
+ echo " directory must be a directory in which StarPU has been installed"
|
|
|
+ echo ""
|
|
|
+ echo "Options:"
|
|
|
+ echo " -h, --help display this help and exit"
|
|
|
+ echo " -v, --version output version information and exit"
|
|
|
+ echo ""
|
|
|
+ echo "Report bugs to <@PACKAGE_BUGREPORT@>"
|
|
|
+}
|
|
|
+
|
|
|
+if [ "$1" = "-v" ] || [ "$1" = "--version" ]
|
|
|
+then
|
|
|
+ echo "$PROGNAME (@PACKAGE_NAME@) @PACKAGE_VERSION@"
|
|
|
+elif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "" ]
|
|
|
+then
|
|
|
+ usage
|
|
|
+elif test -d "$1"
|
|
|
+then
|
|
|
+ if test -f $1/bin/starpu_machine_display -a -f $1/lib/pkgconfig/libstarpu.pc
|
|
|
+ then
|
|
|
+ export STARPU_PATH=$(realpath $1)
|
|
|
+ echo "Setting StarPU environment for $STARPU_PATH"
|
|
|
+ export PKG_CONFIG_PATH=$STARPU_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
|
+ export LD_LIBRARY_PATH=$STARPU_PATH/lib:$LD_LIBRARY_PATH
|
|
|
+ export PATH=$STARPU_PATH/bin:$PATH
|
|
|
+ export MANPATH=$STARPU_PATH/share/man:$MANPATH
|
|
|
+ else
|
|
|
+ echo "[Error] $1 is not a valid StarPU installation directory"
|
|
|
+ fi
|
|
|
+else
|
|
|
+ usage
|
|
|
+fi
|
|
|
+
|