Makefiles adjusted to enable builds on DAS5
This commit is contained in:
parent
4a9ec04c3a
commit
01c3dabc25
|
@ -1,24 +1,27 @@
|
|||
OUTPUT=
|
||||
CXX=g++
|
||||
CXXFLAGS=-O3 -Wall -g #-pg #-fnostack-protector
|
||||
CASA_LIBDIR=/opt/casacore/lib
|
||||
CASA_INCDIR=-I/opt/casacore/include/ -I/opt/casacore/include/casacore
|
||||
# CASA_LIBDIR=-L/cm/shared/package/casacore/v2.1.0-gcc-4.9.3/lib -L/cm/shared/package/cfitsio/3380-gcc-4.9.3/lib -L/cm/shared/package/lapack/3.6.0-gcc-4.9.3/lib64
|
||||
CASA_LIBDIR=-L/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/lib
|
||||
# CASA_INCDIR=-I/cm/shared/package/casacore/v2.3.0-g++-4.9.3/include -I/cm/shared/package/casacore/v2.3.0-g++-4.9.3/include/casacore
|
||||
CASA_INCDIR=-I/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/include -I/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/include/casacore
|
||||
CASA_LIBS=-lcasa_casa -lcasa_tables -lcasa_measures -lcasa_ms -lcfitsio
|
||||
#LAPACK=-llapack -lblas
|
||||
LAPACK=-lopenblas -lgfortran -lpthread
|
||||
LAPACK_DIR=/usr/local/OpenBLAS/lib/
|
||||
# LAPACK_DIR=/cm/shared/apps/openblas/0.2.8/lib
|
||||
#LAPACK_DIR=/usr/lib/atlas/sse/
|
||||
|
||||
LDFLAGS=-Wl,--rpath,/usr/local/OpenBLAS/lib/,--rpath,${CASA_LIBDIR}
|
||||
LDFLAGS=-Wl,--rpath-link,${CASA_LIBDIR}
|
||||
# LDFLAGS=-Wl,--rpath,/cm/shared/package/openblas/0.2.17mt/lib
|
||||
#LDFLAGS=-Wl,-t,--rpath,/software/users/lofareor/SW/lib64
|
||||
# -Wl,--hash-style=both
|
||||
|
||||
MY_LIBS=-lm -lsagecal
|
||||
INCLUDES=-I. -I./lib $(CASA_INCDIR) -I/usr/include
|
||||
LIBPATH=-L$(LAPACK_DIR) -L$(CASA_LIBDIR) -L./lib
|
||||
LIBPATH=$(CASA_LIBDIR) -L./lib -L/cm/shared/package/openblas/0.2.17mt/lib -L/cm/shared/package/cfitsio/3380-gcc-4.9.3/lib
|
||||
|
||||
#### glib
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/lib64/glib-2.0/include
|
||||
GLIBL=-lglib-2.0
|
||||
|
||||
|
||||
|
@ -29,6 +32,6 @@ main.o:main.cpp
|
|||
data.o:data.cpp data.h
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(GLIBI) -c $<
|
||||
sagecal:$(OBJECTS) ./lib/libsagecal.a
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) $(GLIBI) $(LIBPATH) -o $@ $(OBJECTS) $(MY_LIBS) $(LAPACK) $(CASA_LIBS) $(GLIBL)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) $(GLIBI) $(LIBPATH) -o $@ $(OBJECTS) $(MY_LIBS) $(LAPACK) $(CASA_LIBS) $(GLIBL)
|
||||
clean:
|
||||
rm *.o *.tmp *.fits
|
||||
rm *.o
|
||||
|
|
|
@ -1,34 +1,33 @@
|
|||
OUTPUT=
|
||||
CXX=g++
|
||||
CXXFLAGS=-O3 -Wall -g -DHAVE_CUDA
|
||||
CASA_LIBDIR=/opt/casacore/lib
|
||||
CASA_INCDIR=-I/opt/casacore/include/ -I/opt/casacore/include/casacore
|
||||
CASA_LIBDIR=/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/lib
|
||||
CASA_INCDIR=/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/include -I/cm/shared/package/casacore/v2.3.0-gcc-4.9.3/include/casacore
|
||||
CASA_LIBS=-lcasa_casa -lcasa_tables -lcasa_measures -lcasa_ms -lcfitsio
|
||||
#LAPACK=-llapack -lblas
|
||||
LAPACK=-lopenblas -lgfortran -lpthread
|
||||
LAPACK_DIR=/usr/local/OpenBLAS/lib/
|
||||
#LAPACK_DIR=/usr/local/OpenBLAS/lib/
|
||||
#LAPACK_DIR=/usr/lib/atlas/sse/
|
||||
|
||||
CUDAINC=-I/usr/local/cuda/include
|
||||
CUDALIB=-L/usr/local/cuda/lib64 -lcuda -lcudart
|
||||
|
||||
CULALIB=-lcublas -lcusolver
|
||||
# CUDAINC=-I/usr/local/cuda/include
|
||||
# CUDALIB=-L/usr/local/cuda/lib64 -lcuda -lcudart
|
||||
CUDAINC=-I/cm/shared/apps/cuda80/toolkit/8.0.44/include/
|
||||
CUDALIB=-lcuda -lcudart -lcublas -lcusolver -lcudadevrt
|
||||
# NVML
|
||||
NVML_INC=/usr/include/nvidia/gdk/
|
||||
NVML_LIB=-lnvidia-ml -L/usr/lib64/nvidia/
|
||||
|
||||
|
||||
LDFLAGS=-Wl,--rpath,/usr/local/OpenBLAS/lib/
|
||||
LDFLAGS=-Wl,--rpath,$(CASA_LIBDIR),--rpath,/cm/shared/apps/cuda80/toolkit/8.0.44/lib64/
|
||||
#LDFLAGS=-Wl,-t,--rpath,/software/users/lofareor/SW/lib64
|
||||
# -Wl,--hash-style=both
|
||||
|
||||
# with multithread FFTW
|
||||
MY_LIBS=-lm -lsagecal
|
||||
INCLUDES=-I. -I./lib $(CASA_INCDIR) -I/usr/include $(CUDAINC) -I$(NVML_INC)
|
||||
LIBPATH=-L$(LAPACK_DIR) -L$(CASA_LIBDIR) -L./lib
|
||||
INCLUDES=-I. -I./lib -I$(CASA_INCDIR) -I/usr/include $(CUDAINC) -I$(NVML_INC)
|
||||
LIBPATH=-L$(CASA_LIBDIR) -L./lib -L/cm/shared/package/openblas/0.2.17mt/lib -L/cm/shared/package/cfitsio/3380-gcc-4.9.3/lib
|
||||
|
||||
#### glib
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/lib64/glib-2.0/include
|
||||
GLIBL=-lglib-2.0
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ INCLUDES= -I.
|
|||
LIBPATH=
|
||||
|
||||
#### glib
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/lib64/glib-2.0/include
|
||||
GLIBL=-lglib-2.0
|
||||
|
||||
OBJECTS=readsky.o dataio.o predict.o lmfit_nocuda.o clmfit_nocuda.o lbfgs_nocuda.o myblas.o residual.o robustlm.o updatenu.o robust_lbfgs_nocuda.o rtr_solve.o rtr_solve_robust.o manifold_average.o consensus_poly.o rtr_solve_robust_admm.o admm_solve.o transforms.o stationbeam.o predict_withbeam.o mdl.o
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
CC=gcc
|
||||
CXX=g++
|
||||
NVCC=nvcc
|
||||
CFLAGS= -Wall -O3 -g -DHAVE_CUDA -DHYBRID_CODE
|
||||
CLIBS= -lm -lpthread
|
||||
LAPACK=-L/usr/local/OpenBLAS/lib/ -lopenblas -lgfortran -lpthread
|
||||
# LAPACK=-L/usr/local/OpenBLAS/lib/ -lopenblas -lgfortran -lpthread
|
||||
LAPACK=-lopenblas -lgfortran -lpthread
|
||||
|
||||
CUDAINC=/usr/local/cuda/include
|
||||
CUDALIB=-L/usr/local/cuda/lib64 -lcuda -lcudart
|
||||
NVCC=/usr/local/cuda/bin/nvcc
|
||||
# CUDAINC=/usr/local/cuda/include
|
||||
# CUDAINC=/usr/local/cuda/include
|
||||
# CUDALIB=-L/usr/local/cuda/lib64 -lcuda -lcudart
|
||||
CUDALIB=-lcuda -lcudart
|
||||
# NVCC=/usr/local/cuda/bin/nvcc
|
||||
#NVCFLAGS=-arch=sm_35 -g -G --ptxas-options=-v -O3
|
||||
NVCFLAGS=-arch=sm_35 --ptxas-options=-v -O3
|
||||
# NVCFLAGS=-arch=sm_35 --ptxas-options=-v -O3
|
||||
|
||||
NVCFLAGS=-gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 --ptxas-options=-v -O3
|
||||
|
||||
|
||||
#### glib
|
||||
GLIBI=-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include/
|
||||
|
@ -22,7 +29,7 @@ INCLUDES= -I. -I$(CUDAINC) -I$(NVML_INC)
|
|||
LIBPATH= $(CUDALIB)
|
||||
|
||||
|
||||
OBJECTS=readsky.o dataio.o predict.o lmfit.o lbfgs.o myblas.o mderiv.o clmfit.o clmfit_nocuda.o residual.o barrier.o robust.o robustlm.o oslmfit.o mderiv_fl.o clmfit_fl.o updatenu.o robust_lbfgs_nocuda.o robust_fl.o manifold_fl.o rtr_solve_cuda.o rtr_solve_robust_cuda.o diagnostics.o diag_fl.o manifold_average.o consensus_poly.o rtr_solve_robust_cuda_admm.o rtr_solve_robust_admm.o admm_solve.o load_balance.o transforms.o stationbeam.o predict_withbeam.o predict_withbeam_gpu.o predict_model.o predict_model_device.omdl.o
|
||||
OBJECTS=readsky.o dataio.o predict.o lmfit.o lbfgs.o myblas.o mderiv.o clmfit.o clmfit_nocuda.o residual.o barrier.o robust.o robustlm.o oslmfit.o mderiv_fl.o clmfit_fl.o updatenu.o robust_lbfgs_nocuda.o robust_fl.o manifold_fl.o rtr_solve_cuda.o rtr_solve_robust_cuda.o diagnostics.o diag_fl.o manifold_average.o consensus_poly.o rtr_solve_robust_cuda_admm.o rtr_solve_robust_admm.o admm_solve.o load_balance.o transforms.o stationbeam.o predict_withbeam.o predict_withbeam_gpu.o predict_model.o
|
||||
|
||||
|
||||
default:libsagecal.a
|
||||
|
@ -94,11 +101,8 @@ predict_withbeam.o:predict_withbeam.c
|
|||
$(CC) $(CFLAGS) $(INCLUDES) $(GLIBI) -c $<
|
||||
predict_withbeam_gpu.o:predict_withbeam_gpu.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(GLIBI) -c $<
|
||||
## for dynamic parallelism, two stage compilation
|
||||
predict_model.o:predict_model_device.o
|
||||
$(NVCC) $(NVCFLAGS) -lineinfo -dlink $(INCLUDES) $(GLIBI) -o $@ $<
|
||||
predict_model_device.o:predict_model.cu
|
||||
$(NVCC) $(NVCFLAGS) -lineinfo -rdc=true $(INCLUDES) $(GLIBI) -o $@ -c $<
|
||||
predict_model.o:predict_model.cu
|
||||
$(NVCC) $(NVCFLAGS) $(INCLUDES) $(GLIBI) -c $<
|
||||
mdl.o:mdl.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(GLIBI) -c $<
|
||||
|
||||
|
|
Loading…
Reference in New Issue