From fd85082f1815db3424d4afab9cfa184c4940a652 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Fri, 14 Feb 2020 11:04:13 +0000 Subject: [PATCH] Prepare sit for new HAWK setup * Adapted sit to new lmod module structure * Added configuration files for available compilers --- etc/platform-configs/hawk/compiler/aocc | 3 +++ etc/platform-configs/hawk/compiler/gnu | 3 +++ etc/platform-configs/hawk/compiler/intel | 3 +++ etc/platform-configs/hawk/compiler/llwm | 3 +++ etc/platform-configs/hawk/compiler/pgi | 3 +++ etc/platform-configs/hawk/compiler/system | 1 + sit | 10 ++++++++++ 7 files changed, 26 insertions(+) create mode 100644 etc/platform-configs/hawk/compiler/aocc create mode 100644 etc/platform-configs/hawk/compiler/gnu create mode 100644 etc/platform-configs/hawk/compiler/intel create mode 100644 etc/platform-configs/hawk/compiler/llwm create mode 100644 etc/platform-configs/hawk/compiler/pgi create mode 120000 etc/platform-configs/hawk/compiler/system diff --git a/etc/platform-configs/hawk/compiler/aocc b/etc/platform-configs/hawk/compiler/aocc new file mode 100644 index 0000000..9307322 --- /dev/null +++ b/etc/platform-configs/hawk/compiler/aocc @@ -0,0 +1,3 @@ +#!/bin/bash +COMPILER_OPTS="CC=clang CXX=clang++" +COMPILER_VERSION_CMD="llvm-config --version" diff --git a/etc/platform-configs/hawk/compiler/gnu b/etc/platform-configs/hawk/compiler/gnu new file mode 100644 index 0000000..a2c385d --- /dev/null +++ b/etc/platform-configs/hawk/compiler/gnu @@ -0,0 +1,3 @@ +#!/bin/bash +COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" +COMPILER_VERSION_CMD="gcc -dumpversion" diff --git a/etc/platform-configs/hawk/compiler/intel b/etc/platform-configs/hawk/compiler/intel new file mode 100644 index 0000000..846d854 --- /dev/null +++ b/etc/platform-configs/hawk/compiler/intel @@ -0,0 +1,3 @@ +#!/bin/bash +COMPILER_OPTS="CC=icc CXX=icpc F77=ifort FC=ifort" +COMPILER_VERSION_CMD="icc -dumpversion" diff --git a/etc/platform-configs/hawk/compiler/llwm b/etc/platform-configs/hawk/compiler/llwm new file mode 100644 index 0000000..9307322 --- /dev/null +++ b/etc/platform-configs/hawk/compiler/llwm @@ -0,0 +1,3 @@ +#!/bin/bash +COMPILER_OPTS="CC=clang CXX=clang++" +COMPILER_VERSION_CMD="llvm-config --version" diff --git a/etc/platform-configs/hawk/compiler/pgi b/etc/platform-configs/hawk/compiler/pgi new file mode 100644 index 0000000..4891bef --- /dev/null +++ b/etc/platform-configs/hawk/compiler/pgi @@ -0,0 +1,3 @@ +#!/bin/bash +COMPILER_OPTS="CC=pgcc CXX=pgCC FC=pgf95 F90=pgf90 F77=pgf77" +COMPILER_VERSION_CMD="pgcc -V | awk '/pgcc/{print \$2}' | sed -e 's/-/./'" diff --git a/etc/platform-configs/hawk/compiler/system b/etc/platform-configs/hawk/compiler/system new file mode 120000 index 0000000..9893768 --- /dev/null +++ b/etc/platform-configs/hawk/compiler/system @@ -0,0 +1 @@ +gnu \ No newline at end of file diff --git a/sit b/sit index e0d2ca9..5d4295b 100755 --- a/sit +++ b/sit @@ -141,6 +141,16 @@ else echo "Loading compiler module ${COMPILER_MODULE}" module load ${COMPILER_MODULE} ;; + hawk) + if [ -z "$COMPILER_VERSION" ] ; then + COMPILER_MODULE=${COMPILER} + else + COMPILER_MODULE=${COMPILER}/${COMPILER_VERSION} + fi + echo "Loading compiler module ${COMPILER_MODULE}" + module load ${COMPILER_MODULE} + ;; + ;; esac fi