-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathmake_environment_gfortran
More file actions
executable file
·36 lines (35 loc) · 2.45 KB
/
make_environment_gfortran
File metadata and controls
executable file
·36 lines (35 loc) · 2.45 KB
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
32
33
34
35
36
#!/bin/bash
# -------------------------------------------------------------------------------------------------------------------
# GRASP ENVIRONMENT FLAGS - GNU gfortran version
# -------------------------------------------------------------------------------------------------------------------
#
# 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.
#
# Installation requirements:
# - Lapack, Blas and MPI libraries have to be installed and properly linked - e.g. add them to LD_LIBRARY_PATH.
mkdir lib bin > /dev/null 2>&1
echo "cp ../BLAS-3.8.0/blas_LINUX.a lib/libblas.a"
cp ../BLAS-3.8.0/blas_LINUX.a lib/libblas.a
echo "cp ../lapack-3.8.0/liblapack.a lib/"
cp ../lapack-3.8.0/liblapack.a lib/
# - The Fortran compiler of choice and the MPI wrapper (as specified by FC and FC_MPI below) have to be on your PATH.
#
# -------------------------------------------------------------------------------------------------------------------
# Set up main flags
# -------------------------------------------------------------------------------------------------------------------
export FC=gfortran # Fortran compiler
#export FC_FLAGS="-O2 -fno-automatic" # Serial code compiler flags
export FC_FLAGS="-O2 -fno-automatic -fconvert=big-endian" # If little-endian used, comment out this line, use the above one
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" # Location for temporary files