# Settings for compilation on naraku at the Open University. # (Not tested on any other machine currently) # JMC December 2009 /MAL 2011 # First section is for compilation with ifort version 11 and a hand-compiled arpack library to avoid # inconsistencies (found to be necessary in October 2009) # Now contains alternative compiler settings and library paths (both arpack and mkl) for producing # executables that use 64-bit integers rather than the default 32-bit integers. It requires some # commenting out and uncommenting by hand to swap between them for now -- sorry! (May 2010) # MAL 17/06/2011: If the 'arpack' library (which is in the public # domain) is linked to optimized 'lapack' and 'blas' libraries # at 'arpack' compilation time, 'scatci' will run more efficiently. # # For example, a suggestion for flags for the linking of 'arpack' # to Intel's 'mkl' library is as follows: # -O3 -static-intel -parallel -par-threshold0 -mkl=parallel # # It should be noted that the current version of scatci will work only # with a 32-bit integer version of arpack. If users are interested # in using a 64-bit integer compiled version of arpack, the code # can be easily adapted, but resulting executables may run more # slowly. # # The second section is for coverage analysis using gcov and gfortran. #COMP=ifort -check all -stand f95 -fpe0 #COMP=ifort -fpe0 #COMP2=ifort -fpe0 # The line below is for compilation with 64-bit integers COMP=ifort -i8 COMP2=ifort -i8 COMP3=ifort -fpe0 -i8 LINK=ifort -mkl LINK2=ifort -O3 -static-intel -parallel -par-threshold0 -qopenmp LINK3 = ifort OPT=-O3 -traceback #-debug full -traceback -check all #-O3 -traceback # -check all OPT2=-O OPT3=-O3 -static-intel -parallel -par-threshold0 -qopenmp OPT4=-static-intel -O3 -static-intel # -debug full -traceback -check all #-O3 -static-intel OPT64I=-i8 NOOPT=-O0 # The following libraries should be included: # Lapack and blas here: #MKLROOT =/opt/intel/compilers_and_libraries_2017.1.132/linux/mkl/lib/intel64_lin #MKLROOT =/opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin #MKLROOT =/opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64 #MKLROOT=/opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin MKLROOT=/opt/intel/mkl/lib/intel64 ARPCK_ROOT=/home/user/Desktop/UKRMOL-IN/lib ############################################################################################################################# #STATIC MKL LIBRARIES: # static, no threading, 32-bit (default) integers: #LIB=-Wl,--start-group $(MKLROOT)/libmkl_intel_lp64.a $(MKLROOT)/libmkl_sequential.a \ #$(MKLROOT)/libmkl_core.a -Wl,--end-group -L$(MKLROOT)/ -lpthread # static, threading, 32-bit (default) integers: #LIB=-Wl,--start-group $(MKLROOT)/libmkl_intel_lp64.a $(MKLROOT)/libmkl_intel_thread.a \ #$(MKLROOT)/libmkl_core.a -Wl,--end-group -L$(MKLROOT)/-lguide -lpthread # static, no threading, 64bit integers #LIB=-Wl,--start-group $(MKLROOT)/libmkl_intel_ilp64.a $(MKLROOT)/libmkl_sequential.a \ #$(MKLROOT)/libmkl_core.a -Wl,--end-group -L$(MKLROOT)/ -lpthread LIB=-Wl,--start-group ${MKLROOT}/libmkl_intel_ilp64.a ${MKLROOT}/libmkl_sequential.a \ ${MKLROOT}/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl # static, threading, 64bit integers #LIB=-Wl,--start-group $(MKLROOT)/libmkl_intel_ilp64.a $(MKLROOT)/libmkl_intel_thread.a \ #$(MKLROOT)/libmkl_core.a -Wl,--end-group -L$(MKLROOT)/ -lguide -lpthread ############################################################################################################### #For SCATCI compilation # The default compilation for SCATCI will compile a 64 bit integer, static, threaded version of the code. #If different options are required, these can be chosen above and LIB2 should then be set equal to LIB. # Notice that the options for different version of the ARPACK library are selected below. ################################################################################################################### # scatci will be compiled static, threading, 64bit integers LIB2=-Wl,--start-group $(MKLROOT)/libmkl_intel_ilp64.a $(MKLROOT)/libmkl_intel_thread.a \ $(MKLROOT)/libmkl_core.a -Wl,--end-group -L$(MKLROOT)/ -liomp5 -lpthread -lm -ldl # if scatci is to be compiled different from above #LIB2=$(LIB) ################################################################################################################### # Unoptimized Arpack here: # version compiled for 32-bit integers: #LIBAR= -L/home/physastro/jcarr/ARPACK -larpack_LINUX # version compiled for 64-bit integers: #LIBAR= -L/home/physastro/jcarr/ARPACK -larpack_LINUX64BIT LIBAR= -L/home/user/Desktop/test-UKRMOL-IN/lib -larpack ################################################################################################################### # ARPACK compiled for 32-bit integers by PGG using threaded mkl libraries (optimized arpack library) # For use when linking to static mkl libraries (32 bit integer): #LIBAR=-Wl,--start-group $(MKLROOT)/libmkl_intel_lp64.a $(MKLROOT)/libmkl_intel_thread.a \ $(MKLROOT)/libmkl_core.a -L$(ARPCK_ROOT) -larpack -Wl,--end-group -L$(MKLROOT)/ -liomp5 -lpthread -lm -ldl # For use when linking to dynamic mkl libraries: #LIBAR=-L$(ARPCK_ROOT) -larpack_intel ################################################################################################################## # Settings to build executables for coverage analysis using gcov and a compiler from the gcc family (here gfortran, # but g95 could be used instead). # Optimization is turned off so that the compiler doesn't do fancy things to the source like reordering lines. # The compiler flag --coverage is appropriate for compiler versions 4 and above, and will expand to whatever is # necessary for coverage analysis with gcov. # Use "-fprofile-arcs -ftest-coverage" instead of --coverage for older versions of the compiler. #COMP= gfortran #LINK= gfortran --coverage # #OPT= --coverage -O0 #NOOPT= --coverage -O0 # ## Appropriately compiled Arpack library: #LIBAR= -L/home/physastro/jcarr/ARPACK -larpack_GCC-COVERAGE # ## and don't forget the usual lapack/blas libraries...