Skip to content
Makefile 3.02 KiB
Newer Older
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
# Gaia GSRPar Makefile

Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
JOB_SCHED_VERSION=-smp
CFLAGS_I = --instrument
EXTRA = -std=c99 -O3 -Wall -Wno-unused -mcmodel=large 

BASE_DIR= /home/fvitello/ompss-ee-master

COMMON_DIR=$(BASE_DIR)/common-files
CONFIG_DIR=.config

GFLAGS=

PARAVER=extrae.xml trace.sh
SCRIPTS=run-once.sh multirun.sh

MPI_CHECK=$(MPI_LIB_DIR)/libmpi.so
MKL_CHECK=$(MKL_LIB_DIR)/libmkl_sequential.so
ATLAS_CHECK=$(ATLAS_LIB_DIR)/libatlas.a


COMPILER = /opt/ompss/bin/mcc
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
##COMPILER = /opt/openmpi_icc/bin/mpic++ 
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
COMPILERCPP =  /opt/ompss/bin/mcxx --ompss -DOMP
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
##COMPILERCPP =  /opt/openmpi_icc/bin/mpic++ 

CC = $(COMPILERCPP)
CPP= $(COMPILERCPP)


CFITSIOLIB=/opt/cfitsio3_1_0/lib




GAIAINC=/home-volume/ube/Gaia/ParallelCodeV7/src7.2



GAIAGSR= aprod.o  lsqrblas.o  lsqr.o  solvergaia.o util.o  
GAIAGSRSIM= aprod.o  lsqrblas.o  lsqr.o  solvergaiaSim.o util.o  
GAIAGSRFits2Bin= fits2bin.o   util.o lsqrblas.o 
GAIAGSRBin2Fits= bin2fits.o 
GAIAGSRBin2Reduced= bin2reduced.o util.o lsqrblas.o 
GAIAGSRCkEmptyCols= util.o ckemptycols.o lsqrblas.o 
GAIAGSRBin2Asc=   bin2asc.o  
GAIAGSRChTask= changeTask.o
GAIAGSRRepairTask= ripristino.o
MEMREQ= memRequest.o  



Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
INCLUDE = -I$(GAIAINC) -I/opt/local/include -I/opt/openmpi_icc/include/ -I/opt/cfitsio3_1_0/include/ -I/opt/openmpi/include -pthread
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
#INCLUDE = -I$(GAIAINC) 
#CFLAGS= $(INCLUDE)  -std=c99 
CPPFLAGS= $(INCLUDE)   -g -fsanitize=address -mllvm -asan-stack
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
CPPFLAGS= $(INCLUDE)   $(CFLAGS_I) $(EXTRA)
LIB = 	-pthread -L/usr/local/pbspro/lib -Wl,-rpath -Wl,/usr/local/pbspro/lib -Wl,-rpath -Wl,/opt/openmpi/lib -Wl,--enable-new-dtags -L/opt/openmpi/lib -lmpi	 -L$(CFITSIOLIB) -lcfitsio -lm
all:	GaiaGsrParSim
####all: GaiaGsrPar MemReq GaiaGsrParSim GaiaFits2Bin GaiaBin2Fits GaiaBin2Reduced GaiaCkEmptyCols GaiaBin2Asc   GaiaChTask GaiaRepTask
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
###all: GaiaGsrPar MemReq GaiaGsrParTest GaiaFits2Bin GaiaBin2Fits GaiaBin2Reduced 

ckemptycols.o: ckemptycols.cpp
	$(CPP) $(CPPFLAGS)  -c ckemptycols.cpp
	
bin2fits.o: bin2fits.cpp
	$(CPP) $(CPPFLAGS)  -c bin2fits.cpp

bin2asc.o: bin2asc.cpp
	$(CPP) $(CPPFLAGS)  -c bin2asc.cpp



GaiaGsrPar: $(GAIAGSR)
	$(CPP) $(CPPFLAGS) -o GaiaGsrPar $(GAIAGSR) $(INCLUDE) $(LIB)

MemReq: $(MEMREQ)
	$(CPP) $(CPPFLAGS) -o MemReq $(MEMREQ) $(INCLUDE) $(LIB)

GaiaGsrParSim: $(GAIAGSRSIM)
	$(CPP) $(CPPFLAGS) -o GaiaGsrParSim $(GAIAGSRSIM) $(INCLUDE) $(LIB)

GaiaFits2Bin: $(GAIAGSRFits2Bin)
	$(CPP) $(CPPFLAGS) -o GaiaFits2Bin $(GAIAGSRFits2Bin) $(INCLUDE) $(LIB)

GaiaBin2Fits: $(GAIAGSRBin2Fits)
	$(CPP) $(CPPFLAGS) -o GaiaBin2Fits $(GAIAGSRBin2Fits) $(INCLUDE) $(LIB)
	
GaiaBin2Reduced: $(GAIAGSRBin2Reduced)
	$(CPP) $(CPPFLAGS) -o GaiaBin2Reduced $(GAIAGSRBin2Reduced) $(INCLUDE) $(LIB)

GaiaBin2Asc: $(GAIAGSRBin2Asc)
	$(CPP) $(CPPFLAGS) -o GaiaBin2Asc $(GAIAGSRBin2Asc) $(INCLUDE) $(LIB)

	
GaiaCkEmptyCols: $(GAIAGSRCkEmptyCols)
	$(CPP) $(CPPFLAGS) -o GaiaCkEmptyCols $(GAIAGSRCkEmptyCols)   $(LIB)

GaiaChTask: $(GAIAGSRChTask)
	$(CPP)  -o GaiaChTask $(GAIAGSRChTask)   $(LIB)

GaiaRepTask: $(GAIAGSRRepairTask)
	$(CPP) $(CPPFLAGS) -o GaiaRepairTask $(GAIAGSRRepairTask)   $(LIB)
	
clean:
	rm -f *.o core