Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

openmp mkl ifort integer*8

jmlunice_fr
Beginner
636 Views
Hello,
we have a fortran code that works with openmp mkl libs (.lp64) with integer*4 on IA64 architecture,
but we're unable to make it working with integer*8. 'top' then 'H' shows only one thread ?
here are the 'ldd' for both i4 and i8 compiled code:
user1@math8:/workspace/cassam/CONVIV/trunk/Test/CH4_DM_Hrot_eff> ldd ../../Source/conviv.exe
linux-gate.so.1 => (0xa000000000000000)
libmkl_intel_lp64.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_intel_lp64.so (0x2000000000050000)
libmkl_intel_thread.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_intel_thread.so (0x2000000000630000)
libmkl_core.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_core.so (0x2000000001b60000)
libpthread.so.0 => /lib/libpthread.so.0 (0x2000000001cf0000)
libimf.so.6 => /opt/intel/Compiler/11.1/056/lib/ia64/libimf.so.6 (0x2000000001d30000)
libm.so.6.1 => /lib/libm.so.6.1 (0x2000000002000000)
libiomp5.so => /opt/intel/Compiler/11.1/056/lib/ia64/libiomp5.so (0x20000000020d0000)
libc.so.6.1 => /lib/libc.so.6.1 (0x20000000021e0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2000000002450000)
libdl.so.2 => /lib/libdl.so.2 (0x2000000002480000)
libunwind.so.7 => /lib/libunwind.so.7 (0x20000000024a0000)
/lib/ld-linux-ia64.so.2 (0x2000000000000000)
user1@math8:/workspace/cassam/CONVIV/trunk/Test/CH4_DM_Hrot_eff> ldd ../../Source/Source_i8/conviv.exe
linux-gate.so.1 => (0xa000000000000000)
libmkl_intel_ilp64.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_intel_ilp64.so (0x2000000000050000)
libmkl_intel_thread.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_intel_thread.so (0x2000000000440000)
libmkl_core.so => /opt/intel/mkl/10.2.2.025/lib/64/libmkl_core.so (0x2000000001970000)
libpthread.so.0 => /lib/libpthread.so.0 (0x2000000001b00000)
libimf.so.6 => /opt/intel/Compiler/11.1/056/lib/ia64/libimf.so.6 (0x2000000001b40000)
libm.so.6.1 => /lib/libm.so.6.1 (0x2000000001e10000)
libiomp5.so => /opt/intel/Compiler/11.1/056/lib/ia64/libiomp5.so (0x2000000001ee0000)
libc.so.6.1 => /lib/libc.so.6.1 (0x2000000001ff0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2000000002260000)
libdl.so.2 => /lib/libdl.so.2 (0x2000000002290000)
libunwind.so.7 => /lib/libunwind.so.7 (0x20000000022b0000)
/lib/ld-linux-ia64.so.2 (0x2000000000000000)

Thanks
best regards.
0 Kudos
4 Replies
Gennady_F_Intel
Moderator
636 Views
might be you need to compile your Fortran code with the -i8 compiler option.
--Gennady
0 Kudos
jmlunice_fr
Beginner
636 Views
That's what we did, follow the used makefile:

SHELL = /bin/sh

ARGS ?=
DBG ?=
F90 ?=
F90FLAGS ?=
INC ?=
DEBUG ?=
LD ?=
LIBS ?=

ARGS := $(MAKECMDGOALS)

#MAXSPEED F90FLAGS = -m64 -xSSE4.2 -ipo -O3 -no-prec-div -static
MKLPATH = /opt/intel/mkl/10.2.2.025/lib/64

ifeq ($(shell arch), ia64)
ifeq (seq, $(filter seq,$(ARGS)))
F90 = ifort
INC = -I./
F90FLAGS = -cpp -O2 -i8 -ftz -traceback -override-limits -DGEMM
ifdef DBG
DEBUG = -g -ftrapuv -fpe-all=0 -auto -noalign -heap-array -debug extended -check bounds -check arg_temp_created -fp-stack-check -warn all -check all -gen-interfaces -warn interfa
ces
F90FLAGS += $(DEBUG)
endif
LD = $(F90)
LIBS = -L$(MKLPATH) $(MKLPATH)/libmkl_solver_lp64_sequential.a -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread

else ifeq (par, $(filter par,$(ARGS)))
F90 = ifort
INC = -I./
F90FLAGS = -cpp -O2 -i8 -ftz -traceback -override-limits -DGEMM
ifdef DBG
DEBUG = -g -ftrapuv -fpe-all=0 -auto -noalign -heap-array -debug extended -traceback -check bounds -check arg_temp_created -fp-stack-check -warn all -check all -gen-interfaces -warn interfaces
F90FLAGS += $(DEBUG)
endif
LD = $(F90)
LIBS = -L$(MKLPATH) $(MKLPATH)/libmkl_solver_ilp64.a -Wl,--start-group -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread
endif

else
$(error Unknown Architecture -- unable to continue)
endif

SRCS := $(wildcard *.f90)
OBJS := $(patsubst %.f90,%.o,$(SRCS))

EXE = conviv.exe

# Rules
all:
@echo -------------------------------------------------------------
@echo make seq Build sequential MKL version
@echo make seq DGB=true Build sequential MKL debug version
@echo make par Build parallel MKL version
@echo make par DBG=true Build sequential MKL debug version
@echo -------------------------------------------------------------

seq par: info $(EXE)

info:
@echo -----------------
@echo ARGS: $(args)
@echo ARCH: $(ARCH)
@echo PATH: $(PATH)
@echo CURDIR: $(CURDIR)
@echo FC: $(F90)
@echo FCFLAGS: $(F90FLAGS)
@echo DBG: $(DBG)
@echo DEBUG: $(DEBUG)
@echo SRC_FILES: $(SRCS)
@echo APP_FILES: $(OBJS)
@echo LIBS: $(LIBS)
@echo INCLUDE: $(INC)
@echo EXE_NAME: $(EXE)
@echo ----------------

$(EXE): $(OBJS)
@echo "--- Linking ( $@ ) ---"
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)

.SUFFIXES: .f90 .o

ho.o: ho.f90
@echo
@echo "--- Compiling ( $< ) ---"
$(F90) $(INC) -cpp -O1 -i8 -ftz -traceback -DGEMM -c $<

cond.o: cond.f90
@echo
@echo "--- Compiling ( $< ) ---"
$(F90) $(INC) -cpp -O1 -i8 -ftz -traceback -DGEMM -c $<

.f90.o:
@echo
@echo "--- Compiling ( $< ) ---"
$(F90) $(INC) $(F90FLAGS) -c $<

# Include the dependency-list created by makedepf90 below
include .depend

.PHONY : clean cleaner

clean:
@echo "--- Clean Garbage ---"
-rm -f *.o *~ *.mod *__genmod*

cleaner: clean
@echo "--- Clean Executables ---"
-rm -f $(EXE) /workspace/CONVIV.DEBUG/Source-Oct09/ord044-rotint.8

depend .depend:
/usr/local/src/makedepf90-2.8.8/makedepf90 -o foobar *.f90 > .depend

# DO NOT DELETE

0 Kudos
Gennady_F_Intel
Moderator
636 Views

goute:"we're unable to make it working with integer*8. 'top' then 'H' shows only one thread ?"

but based on the linking line you are using:

LD = $(F90)
LIBS = -L$(MKLPATH) $(MKLPATH)/libmkl_solver_ilp64.a -Wl,--start-group -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread
endif

you missed to link libiomp5 threading library (-liomp5)
0 Kudos
jmlunice_fr
Beginner
636 Views
Hello,
thank you for answers, but if you take a look at the ldd output of my previous posts, youi we'll see that the libiomp5 is loaded.
This link line was generated by http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor, so i hope it's correct ?
In fact, meantime i updated the compiler version with new mkl libs at level 11.1/072, and the code uses now multithreads
with ilp64 and i8 options.
So i think that the problem is solved.
Regards.
0 Kudos
Reply