forked from compas/grasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_environment_gfortran
executable file
·31 lines (30 loc) · 2.08 KB
/
make_environment_gfortran
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# -------------------------------------------------------------------------------------------------------------------------------------
# GRASP2K ENVIRONMENT FLAGS
# -------------------------------------------------------------------------------------------------------------------------------------
#
# Define the following global variables according to your environment and
# source this script or add these definitions to your terminal configuration
# file, eg. ~/.cshrc, ~/.bashrc or ~/.profile.
#
# Current version: Linux, gfortran gcc version 5.4.0
#
# Assumes gfortran, openmpi are on PATH
# Assumes openmpi libraries on LD_LIBRARY PATH
# files liblapack.a and libblas.a are added to $GRASP/lib
# -----------------------------------------------------------------------------------------------------------------
# Set up main flags
# -----------------------------------------------------------------------------------------------------------------
export FC=gfortran # Fortran compiler
export FC_FLAGS="-O2 -fno-automatic " # Serial code compiler flags
export FC_LD=" " # Serial linker flags
export GRASP="${PWD}" # Location of the 2018 root directory
export LAPACK_LIBS="-llapack -lblas" # Lapack libraries
# -----------------------------------------------------------------------------------------------------------------
# Set up MPI related flags
# -----------------------------------------------------------------------------------------------------------------
export FC_MPI="mpifort" # MPI
export FC_MPIFLAGS="${FC_FLAGS}" # Parallel code compiler flags
export FC_MPILD=${FC_LD} # Serial linker flags
# -----------------------------------------------------------------------------------------------------------------
export MPI_TMP="${HOME}/tmp_mpi" # Location for temporary files