Skip to content

Instantly share code, notes, and snippets.

@rahulgaur104
Created September 21, 2024 23:06
Show Gist options
  • Save rahulgaur104/112b3546b799c149f58434d841ad489b to your computer and use it in GitHub Desktop.
Save rahulgaur104/112b3546b799c149f58434d841ad489b to your computer and use it in GitHub Desktop.
Makefile used for building GS2 on my local system
# Makefile for Ubuntu 20.04 LTS
# Maintainer: [email protected]
# Check the path to the libraries on your system
# ldconfig -p | grep fftw
# ldconfig -p | grep netcdf
# and edit the paths below accordingly
F90FLAGS += -ffree-line-length-none -fno-backslash
COMPILER ?=gcc
USE_HDF5=
include Makefile.$(COMPILER)
HAS_ISO_C_BINDING=true
ifeq ($(USE_FFT),fftw3)
FFT_LIB = -L/lib/x86_64-linux-gnu -lfftw3 -lfftw3f -lfftw3_mpi -lfftw3f_mpi
FFT_INC = -I/usr/include
endif
ifdef USE_NETCDF
NETCDF_INC = -I/usr/include
NETCDF_LIB = -L/lib/x86_64-linux-gnu -lnetcdff -lnetcdf
ifdef USE_PARALLEL_NETCDF
#NETCDF_LIB += -lhdf5_hl -lhdf5
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment