From 5a3c35137ffdc6a55a06c364890913c53a83c2ed Mon Sep 17 00:00:00 2001 From: Zhentao Wang Date: Tue, 19 Sep 2017 13:26:23 -0400 Subject: [PATCH] Updated Makefiles on ACF --- examples/trans_absent/platform_acf/Makefile | 8 +++--- .../trans_absent/platform_acf/Makefile_intel | 20 ++++++++++++++ .../trans_symmetric/platform_acf/Makefile | 8 +++--- .../platform_acf/Makefile_intel | 20 ++++++++++++++ src/makefile_list/Makefile_acf_gcc_ILP64 | 26 +++++++++++++++++++ src/makefile_list/Makefile_acf_intel_ILP64 | 4 +-- 6 files changed, 76 insertions(+), 10 deletions(-) create mode 100644 examples/trans_absent/platform_acf/Makefile_intel create mode 100644 examples/trans_symmetric/platform_acf/Makefile_intel create mode 100644 src/makefile_list/Makefile_acf_gcc_ILP64 diff --git a/examples/trans_absent/platform_acf/Makefile b/examples/trans_absent/platform_acf/Makefile index 90e0293..78330d1 100644 --- a/examples/trans_absent/platform_acf/Makefile +++ b/examples/trans_absent/platform_acf/Makefile @@ -1,12 +1,12 @@ -CXX = icpc -CPPFLAGS = -O2 -std=c++11 -traceback -DMKL_ILP64 \ +CXX = g++ +CPPFLAGS = -O2 -std=c++11 -DMKL_ILP64 -m64 \ -I ${HOME}/installs/include \ -isystem ${MKLROOT}/include \ -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig LIBS = -L ${HOME}/installs/lib -lqbasis \ -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ - -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ - -L /sw/acf/boost/1.64.0/centos7.3_binary/lib -lboost_filesystem -lboost_system + -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ + -L${HOME}/installs/lib -lboost_filesystem -lboost_system include ../object_list.txt diff --git a/examples/trans_absent/platform_acf/Makefile_intel b/examples/trans_absent/platform_acf/Makefile_intel new file mode 100644 index 0000000..bde09d1 --- /dev/null +++ b/examples/trans_absent/platform_acf/Makefile_intel @@ -0,0 +1,20 @@ +CXX = icpc +CPPFLAGS = -O2 -std=c++11 -traceback -DMKL_ILP64 \ + -I ${HOME}/installs/include \ + -isystem ${MKLROOT}/include \ + -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig +LIBS = -L ${HOME}/installs/lib -lqbasis \ + -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ + -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ + -L${HOME}/installs/lib -lboost_filesystem -lboost_system + +include ../object_list.txt + +all: $(EXEC) + @echo '************ COMPILED! ************' + +%.x: %.cc + $(CXX) $(CPPFLAGS) $< $(LIBS) -o $@ + +clean: + $(RM) *.o *.x diff --git a/examples/trans_symmetric/platform_acf/Makefile b/examples/trans_symmetric/platform_acf/Makefile index 90e0293..78330d1 100644 --- a/examples/trans_symmetric/platform_acf/Makefile +++ b/examples/trans_symmetric/platform_acf/Makefile @@ -1,12 +1,12 @@ -CXX = icpc -CPPFLAGS = -O2 -std=c++11 -traceback -DMKL_ILP64 \ +CXX = g++ +CPPFLAGS = -O2 -std=c++11 -DMKL_ILP64 -m64 \ -I ${HOME}/installs/include \ -isystem ${MKLROOT}/include \ -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig LIBS = -L ${HOME}/installs/lib -lqbasis \ -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ - -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ - -L /sw/acf/boost/1.64.0/centos7.3_binary/lib -lboost_filesystem -lboost_system + -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ + -L${HOME}/installs/lib -lboost_filesystem -lboost_system include ../object_list.txt diff --git a/examples/trans_symmetric/platform_acf/Makefile_intel b/examples/trans_symmetric/platform_acf/Makefile_intel new file mode 100644 index 0000000..bde09d1 --- /dev/null +++ b/examples/trans_symmetric/platform_acf/Makefile_intel @@ -0,0 +1,20 @@ +CXX = icpc +CPPFLAGS = -O2 -std=c++11 -traceback -DMKL_ILP64 \ + -I ${HOME}/installs/include \ + -isystem ${MKLROOT}/include \ + -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig +LIBS = -L ${HOME}/installs/lib -lqbasis \ + -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ + -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ + -L${HOME}/installs/lib -lboost_filesystem -lboost_system + +include ../object_list.txt + +all: $(EXEC) + @echo '************ COMPILED! ************' + +%.x: %.cc + $(CXX) $(CPPFLAGS) $< $(LIBS) -o $@ + +clean: + $(RM) *.o *.x diff --git a/src/makefile_list/Makefile_acf_gcc_ILP64 b/src/makefile_list/Makefile_acf_gcc_ILP64 new file mode 100644 index 0000000..90c7c46 --- /dev/null +++ b/src/makefile_list/Makefile_acf_gcc_ILP64 @@ -0,0 +1,26 @@ +CXX = g++ +CPPFLAGS = -O2 -std=c++11 -Wall -Wextra -DMKL_ILP64 -m64 -fopenmp \ + -isystem ${MKLROOT}/include \ + -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig \ + -isystem ${HOME}/installs/include +LIBS = -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ + -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ + -fopenmp \ + -L${HOME}/installs/lib -lboost_filesystem -lboost_system + +include makefile_list/object_list.txt + +test: $(OBJS) test.o test_basis.o test_lanczos.o test_lattice.o test_operator.o + $(CXX) $(OBJS) test.o test_basis.o test_lanczos.o test_lattice.o test_operator.o $(LIBS) -o ../bin/test.x + +libqbasis.a: $(OBJS) + ar rvs libqbasis.a $(OBJS) + +install: libqbasis.a + $(RM) ${HOME}/installs/lib/libqbasis.*; cp libqbasis.a ${HOME}/installs/lib; cp qbasis.h ${HOME}/installs/include + +%.o: %.cc + $(CXX) $(CPPFLAGS) -c -o $@ $< + +clean: + $(RM) *.o diff --git a/src/makefile_list/Makefile_acf_intel_ILP64 b/src/makefile_list/Makefile_acf_intel_ILP64 index 9b6f21e..bc92ef5 100644 --- a/src/makefile_list/Makefile_acf_intel_ILP64 +++ b/src/makefile_list/Makefile_acf_intel_ILP64 @@ -2,11 +2,11 @@ CXX = icpc CPPFLAGS = -O2 -std=c++11 -traceback -w3 -wd383,981 -DMKL_ILP64 -qopenmp \ -isystem ${MKLROOT}/include \ -isystem ${HOME}/opt/arpackpp/include -isystem ${HOME}/opt/arpackpp/examples/areig \ - -isystem /sw/acf/boost/1.64.0/centos7.3_binary/include + -isystem ${HOME}/installs/include LIBS = -L${HOME}/opt/ARPACK_ILP64 -larpack -lgfortran \ -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl \ -qopenmp \ - -L /sw/acf/boost/1.64.0/centos7.3_binary/lib -lboost_filesystem -lboost_system + -L${HOME}/installs/lib -lboost_filesystem -lboost_system include makefile_list/object_list.txt