Add the HRR related function and parameters into LTORC
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

92 linhas
2.5KB

  1. #compiler =icpc
  2. #CANTERA_DIR =/opt/scientific/cantera-2.3_intel_mkl
  3. #IDA_DIR =/opt/scientific/sundials-3.1.1_intel_mkl
  4. #EXE =lagrangianCombustion2
  5. #DESTDIR =~/bin
  6. compiler =g++
  7. CANTERA_DIR =/opt/scientific/cantera-2.4_gnu_blas
  8. IDA_DIR =/opt/scientific/sundials-3.1.1_gnu_lapack
  9. EXE =lagrangianCombustion
  10. DESTDIR =~/bin
  11. CANTERA_INCLUDES=-I$(CANTERA_DIR)/include
  12. GSL_INCLUDES =-I/usr/include/gsl
  13. GSL_LIBS =-L/usr/lib -lgsl -lgslcblas
  14. IDA_INCLUDES =-I$(IDA_DIR)/include
  15. SUN_INCLUDES =-I$(IDA_DIR)/include
  16. IDA_LIBS =-L$(IDA_DIR)/lib -lsundials_nvecopenmp \
  17. -lsundials_ida -lsundials_sunlinsollapackband
  18. CANTERA_LIBS =-L$(CANTERA_DIR)/lib -lcantera_shared
  19. RPATH =-Wl,-rpath=$(IDA_DIR)/lib,-rpath=$(CANTERA_DIR)/lib
  20. RM=rm -f
  21. compiler?=g++
  22. ifeq ($(compiler),g++)
  23. CPPFLAGS= -Wall -O3
  24. CPP=g++
  25. endif
  26. ifeq ($(compiler),icpc)
  27. export GXX_INCLUDE=/usr/lib/gcc/x86_64-pc-linux-gnu/7.4.1/include/c++
  28. CPPFLAGS= -Wall -O3 -gxx-name=/usr/bin/g++-7 -std=c++11
  29. CPP=icpc
  30. endif
  31. OBJS = parse.o UserData.o gridRoutines.o residue.o solution.o main.o
  32. all: $(EXE)
  33. # pull in dependency info for *existing* .o files
  34. -include $(OBJS:.o=.d)
  35. parse.o: parse.cpp parse.h parse.hpp
  36. $(CPP) $(CPPFLAGS) -c parse.cpp -o parse.o
  37. $(CPP) -MM parse.cpp > parse.d
  38. solution.o: solution.cpp solution.h
  39. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  40. -c solution.cpp -o solution.o
  41. $(CPP) -MM $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  42. solution.cpp > solution.d
  43. residue.o: residue.cpp residue.h UserData.h gridRoutines.h
  44. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) \
  45. $(IDA_INCLUDES) $(GSL_INCLUDES) -c residue.cpp \
  46. -o residue.o -fopenmp
  47. $(CPP) -MM $(CANTERA_INCLUDES) \
  48. $(IDA_INCLUDES) $(GSL_INCLUDES) \
  49. residue.cpp > residue.d
  50. gridRoutines.o: gridRoutines.cpp gridRoutines.h parse.h
  51. $(CPP) $(CPPFLAGS) -c gridRoutines.cpp -o gridRoutines.o
  52. $(CPP) -MM gridRoutines.cpp > gridRoutines.d
  53. UserData.o: UserData.cpp UserData.h gridRoutines.h parse.h
  54. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) \
  55. -c UserData.cpp -o UserData.o
  56. $(CPP) -MM $(CANTERA_INCLUDES) \
  57. UserData.cpp > UserData.d
  58. main.o: main.cpp UserData.h solution.h residue.h macros.h
  59. $(CPP) $(CPPFLAGS) $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  60. -c main.cpp -o main.o
  61. $(CPP) -MM $(CANTERA_INCLUDES) $(IDA_INCLUDES) \
  62. main.cpp > main.d
  63. $(EXE): $(OBJS)
  64. $(CPP) $(CPPFLAGS) $(IDA_INCLUDES) \
  65. $(CANTERA_INCLUDES) $(GSL_INCLUDES) $(RPATH) \
  66. $(OBJS) -o $(EXE) -fopenmp $(IDA_LIBS) \
  67. $(CANTERA_LIBS) $(GSL_LIBS)
  68. .PHONY: install
  69. install:
  70. cp $(EXE) $(DESTDIR)/$(EXE)
  71. .PHONY: clean
  72. clean:
  73. rm -f $(EXE) $(OBJS) *.d