- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir,
I was trying to compile the well known SPR-KKR code. I modified the make.inc as follows
SYSTEM=Linux
###############################################################################
# Here the common makefile starts which does not depend on the OS ####
#
# FC: compiler name and common options e.g. ifort -c (!
# fortran 90 or later needed)
# LINK: linker name and common options e.g. ifort
# DEBUG: options for debugging
# OP1: optimization e.g. -O3
# OP0: nooptimization e.g. -O0
# VERSION: version (OS) e.g. Linux
# LIB: library names e.g. -L/usr/lib -latlas -lblas -llapack
# LIBMPI: lammpi (or mpich) parallel libraries
# INCLUDE: include path for mpif.h (one needs it enev if you are
# running sequential programm)
# FFLAGS: compiler flags
BIN=.
LIB=-L/opt/intel/mkl/lib/intel64 -lmkl_lapack95_ilp64 \\
-lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core \\
-lmkl_sequential -openmp -lpthread -lm
# MPI libraries (lammpi)
#RJ LIBMPI = -L/usr/lib/lam/lib -llammpi++ -llammpio \\
#RJ -llamf77mpi -lmpi -llam -lnsl -lutil
LIBMPI =
# Include mpif.h
#RJ INCLUDE = -I/usr/lib/lam/include
INCLUDE =
#FFLAGS = -assume byterecl -assume 2underscores -check all -traceback -fpe0 -g
-fp-stack-check -O0
FFLAGS = -assume byterecl -assume 2underscores -O3
OP1 =
OP1 =
OP0 =
DEBUG = -g
FC =mpiifort -c $(FFLAGS) $(INCLUDE)
LINK = mpiifort -Vaxlib $(INCLUDE) $(FFLAGS)
VERSION=5.4
ARCH =ar
ARCHFLAGS=cr
RANLIB =ranlib
MPI=MPI
The SPR-KKR code compiles well, but when running, I get the following error
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libmkl_mc3.so 00002B258BA29839 Unknown Unknown Unknown
The developers of the code suggested that there is a problem with the mkl libraries but I am unable to solve the problem here. The developers also mentioned that there is nothing wrong with the code as such.
So there is an obvious problem with the make.inc file
Can anybody suggest what changes have to be made in the make.inc file
Thanks in advance
GhoshS
I was trying to compile the well known SPR-KKR code. I modified the make.inc as follows
SYSTEM=Linux
###############################################################################
# Here the common makefile starts which does not depend on the OS ####
#
# FC: compiler name and common options e.g. ifort -c (!
# fortran 90 or later needed)
# LINK: linker name and common options e.g. ifort
# DEBUG: options for debugging
# OP1: optimization e.g. -O3
# OP0: nooptimization e.g. -O0
# VERSION: version (OS) e.g. Linux
# LIB: library names e.g. -L/usr/lib -latlas -lblas -llapack
# LIBMPI: lammpi (or mpich) parallel libraries
# INCLUDE: include path for mpif.h (one needs it enev if you are
# running sequential programm)
# FFLAGS: compiler flags
BIN=.
LIB=-L/opt/intel/mkl/lib/intel64 -lmkl_lapack95_ilp64 \\
-lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core \\
-lmkl_sequential -openmp -lpthread -lm
# MPI libraries (lammpi)
#RJ LIBMPI = -L/usr/lib/lam/lib -llammpi++ -llammpio \\
#RJ -llamf77mpi -lmpi -llam -lnsl -lutil
LIBMPI =
# Include mpif.h
#RJ INCLUDE = -I/usr/lib/lam/include
INCLUDE =
#FFLAGS = -assume byterecl -assume 2underscores -check all -traceback -fpe0 -g
-fp-stack-check -O0
FFLAGS = -assume byterecl -assume 2underscores -O3
OP1 =
OP1 =
OP0 =
DEBUG = -g
FC =mpiifort -c $(FFLAGS) $(INCLUDE)
LINK = mpiifort -Vaxlib $(INCLUDE) $(FFLAGS)
VERSION=5.4
ARCH =ar
ARCHFLAGS=cr
RANLIB =ranlib
MPI=MPI
The SPR-KKR code compiles well, but when running, I get the following error
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libmkl_mc3.so 00002B258BA29839 Unknown Unknown Unknown
The developers of the code suggested that there is a problem with the mkl libraries but I am unable to solve the problem here. The developers also mentioned that there is nothing wrong with the code as such.
So there is an obvious problem with the make.inc file
Can anybody suggest what changes have to be made in the make.inc file
Thanks in advance
GhoshS
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will need to debug the code; I had never heard of this "well-known" code, and usually you will have to contact the developers of the code and/or their published instructions as to compiling and running the code with the IFort compiler on Linux.
This link has some general information about this type of error and how to address it:
determining-root-cause-of-sigsegv-or-sigbus-errors
This link has some general information about this type of error and how to address it:
determining-root-cause-of-sigsegv-or-sigbus-errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't make sense to link both mkl_sequential and mkl_intel_thread libraries. Does it work when you omit the intel_thread library?
Multiple ifort -assume options normally are separated by commas:
-assume byterecl,protect_parens
You would likely need to turn off -ipo in order to use ar, but it seems you didn't stumble over that.
As far as I know, ifort doesn't support any double appended underscore options which might attempt to interoperate with g77 (which hasn't been supported for several years). You didn't spell it like the partially documented 2underscore option. Likewise, lam MPI hasn't been supported since openmpi came out. So, it looks like you started with an obsolete set of build options.
Multiple ifort -assume options normally are separated by commas:
-assume byterecl,protect_parens
You would likely need to turn off -ipo in order to use ar, but it seems you didn't stumble over that.
As far as I know, ifort doesn't support any double appended underscore options which might attempt to interoperate with g77 (which hasn't been supported for several years). You didn't spell it like the partially documented 2underscore option. Likewise, lam MPI hasn't been supported since openmpi came out. So, it looks like you started with an obsolete set of build options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Tim,
Thanks
my revised make.inc file looks like (after you suggested to omit the intel_thread library
SYSTEM=Linux
###############################################################################
# Here the common makefile starts which does not depend on the OS ####
#
# FC: compiler name and common options e.g. ifort -c (!
# fortran 90 or later needed)
# LINK: linker name and common options e.g. ifort
# DEBUG: options for debugging
# OP1: optimization e.g. -O3
# OP0: nooptimization e.g. -O0
# VERSION: version (OS) e.g. Linux
# LIB: library names e.g. -L/usr/lib -latlas -lblas -llapack
# LIBMPI: lammpi (or mpich) parallel libraries
# INCLUDE: include path for mpif.h (one needs it enev if you are
# running sequential programm)
# FFLAGS: compiler flags
BIN=.
LIB=-L/opt/intel/mkl/lib/intel64 -lmkl_lapack95_ilp64 \
-lmkl_intel_ilp64 -lmkl_core \
-lmkl_sequential -openmp -lpthread -lm
# MPI libraries (lammpi)
#RJ LIBMPI = -L/usr/lib/lam/lib -llammpi++ -llammpio \
#RJ -llamf77mpi -lmpi -llam -lnsl -lutil
LIBMPI =
# Include mpif.h
#RJ INCLUDE = -I/usr/lib/lam/include
INCLUDE =
#FFLAGS = -assume byterecl -assume 2underscores -check all -traceback -fpe0 -g
-fp-stack-check -O0
#FFLAGS = -assume byterecl -assume 2underscores -O3
FFLAGS = -O0
OP1 =
OP1 =
OP0 =
DEBUG = -g
FC =mpiifort -c $(FFLAGS) $(INCLUDE)
LINK = mpiifort -Vaxlib $(INCLUDE) $(FFLAGS)
VERSION=5.4
ARCH =ar
ARCHFLAGS=cr
RANLIB =ranlib
MPI=MPI
Still it does not work. The error is same.
The developers have said there are no problems with the code.
The options which they have suggested are
LIB = -L/usr/local/intel/mkl/1x.insertversion/lib/em64t \
-lmkl_intel_lp64 -lmkl_lapack -lmkl_sequential \
-lguide -lpthread -lmkl_core
FC = mpif90.openmpi -c $(FFLAGS) $(INCLUDE)
LINK = mpif90.openmpi $(FFLAGS) $(INCLUDE)
INCLUDE = -I/usr/lib/openmpi/include
Since I am trying to build the code from the scratch, could you please help?
What changes are needed in the make.inc file?
Thanks
GhoshS
Thanks
my revised make.inc file looks like (after you suggested to omit the intel_thread library
SYSTEM=Linux
###############################################################################
# Here the common makefile starts which does not depend on the OS ####
#
# FC: compiler name and common options e.g. ifort -c (!
# fortran 90 or later needed)
# LINK: linker name and common options e.g. ifort
# DEBUG: options for debugging
# OP1: optimization e.g. -O3
# OP0: nooptimization e.g. -O0
# VERSION: version (OS) e.g. Linux
# LIB: library names e.g. -L/usr/lib -latlas -lblas -llapack
# LIBMPI: lammpi (or mpich) parallel libraries
# INCLUDE: include path for mpif.h (one needs it enev if you are
# running sequential programm)
# FFLAGS: compiler flags
BIN=.
LIB=-L/opt/intel/mkl/lib/intel64 -lmkl_lapack95_ilp64 \
-lmkl_intel_ilp64 -lmkl_core \
-lmkl_sequential -openmp -lpthread -lm
# MPI libraries (lammpi)
#RJ LIBMPI = -L/usr/lib/lam/lib -llammpi++ -llammpio \
#RJ -llamf77mpi -lmpi -llam -lnsl -lutil
LIBMPI =
# Include mpif.h
#RJ INCLUDE = -I/usr/lib/lam/include
INCLUDE =
#FFLAGS = -assume byterecl -assume 2underscores -check all -traceback -fpe0 -g
-fp-stack-check -O0
#FFLAGS = -assume byterecl -assume 2underscores -O3
FFLAGS = -O0
OP1 =
OP1 =
OP0 =
DEBUG = -g
FC =mpiifort -c $(FFLAGS) $(INCLUDE)
LINK = mpiifort -Vaxlib $(INCLUDE) $(FFLAGS)
VERSION=5.4
ARCH =ar
ARCHFLAGS=cr
RANLIB =ranlib
MPI=MPI
Still it does not work. The error is same.
The developers have said there are no problems with the code.
The options which they have suggested are
LIB = -L/usr/local/intel/mkl/1x.insertversion/lib/em64t \
-lmkl_intel_lp64 -lmkl_lapack -lmkl_sequential \
-lguide -lpthread -lmkl_core
FC = mpif90.openmpi -c $(FFLAGS) $(INCLUDE)
LINK = mpif90.openmpi $(FFLAGS) $(INCLUDE)
INCLUDE = -I/usr/lib/openmpi/include
Since I am trying to build the code from the scratch, could you please help?
What changes are needed in the make.inc file?
Thanks
GhoshS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It has been several years since the MKL dropped the libguide and mkl_lapack libraries; you were much closer before. Evidently, your advisors intended for you to fix the -L path to match where you actually installed MKL, although the current ifort will take care of that for the case of dynamic MKL libraries (in fact, the simple option -mkl could take care of all the MKL stuff).
It's quite likely you still require the -assume byterecl option; that hasn't changed.
If you wish to use openmpi in place of Intel MPI, of course you must build your own copy of openmpi (using ifort and your choice of gcc or icc), following the instructions on their site. In either case, using the MPI compiler wrappers as instructed should take care of all the MPI headers and libraries.
If there is an obvious error in your compile and link setup, you haven't given us the information which is available to you to fix it.
It's quite likely you still require the -assume byterecl option; that hasn't changed.
If you wish to use openmpi in place of Intel MPI, of course you must build your own copy of openmpi (using ifort and your choice of gcc or icc), following the instructions on their site. In either case, using the MPI compiler wrappers as instructed should take care of all the MPI headers and libraries.
If there is an obvious error in your compile and link setup, you haven't given us the information which is available to you to fix it.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page