From 00b8f49cb6ea6790555f1ae5cea98b95b19ce9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Santisi?= Date: Mon, 29 Jul 2024 21:13:50 +0000 Subject: [PATCH] Init repository --- default.nix | 14 ++++++++++++++ makefile.include | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 default.nix create mode 100644 makefile.include diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..041b4f5 --- /dev/null +++ b/default.nix @@ -0,0 +1,14 @@ +with import {}; + stdenvNoCC.mkDerivation { + name = "vaspi-build-env"; + + buildInputs = [ + pkg-config + lapack + gfortran6 + (openmpi.override { stdenv = gcc6Stdenv; gfortran = gfortran6; }) + (blas-reference.override { stdenv = gcc6Stdenv; }) + (fftwMpi.override { stdenv = gcc6Stdenv; gfortran = gfortran6; }) + ]; + } + diff --git a/makefile.include b/makefile.include new file mode 100644 index 0000000..81108d6 --- /dev/null +++ b/makefile.include @@ -0,0 +1,50 @@ +# Precompiler options +CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \ + -DCACHE_SIZE=4000 -Davoidalloc \ + -Duse_collective \ + -DMPI_BLOCK=8000 \ + -DnoAugXCmeta -Duse_bse_te \ + -Duse_shmem -Dtbdyn + +CPP = gcc -E -P -C $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS) + +FC = mpif90 +FCL = mpif90 + +FREE = -ffree-form -ffree-line-length-none + +FFLAGS = -static +OFLAG = -O2 +OFLAG_IN = $(OFLAG) +DEBUG = -O0 + +LIBDIR += $(shell pkg-config --libs lapack fftw3) #/usr/share/libs \ + -L/root/330/lapack-3.11.0 +BLAS = -L$(LIBDIR) -lblas -lfftw3 +LAPACK = -L$(LIBDIR) -llapack +BLACS = + +OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o#\ + /usr/lib64/libfftw3.a +INCS += $(shell pkg-config --cflags lapack fftw3 blas)#-I/usr/include -I/root/330/lapack-3.11.0 + +LLIBS += $(SCALAPACK) $(LAPACK) $(BLAS) + +OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o chi.o +OBJECTS_O2 += fft3dlib.o + +# For what used to be vasp.5.lib +CPP_LIB = $(CPP) +FC_LIB = $(FC) +CC_LIB = gcc +CFLAGS_LIB = -O +FFLAGS_LIB = -O1 +FREE_LIB = $(FREE) + +OBJECTS_LIB= linpack_double.o getshmem.o + +# Normally no need to change this +SRCDIR = ../../src +BINDIR = ../../bin + +CPP_OPTIONS += -DLAPACK36