#!/bin/bash

module purge
module load profile/base 
module load gnu/6.4.0 cuda/9.2.88 openmpi/3.1.0--gnu--6.4.0

export machine=davide
export software=specfem3d_globe
export version=31octobre

export install_dir=$CINECA_SCRATCH/benchmarks/$machine/$software/$version
#export install_dir=$HOME/benchmarks/$machine/$software/$version

# GNU
export CC="mpicc"
export FC="mpif90"
export MPIFC=mpif90
export FCFLAGS="-mcpu=power8 -O3 -funroll-loops -fopenmp -fpeel-loops -funroll-loops -fno-strict-aliasing" #-flto : generate error    ; -Ofast
export CFLAGS="-mcpu=power8 -O3 -funroll-loops -fopenmp -fpeel-loops -funroll-loops -fno-strict-aliasing" #-Ofast

# Power8 
#export CC="xlc"
#export FC="xlf"
#export MPIFC=$FC
#export FCFLAGS="-qarch=pwr8 -O3 -qipa -qsmp=omp -qhot"
#export CFLAGS="-mcpu=power8 -O3 -qipa -qsmp=omp -qhot" 

# Intel
#export FCFLAGS=" -g -O3 -qopenmp -xCORE-AVX2 -DUSE_FP32 -DOPT_STREAMS -fp-model fast=2 -traceback -mcmodel=large"
#export CFLAGS=" -g -O3  -xCORE-AVX2 "

