update makefiles and add dependencies for parallel compile

This commit is contained in:
Axel Kohlmeyer
2020-06-12 05:07:19 -04:00
parent 4868f5fdfc
commit 74df1bcf7d
6 changed files with 19 additions and 73 deletions

13
lib/mesont/.depend Normal file
View File

@ -0,0 +1,13 @@
CNTPot.o: CNTPot.f90 TPMLib.o
ExportCNT.o: ExportCNT.f90 CNTPot.o TPMLib.o TubePotMono.o TPMForceField.o
LinFun2.o: LinFun2.f90
Spline1.o: Spline1.f90
Spline2.o: Spline2.f90 Spline1.o
TPMForceField.o: TPMForceField.f90 CNTPot.o TPMM0.o TPMM1.o
TPMGeom.o: TPMGeom.f90 TPMLib.o
TPMLib.o: TPMLib.f90
TPMM0.o: TPMM0.f90 TubePotMono.o
TPMM1.o: TPMM1.f90 TubePotMono.o
TubePotBase.o: TubePotBase.f90 TPMLib.o
TubePotMono.o: TubePotMono.f90 TPMLib.o TPMGeom.o TubePotBase.o TubePotTrue.o LinFun2.o Spline2.o
TubePotTrue.o: TubePotTrue.f90 TPMGeom.o TubePotBase.o

1
lib/mesont/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.mod

View File

@ -9,7 +9,7 @@ EXTRAMAKE = Makefile.lammps.gfortran
SRC = LinFun2.f90 Spline1.f90 Spline2.f90 TPMLib.f90 TPMGeom.f90 TubePotBase.f90 TubePotTrue.f90 \
TubePotMono.f90 TPMM0.f90 TPMM1.f90 CNTPot.f90 TPMForceField.f90 ExportCNT.f90
FILES = $(SRC) Makefile
FILES = $(SRC) Makefile
# ------ DEFINITIONS ------
@ -19,12 +19,9 @@ OBJ = $(SRC:.f90=.o)
# ------ SETTINGS ------
F90 = gfortran
CC = gcc
F90FLAGS = -O3 -fPIC -ffast-math -ftree-vectorize -fexpensive-optimizations -fno-second-underscore -g -ffree-line-length-none
F90FLAGS = -O3 -fPIC -ftree-vectorize -g -Wall
ARCHIVE = ar
ARCHFLAG = -rc
LINK = g++
LINKFLAGS = -O
USRLIB =
SYSLIB =
@ -36,14 +33,8 @@ lib: $(OBJ)
# ------ COMPILE RULES ------
%.o:%.F
$(F90) $(F90FLAGS) -c $<
%.o:%.f90
$(F90) $(F90FLAGS) -c $<
%.o:%.c
$(CC) $(F90FLAGS) -c $<
include .depend
# ------ CLEAN ------

View File

@ -19,7 +19,7 @@ OBJ = $(SRC:.f90=.o)
# ------ SETTINGS ------
F90 = ifort
F90FLAGS = -Ofast -fPIC -ipo
F90FLAGS = -O3 -fPIC -g
ARCHIVE = ar
ARCHFLAG = -rc
USRLIB =
@ -33,15 +33,9 @@ lib: $(OBJ)
# ------ COMPILE RULES ------
%.o:%.F
$(F90) $(F90FLAGS) -c $<
%.o:%.f90
$(F90) $(F90FLAGS) -c $<
%.o:%.c
$(CC) $(F90FLAGS) -c $<
include .depend
# ------ CLEAN ------

1
lib/mesont/Makefile.mpi Symbolic link
View File

@ -0,0 +1 @@
Makefile.gfortran

View File

@ -1,55 +0,0 @@
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.gfortran
# ------ FILES ------
SRC = LinFun2.f90 Spline1.f90 Spline2.f90 TPMLib.f90 TPMGeom.f90 TubePotBase.f90 TubePotTrue.f90 \
TubePotMono.f90 TPMM0.f90 TPMM1.f90 CNTPot.f90 TPMForceField.f90 ExportCNT.f90
FILES = $(SRC) Makefile
# ------ DEFINITIONS ------
LIB = libmesont.a
OBJ = $(SRC:.f90=.o)
# ------ SETTINGS ------
F90 = gfortran
CC = gcc
F90FLAGS = -O3 -fPIC -ffast-math -ftree-vectorize -fexpensive-optimizations -fno-second-underscore -g -ffree-line-length-none
ARCHIVE = ar
ARCHFLAG = -rc
LINK = g++
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
%.o:%.F
$(F90) $(F90FLAGS) -c $<
%.o:%.f90
$(F90) $(F90FLAGS) -c $<
%.o:%.c
$(CC) $(F90FLAGS) -c $<
include .depend
# ------ CLEAN ------
clean:
-rm *.o *.mod $(LIB)
tar:
-tar -cvf ../MESONT.tar $(FILES)

1
lib/mesont/Makefile.serial Symbolic link
View File

@ -0,0 +1 @@
Makefile.gfortran