diff --git a/src/MS/Makefile b/src/MS/Makefile index 066a15e..7191c84 100644 --- a/src/MS/Makefile +++ b/src/MS/Makefile @@ -1,24 +1,26 @@ OUTPUT= CXX=g++ -CXXFLAGS=-O3 -Wall -g #-pg #-fnostack-protector + +CXXFLAGS=-O3 -Wall -g -pg #-fnostack-protector # 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_LIBDIR=-L/cm/shared/package/casacore/v2.3.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_INCDIR=-I/cm/shared/package/casacore/v2.1.0-g++-4.9.3/include -I/cm/shared/package/casacore/v2.1.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=/cm/shared/apps/openblas/0.2.8/lib +LAPACK_DIR=/cm/shared/package/openblas/0.2.17mt/lib #LAPACK_DIR=/usr/lib/atlas/sse/ -LDFLAGS=-Wl,--rpath-link,${CASA_LIBDIR} -# LDFLAGS=-Wl,--rpath,/cm/shared/package/openblas/0.2.17mt/lib +LDFLAGS=-Wl,--rpath,/cm/shared/package/openblas/0.2.17mt/lib/,${CASA_LIBDIR} #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=$(CASA_LIBDIR) -L./lib -L/cm/shared/package/openblas/0.2.17mt/lib -L/cm/shared/package/cfitsio/3380-gcc-4.9.3/lib +MY_LIBS=-lm -ldirac -lsagecal +INCLUDES=-I. -I../lib/Dirac -I../lib/Radio $(CASA_INCDIR) -I/usr/include +LIBPATH=-L$(LAPACK_DIR) $(CASA_LIBDIR) -L../lib/Dirac -L../lib/Radio #### 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/ -I/usr/lib64/glib-2.0/include @@ -31,7 +33,8 @@ main.o:main.cpp $(CXX) $(CXXFLAGS) $(INCLUDES) $(GLIBI) -c $< 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) +sagecal:$(OBJECTS) ../lib/Radio/libsagecal.a ../lib/Dirac/libdirac.a + $(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) $(GLIBI) $(LIBPATH) -o $@ $(OBJECTS) $(MY_LIBS) $(LAPACK) $(CASA_LIBS) $(GLIBL) clean: - rm *.o + rm *.o *.tmp *.fits *.swp *.swo *.o *.output + diff --git a/src/MS/Makefile.gpu b/src/MS/Makefile.gpu index 6f503f1..0f3875b 100644 --- a/src/MS/Makefile.gpu +++ b/src/MS/Makefile.gpu @@ -1,33 +1,31 @@ OUTPUT= CXX=g++ -CXXFLAGS=-O3 -Wall -g -DHAVE_CUDA -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 +CXXFLAGS=-O3 -Wall -g -DHAVE_CUDA -pg -std=c++11 +CASA_LIBDIR=-L/cm/shared/package/casacore/v2.3.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_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=-llapack -lblas LAPACK=-lopenblas -lgfortran -lpthread -#LAPACK_DIR=/usr/local/OpenBLAS/lib/ +LAPACK_DIR=/cm/shared/package/openblas/0.2.17mt/lib #LAPACK_DIR=/usr/lib/atlas/sse/ -# 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 +CUDALIB=-L/cm/shared/apps/cuda80/toolkit/8.0.44/lib64/ -lcuda -lcudart + +CULALIB=-lcublas -lcusolver -lcudadevrt # NVML NVML_INC=/usr/include/nvidia/gdk/ NVML_LIB=-lnvidia-ml -L/usr/lib64/nvidia/ -# I should be able to compile with cuda90, but it cannot find -lnvidia-ml. -# However, that management library is in a system path, so it should be able to find it. -# Possibly the rpath below makes it impossible to find it, even when a cuda90 path is used. -LDFLAGS=-Wl,--rpath,$(CASA_LIBDIR),--rpath,/cm/shared/apps/cuda80/toolkit/8.0.44/lib64/ + +LDFLAGS=-Wl,--rpath,/cm/shared/package/openblas/0.2.17mt/lib,${CASA_LIBDIR} #LDFLAGS=-Wl,-t,--rpath,/software/users/lofareor/SW/lib64 # -Wl,--hash-style=both # with multithread FFTW -MY_LIBS=-lm -lsagecal -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 +MY_LIBS=-lm -lsagecal -ldirac +INCLUDES=-I. -I../lib/Dirac/ -I../lib/Radio/ $(CASA_INCDIR) -I/usr/include $(CUDAINC) -I$(NVML_INC) +LIBPATH=-L$(LAPACK_DIR) -L$(CASA_LIBDIR) -L../lib/Dirac/ -L../lib/Radio/ #### 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/ -I/usr/lib64/glib-2.0/include @@ -40,7 +38,7 @@ main.o:main.cpp $(CXX) $(CXXFLAGS) $(INCLUDES) $(GLIBI) -c $< data.o:data.cpp data.h $(CXX) $(CXXFLAGS) $(INCLUDES) $(GLIBI) -c $< -sagecal:$(OBJECTS) ./lib/libsagecal.a +sagecal:$(OBJECTS) ../lib/Radio/libsagecal.a ../lib/Dirac/libdirac.a $(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) $(GLIBI) $(LIBPATH) -o $@ $(OBJECTS) $(MY_LIBS) $(CASA_LIBS) $(GLIBL) $(LAPACK) $(CUDALIB) $(CULALIB) $(NVML_LIB) clean: rm *.o *.tmp *.fits