#************************************************************************* # Copyright (c) 2002 The University of Chicago, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # This file is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* # # $Log: Makefile.OAG,v $ # Revision 1.4 2008/08/11 18:15:20 shang # fixed a typo # # Revision 1.3 2008/08/11 15:31:40 shang # only compiles read, write, copy, convert2row, row2column # # Revision 1.2 2008/08/06 18:46:11 shang # added read.c write.c and copy.c # # Revision 1.1 2008/04/14 18:35:13 shang # first version. # # Revision 1.1 2007/10/09 15:01:31 shang # examples for using SDDS_MPI # # # FFLAGS = -O4 CMPLR = ANSI #RATIONAL = purify #RATIONAL = quantify #RATIONAL = purecov ifdef RATIONAL HOST_OPT = NO ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) CC = $(RATIONAL) -best-effort $($(ANSI)_$(CMPLR)) CXX = $(RATIONAL) -best-effort $($(CPLUSPLUS)_$(CXXCMPLR)) else CC = $(RATIONAL) -best-effort $(SPARCWORKS)/bin/cc CCC = $(RATIONAL) -best-effort $(SPARCWORKS)/bin/CC endif endif ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) PROD = read copy write row2column convert2row else PROD_HOST = read copy write row2column convert2row endif MPI=1 ifeq ($(MPI),1) USER_MPI_FLAGS = -DUSE_MPI=1 # 1 for parallel elegant, 0 for serial elegant USER_MPI_FLAGS = -DSDDS_MPI_IO=1 # USER_MPI_FLAGS += -DMASTER_READTITLE_ONLY #only master processor read the layout, total_rows, parameters and arrays, and then broadcast to others #OP_SYS_LDLIBS += -lmpe -llmpe # visualize the performance of the parallel elegant #USER_MPI_FLAGS+= -DUSE_MPE # user defined MPE event #USER_MPI_FLAGS+= -mpianim -L/usr/X11R6/lib -lX11 # animate MPI program in real-time #USER_MPI_FLAGS+= -DMPI_DEBUG # print debugging information for MPI #USER_MPI_FLAGS+= -DCHECKFLAGS=1 # if defined, check balance only at the beginning # or the particle number is changed MPI_PATH = $(wildcard /usr/local/software/mvapich2-gcc/bin /share/mpich2_smpd_nemesis/bin) #MPI_PATH = /share/mpich/ch_p4/bin CC = $(MPI_PATH)/mpicc $(USER_MPI_FLAGS) CCC = $(MPI_PATH)/mpicxx $(USER_MPI_FLAGS) endif USR_CFLAGS = -I$(EPICS_EXTENSIONS_INCLUDE) -I../../\ -DIEEE_MATH -DzLib USR_CFLAGS_DEFAULT = -DUNIX #USR_CFLAGS_Linux = -Df2cFortran #USR_CFLAGS_WIN32 = -DpgiFortran ifdef WIN32 USR_LIBS = oagphy mdbcommon matlib fftpack SDDSmpi rpnlib mdbmth namelist mdblib z fftpack z_DIR = $(EPICS_EXTENSIONS_LIB) else USR_LIBS = oagphy mdbcommon matlib fftpack SDDSmpi rpnlib mdbmth namelist mdblib SYS_PROD_LIBS_DEFAULT += z endif ifeq ($(HOST_ARCH),solaris) ACC_DEP_CFLAGS = -KPIC -v CCC_DEP_CFLAGS = -KPIC -v GCC_DEP_CFLAGS += -D__EXTENSIONS__ endif SDDS1_DIR = $(EPICS_EXTENSIONS_LIB) namelist_DIR = $(EPICS_EXTENSIONS_LIB) fftpack_DIR = $(EPICS_EXTENSIONS_LIB) mdbmth_DIR = $(EPICS_EXTENSIONS_LIB) matlib_DIR = $(EPICS_EXTENSIONS_LIB) mdblib_DIR = $(EPICS_EXTENSIONS_LIB) mdbcommon_DIR = $(EPICS_EXTENSIONS_LIB) rpnlib_DIR = $(EPICS_EXTENSIONS_LIB) oagphy_DIR = $(OAG_APPS)/lib/$(EPICS_HOST_ARCH) SDDS_MPI_DIR =$(OAG_APPS)/$(EPICS_HOST_ARCH) USR_LDFLAGS += -L$(OAG_APPS)/lib/$(EPICS_HOST_ARCH) test1$(EXE)_SRCS = test1.c ifdef DEBUG USR_CFLAGS += -DDEBUG endif