Skip to content

Commit

Permalink
add src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
quanshengwu committed Mar 5, 2020
1 parent 85ca9bd commit 898fa1b
Show file tree
Hide file tree
Showing 46 changed files with 31,700 additions and 0 deletions.
241 changes: 241 additions & 0 deletions src/LICENSE

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions src/Makefile-bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o sigma_AHC.o \
main.o

# compiler
#F90 = /Users/user/quan/work/workplace/mpich/mpich-3.2.1-gfortran/bin/mpif90 -cpp -DMPI
#F90 = gfortran -cpp
F90=mpif90 -fpp
flag = -O3 -nogen-interface #-pg -check all -traceback
#flag = -O3 -ffree-line-length-512 #-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan

INCLUDE = -I${MKLROOT}/include
WFLAG = #-warn all -nogen-interface
OFLAG = #-O3 -static-intel
FFLAG = $(OFLAG) $(WFLAG) $(flag)
LFLAG = $(OFLAG)

# blas and lapack libraries
# static linking
#LIBS = -Wl, ${MKLROOT}/lib/libmkl_intel_lp64.a \
${MKLROOT}/lib/libmkl_sequential.a \
${MKLROOT}/lib/libmkl_core.a -Wl, -lpthread -lm -ldl

# dynamic linking
LIBS = -L/${MKLROOT}/lib -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread

main : $(OBJ)
$(F90) $(LFLAG) $(OBJ) -o wt.x $(LIBS)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(F90) $(FFLAG) $(INCLUDE) -c $*.f90

clean :
rm -f *.o *.mod *~ wt.x

37 changes: 37 additions & 0 deletions src/Makefile.gfortran
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o \
sigma_OHE.o sigma.o sigma_AHC.o \
main.o

# compiler
f90 = gfortran -cpp

flag = -O3 -ffree-line-length-512 #-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan


# blas and lapack libraries
libs = -L/usr/lib/ -llapack -lblas

# Intel MKL also supports with gfortran comipler
# dynamic linking
# libs = -L/${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread


main : $(obj)
$(f90) $(obj) -o wt.x $(libs)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(f90) -c $(flag) $(includes) $*.f90

clean :
rm -f *.o *.mod *~ wt.x
44 changes: 44 additions & 0 deletions src/Makefile.gfortran-mpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o \
sigma_OHE.o sigma.o sigma_AHC.o \
main.o

# compiler, here mpif90 should be comipled with gfortran
F90 = mpif90 -cpp -DMPI -ffree-line-length-512

INCLUDE =
WFLAG = #-Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none \
-fbacktrace -ffree-line-length-0 -fcheck=all -finit-real=nan \
-ffpe-trap=zero,overflow,underflow

OFLAG = -g
FFLAG = $(OFLAG) $(WFLAG)
LFLAG = $(OFLAG)


# blas and lapack libraries
LIBS = -llapack -lblas

# Intel MKL also supports with gfortran comipler
# dynamic linking
# LIBS = -L/${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread


main : $(OBJ)
$(F90) $(LFLAG) $(OBJ) -o wt.x $(LIBS)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(F90) $(FFLAG) $(INCLUDE) -c $*.f90

clean :
rm -f *.o *.mod *~ wt.x
32 changes: 32 additions & 0 deletions src/Makefile.gfortran_travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o \
sigma_OHE.o sigma.o sigma_AHC.o \
main.o


# compiler
f90 = gfortran -cpp -fprofile-arcs -ftest-coverage

flag = -O2 -ffree-line-length-512

# blas and lapack libraries
libs = -llapack -lblas

main : $(OBJ)
$(f90) $(OBJ) -o wt.x $(libs)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(f90) -c $(flag) $(includes) $*.f90

clean :
rm -f *.o *.mod *~ wt.x
42 changes: 42 additions & 0 deletions src/Makefile.intel-mpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o \
sigma_OHE.o sigma.o sigma_AHC.o \
main.o

# compiler
F90 = mpiifort -fpp -DMPI

INCLUDE = -I${MKLROOT}/include
WFLAG = -nogen-interface
OFLAG = -O3 -g -traceback -static-intel
FFLAG = $(OFLAG) $(WFLAG)
LFLAG = $(OFLAG)

# blas and lapack libraries
# static linking
LIBS = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a \
${MKLROOT}/lib/intel64/libmkl_sequential.a \
${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl

# dynamic linking
# LIBS = -L/${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lpthread

main : $(OBJ)
$(F90) $(LFLAG) $(OBJ) -o wt.x $(LIBS)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(F90) $(FFLAG) $(INCLUDE) -c $*.f90

clean :
rm -f *.o *.mod *~ wt.x

36 changes: 36 additions & 0 deletions src/Makefile.intel-seq
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
OBJ = module.o wt_aux.o math_lib.o symmetry.o readHmnR.o inverse.o proteus.o \
eigen.o ham_qlayer2qlayer.o psi.o unfolding.o \
ham_slab.o ham_bulk.o ek_slab.o ek_bulk_polar.o ek_bulk.o \
readinput.o fermisurface.o surfgreen.o surfstat.o \
mat_mul.o ham_ribbon.o ek_ribbon.o \
fermiarc.o berrycurvature.o \
wanniercenter.o dos.o orbital_momenta.o \
berry.o wanniercenter_adaptive.o \
effective_mass.o findnodes.o \
sigma_OHE.o sigma.o sigma_AHC.o \
main.o


# compiler
f90 = ifort -fpp # -check all -pg -fpe0 -warn -traceback -debug extended

#FLAGS = -O3 -nogen-interface -warn all
flag = -O3 -nogen-interface #-warn all

# blas and lapack libraries
# dynamic linking
libs = -L/opt/intel/mkl/lib/ \
-lmkl_intel_lp64 -lmkl_sequential \
-lmkl_core -liomp5

main : $(obj)
$(f90) $(obj) -o wt.x $(libs)
cp -f wt.x ../bin

.SUFFIXES: .o .f90

.f90.o :
$(f90) -c $(flag) $(includes) $*.f90

clean :
rm -f *.o *.mod *~ wt.x
Loading

0 comments on commit 898fa1b

Please sign in to comment.