~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/MAKE/Makefile.tbird

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# tbird = Dell cluster with Xeons, Intel mpicxx, native MPI, FFTW
2
 
 
3
 
SHELL = /bin/sh
4
 
 
5
 
# this Makefile builds LAMMPS for openMPI running on Tbird
6
 
# as of April 09, you want these modules loaded, which are not the default:
7
 
#   mpi/openmpi-1.2.8_intel-11.0-f074-c074
8
 
#   misc/env-openmpi-1.2
9
 
#   compilers/intel-11.0-f074-c074
10
 
#   libraries/intel-mkl
11
 
#   libraries/intel_fftw-10.0.4.023
12
 
#   libraries/intel-mkl-11.0.074
13
 
# you can determine which modules are loaded by typing:
14
 
#   module list
15
 
# you can load these modules by putting
16
 
#   these lines in your .cshrc or other start-up shell file
17
 
#   or by typing them before you build LAMMPS:
18
 
#     module switch mpi mpi/openmpi-1.2.8_intel-11.0-f074-c074
19
 
#     module load libraries/intel_fftw-10.0.4.023
20
 
#     module load libraries/intel-mkl-11.0.074
21
 
# these same modules need to be loaded to submit a LAMMPS job,
22
 
#   either interactively or via a batch script
23
 
 
24
 
# ---------------------------------------------------------------------
25
 
# compiler/linker settings
26
 
# specify flags and libraries needed for your compiler
27
 
 
28
 
CC =            mpicxx
29
 
CCFLAGS =       -O
30
 
SHFLAGS =       -fPIC
31
 
DEPFLAGS =      -M
32
 
 
33
 
LINK =          mpicxx
34
 
LINKFLAGS =     -O
35
 
LIB =           -lstdc++ -lm
36
 
SIZE =          size
37
 
 
38
 
ARCHIVE =       ar
39
 
ARFLAGS =       -rc
40
 
SHLIBFLAGS =    -shared
41
 
 
42
 
# ---------------------------------------------------------------------
43
 
# LAMMPS-specific settings
44
 
# specify settings for LAMMPS features you will use
45
 
# if you change any -D setting, do full re-compile after "make clean"
46
 
 
47
 
# LAMMPS ifdef settings, OPTIONAL
48
 
# see possible settings in doc/Section_start.html#2_2 (step 4)
49
 
 
50
 
LMP_INC =       -DLAMMPS_GZIP
51
 
 
52
 
# MPI library, REQUIRED
53
 
# see discussion in doc/Section_start.html#2_2 (step 5)
54
 
# can point to dummy MPI library in src/STUBS as in Makefile.serial
55
 
# INC = path for mpi.h, MPI compiler settings
56
 
# PATH = path for MPI library
57
 
# LIB = name of MPI library
58
 
 
59
 
MPI_INC =       -DMPICH_SKIP_MPICXX 
60
 
MPI_PATH = 
61
 
MPI_LIB =       -lmpich -lpthread
62
 
 
63
 
# FFT library, OPTIONAL
64
 
# see discussion in doc/Section_start.html#2_2 (step 6)
65
 
# can be left blank to use provided KISS FFT library
66
 
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
67
 
# PATH = path for FFT library
68
 
# LIB = name of FFT library
69
 
 
70
 
FFT_INC =       -DFFT_FFTW -I$(FFTW_INCLUDE)
71
 
FFT_PATH = 
72
 
FFT_LIB =       $(BLASLIB) $(FFTW_LINK_LINE)
73
 
 
74
 
# JPEG and/or PNG library, OPTIONAL
75
 
# see discussion in doc/Section_start.html#2_2 (step 7)
76
 
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
77
 
# INC = path(s) for jpeglib.h and/or png.h
78
 
# PATH = path(s) for JPEG library and/or PNG library
79
 
# LIB = name(s) of JPEG library and/or PNG library
80
 
 
81
 
JPG_INC =       
82
 
JPG_PATH =      
83
 
JPG_LIB =       
84
 
 
85
 
# ---------------------------------------------------------------------
86
 
# build rules and dependencies
87
 
# no need to edit this section
88
 
 
89
 
include Makefile.package.settings
90
 
include Makefile.package
91
 
 
92
 
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
93
 
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
94
 
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
95
 
 
96
 
# Path to src files
97
 
 
98
 
vpath %.cpp ..
99
 
vpath %.h ..
100
 
 
101
 
# Link target
102
 
 
103
 
$(EXE): $(OBJ)
104
 
        $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
105
 
        $(SIZE) $(EXE)
106
 
 
107
 
# Library targets
108
 
 
109
 
lib:    $(OBJ)
110
 
        $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
111
 
 
112
 
shlib:  $(OBJ)
113
 
        $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
114
 
        $(OBJ) $(EXTRA_LIB) $(LIB)
115
 
 
116
 
# Compilation rules
117
 
 
118
 
%.o:%.cpp
119
 
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
120
 
 
121
 
%.d:%.cpp
122
 
        $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
123
 
 
124
 
# Individual dependencies
125
 
 
126
 
DEPENDS = $(OBJ:.o=.d)
127
 
sinclude $(DEPENDS)