Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
added Intel advisor commandline script
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Apr 13, 2021
1 parent 5ef47cf commit 95c9fd5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ SWIFTEST_MODULES = swiftest_globals.f90 \
include Makefile.Defines

MODULES = $(SWIFTEST_MODULES) $(USER_MODULES)
IADVIXE = ${ADVISOR_2019_DIR}/include/intel64
LADVIXE = ${ADVISOR_2019_DIR}/lib64

.PHONY : all mod lib libdir drivers bin clean force

% : %.f90 force
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include $< -o $@ \
-L$(SWIFTEST_HOME)/lib -lswiftest
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include -I$(IADVIXE) $< -o $@ \
-L$(SWIFTEST_HOME)/lib -L$(LADVIXE) -lswiftest -ladvisor
$(INSTALL_PROGRAM) $@ $(SWIFTEST_HOME)/bin
rm -f $@

Expand All @@ -75,7 +77,7 @@ all:

mod:
cd $(SWIFTEST_HOME)/src/modules/; \
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include -c $(MODULES); \
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include -I$(IADVIXE) -c $(MODULES); \
$(AR) rv $(SWIFTEST_HOME)/lib/libswiftest.a *.o; \
$(INSTALL_DATA) *.mod *.smod $(SWIFTEST_HOME)/include; \
rm -f *.o *.mod *.smod
Expand Down Expand Up @@ -158,7 +160,7 @@ lib:
make libdir

libdir:
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include -c *.f90; \
$(FORTRAN) $(FFLAGS) -I$(SWIFTEST_HOME)/include -I$(IADVIXE) -c *.f90; \
$(AR) rv $(SWIFTEST_HOME)/lib/libswiftest.a *.o *.smod; \
$(INSTALL_DATA) *.smod $(SWIFTEST_HOME)/include; \
rm -f *.o *.smod
Expand Down
11 changes: 4 additions & 7 deletions Makefile.Defines
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ VTUNE_FLAGS = -g -O2 -vec -simd -shared-intel -qopenmp -debug inline-debug-info
IDEBUG = -O0 -warn all -nogen-interfaces -no-pie -no-ftz -fpe-all=0 -g -traceback -mp1 -fp-model strict -fpe0 -debug all -align all -pad -ip -prec-div -prec-sqrt -assume protect-parens -CB -no-wrap-margin

STRICTREAL = -mp1 -fp-model strict -prec-div -prec-sqrt -ftz -assume protect-parens
SIMDVEC = -vec -simd -xhost -align all -assume contiguous_assumed_shape -vecabi=cmdtarget
SIMDVEC = -vec -simd -xCORE-AVX2 -fma -align all -assume contiguous_assumed_shape -vecabi=cmdtarget
PAR = -parallel -qopenmp
HEAPARR = -heap-arrays 1048576
OPTIMIZE = -qopt-report=5

#FFLAGS = -init=snan,arrays -traceback -no-wrap-margin -O3 -g -CB -nogen-interfaces -no-pie -fp-speculation=safe $(SIMDVEC) $(PAR) #$(HEAPARR)
FORTRAN = ifort
#FFLAGS = $(IDEBUG)
FFLAGS = -init=snan,arrays -traceback -no-wrap-margin -O2 -g -shared-intel -debug inline-debug-info $(SIMDVEC) $(STRICTREAL)
FFLAGS = -init=snan,arrays -traceback -no-wrap-margin -O3 -g -shared-intel -debug inline-debug-info -qopt-report=5 $(SIMDVEC) $(STRICTREAL)


GDEBUG = -ggdb -g3 -Og -fbacktrace -fbounds-check -fcheck=all -ffpe-trap=zero,invalid,overflow,underflow,denormal
Expand All @@ -72,15 +72,12 @@ GMEM = -fsanitize=undefined -fsanitize=address -fsanitize=leak
GWARNINGS = -Wall -Warray-bounds -Wimplicit-interface -Wextra -Warray-temporaries


#FORTRAN = gfortran
#FFLAGS = -ffree-line-length-none $(GDEBUG) $(GMEM)
AR = ar

# DO NOT include in CFLAGS the "-c" option to compile object only
# this is done explicitly as needed in the Makefile

#CC = icc
CC = cc
CC = icc
#CC = cc
CFLAGS = -O3 -w -m64 -std=c99

64_BIT_REALS = -r8
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
/apps/cent7/intel/advisor_2019.3.0.591490/bin64/advixe-cl -collect survey -module-filter-mode=exclude -mrte-mode=managed -interval=10 -data-limit=500 -stackwalk-mode=offline -stack-stitching -mkl-user-mode -no-profile-python -no-support-multi-isa-binaries -no-spill-analysis -no-static-instruction-mix -auto-finalize -project-dir /home/daminton/git/swiftest/examples/rmvs_swifter_comparison/mars_ejecta/ --search-dir sym:p=/home/daminton/git/swiftest --search-dir bin:p=/home/daminton/git/swiftest --search-dir src:rp=/home/daminton/git/swiftest -- /home/daminton/git/swiftest/bin/swiftest_driver rmvs /home/daminton/git/swiftest/examples/rmvs_swifter_comparison/mars_ejecta/config.swiftest.in

0 comments on commit 95c9fd5

Please sign in to comment.