Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
110 Views

hi,

I am trying to compile source codes and created .optrpt but executable output file is not created. The following remark I got during MAKEFILE run:

ifort: remark #10397: optimization reports are generated in *.optrpt files in the output location

and please find the attached MAKEFILE, outer and .optrpt

Please advice me on this problem.

0 Kudos

Accepted Solutions
Highlighted
95 Views

You didn't show us the make command you used. If you just did "make" and not "make outer", then it wouldn't build. But it also occurs to me that you would not have seen the compiler remark either so I guess you did invoke that. Please show the complete output of running make.

View solution in original post

0 Kudos
22 Replies
Highlighted
95 Views

I don't see a rule in your makefile that creates an executable.   Am I missing something?

                  --Lorri

0 Kudos
Highlighted
Black Belt
95 Views

Jasmeet, it is not a good idea to make word-processing documents (*.doc) out of text files. Makefiles have a specific format, and word-wrap and tab-substitution make a mess of that format after conversion to .doc files.

I see a target "outer" that is an executable, but that is not the default target, which is "all". You probably should use the command "make outer" to build the executable.

0 Kudos
Highlighted
Beginner
95 Views

Hi Lorri,

If you see the last line of make file. It contain outer.executable should be generated from outer.f

Thanks

0 Kudos
Highlighted
Beginner
95 Views

hi mecej4,

I tried to upload MAKEFILE in original form. But the system was not accepting.

sorry for inconvenience. Please find the make file in the end.

As you suggested I use 'make outer', but the following error is coming:

jasmeet@landau:~/ukrmol-out/source$ make outer

f77    outer.f   -o outer
/tmp/ccbbg0Ee.o: In function `MAIN__':
outer.f:(.text+0xf): undefined reference to `sw_interf_'
outer.f:(.text+0x1e): undefined reference to `r_solve_'
outer.f:(.text+0x2d): undefined reference to `eigen_p_'
outer.f:(.text+0x3c): undefined reference to `t_matrx_'
outer.f:(.text+0x4b): undefined reference to `i_xsecs_'
outer.f:(.text+0x5a): undefined reference to `reson_f_'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'outer' failed
make: *** [outer] Error 1

The MAKEFILE is:

#################################################################
#
# Makefile for UKRmol-in codes
#
# Possible invocations:
# make [with optional arguments]
# make clean
# (removes .o and .mod files)
# make cleanall
# (removes .o, .mod and executables)
#
# This Makefile should not need to be edited for use on different
# machines and/or with different compilers, etc.
# Default definitions of system-specific variables (the compiler,
# compiler flags, linear algebra libraries) can be found below.
# These settings can be overridden via command-line arguments to
# "make", or by setting the relevant variables appropriately in a
# file "make.inc" (copy, paste and edit the lines below that you
# want to change)
#
#################################################################

#################################################################
# Default settings for the system-dependent variables
# ZM: the following has been obtained using the mkl_link tool
MKLROOT=/opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl
#MKLROOT=/opt/intel/composer_xe_2015.1.133/mkl
MKL_INCLUDE=-I$(MKLROOT)/include/intel64/ilp64  -i8 -I$(MKLROOT)/include
MKL_LINK=$(MKLROOT)/lib/intel64/libmkl_blas95_ilp64.a $(MKLROOT)/lib/intel64/libmkl_lapack95_ilp64.a -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_ilp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -openmp -lpthread -lm
#WARNING: the order of the -i8 option with respect to mpiifort matters. If you use mpiifort -i8 then the compiler will attempt to link against the 64bit MPI library. This is OK if
#the integral library has been compiled with 64bit MPI integers. If not then -i8 option must not be put directly behind mpiifort. This will achieve linking against the 32bit MPI
#library. Use ldd if in doubt.
COMP=mpiifort $(MKL_INCLUDE) -openmp
LINK=mpiifort -static-intel
OPT=-O3
NOOPT=-O0
# The following libraries should be included:
# UKRMol+ library root path: THIS MUST BE ABSOLUTE PATH (it is passed to the child makefiles in other dirs)
#LIBUKPLUS=/home/zdenek/svn/ukrmol-in/dev-branches/zdenek/source/GTO_BTO_integral_code
LIBUKPLUS=/home/jasmeet/rmat/integral_code
# ZM: note that this includes the MKL libraries from MKL_LINK
linkrmat=-I./include -I${LIBUKPLUS}/include -L${LIBUKPLUS}/lib -L./lib -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_blas95_ilp64.a $(MKLROOT)/lib/intel64/libmkl_lapack95_ilp64.a $(MKLROOT)/lib/intel64/libmkl_intel_ilp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -lintegral -lcpl -louter -lutil -lintegral -lcpl -Wl,--end-group -openmp -lpthread -lm
#################################################################

# The following include line must come after the system-specific defaults are set
# The leading "-" means that make will continue if the named file cannot be found
# (i.e. we wish to keep all the default settings)
-include make.inc

BINDIR = ./bin
LIBDIR = ./lib
SHELL = /bin/sh

SUBDIRS = source/libouter source/libutil
#source/dcs

.SUFFIXES:
.SUFFIXES: .f .f90 .o

export LIBUKPLUS MKL_INCLUDE MKL_LINK

all: SUBDIRS


clean:
    rm -f *.o *.mod svnversion.f90
    rm -f ./bin/*
    rm -f ./lib/*

SUBDIRS:
# Make the local bin and lib directorys (note the -p option means that nothing is done if the dir already exists)
# in case it has accidentally been removed (etc.)
    mkdir -p $(BINDIR)
    mkdir -p $(LIBDIR)
    @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done

%.o : %.f
    $(COMP) $(OPT) -c $<

%.o : %.f90
    $(COMP) $(OPT) -c $<

outer:
    $(LINK) -o $(BINDIR)/outer $(OPT) ./source/outer.f $(linkrmat)

 

0 Kudos
Highlighted
95 Views

You can upload tar files or gzipped files.

0 Kudos
Highlighted
Beginner
95 Views

Thanks Steve.

Please suggest any solution of above error.

0 Kudos
Highlighted
95 Views

I am not a makefile expert, but I think Lorri had it right - you don't have anything that causes target "outer" to be built.

0 Kudos
Highlighted
95 Views

Oh, none of this has anything to do with the optimization report, which is being created as it should. The "remark" during compilation is just for your information.

0 Kudos
Highlighted
Beginner
95 Views

hi steve,

The last line of MAKEFILE is:

outer:
    $(LINK) -o $(BINDIR)/outer $(OPT) ./source/outer.f $(linkrmat)

I think it should create outer.executable using outer.f

0 Kudos
Highlighted
96 Views

You didn't show us the make command you used. If you just did "make" and not "make outer", then it wouldn't build. But it also occurs to me that you would not have seen the compiler remark either so I guess you did invoke that. Please show the complete output of running make.

View solution in original post

0 Kudos
Highlighted
Beginner
95 Views

Hi steve,

I got the following on using make:

jasmeet@landau:~/ukrmol-out$ make
mkdir -p ./bin
mkdir -p ./lib
make[1]: Entering directory '/home/jasmeet/ukrmol-out/source/libouter'
mpiifort -i8 -w -p -openmp -i8 -O0  -c kmatsub.c2v.cinfv.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c cfasym.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c rknint.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c interf.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c kmatsub.cs.c3v.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c km_tdel.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c kmatsub.c2v.c3v.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c rot_lin_s.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c vibrmt.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c kmatadgeneral.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c k_adapt.f
mpiifort -i8 -w -p -openmp -i8 -O3 -c couplings.f90 -I/home/jasmeet/rmat/integral_code/include -L/home/jasmeet/rmat/integral_code/lib -lintegral
ar -rv /home/jasmeet/rmat/lib/libcpl.a couplings.o
r - couplings.o
mv *.mod ../../lib/
mpiifort -i8 -w -p -openmp -i8 -O0  -c swinterf.f -l/home/jasmeet/rmat/lib/libcpl.a -I../../lib -I/home/jasmeet/rmat/integral_code/include -L/home/jasmeet/rmat/integral_code/lib -lintegral
mpiifort -i8 -w -p -openmp -i8 -O0  -c timedel.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c QB_interface.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c reson.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c ixsecs.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c rotions_lin.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c pfarm_interface.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c rsolve.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c eigenp.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c stgqb2.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c outerio.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c bound.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c mcqd.f
mpiifort -i8 -w -p -openmp -i8 -I/opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/include/intel64/ilp64  -i8 -I/opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/include -O2 -vec-report -c tmatrx.f
ifort: remark #10397: optimization reports are generated in *.optrpt files in the output location
mpiifort -i8 -w -p -openmp -i8 -O0  -c rksuite.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c borncros.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c interv.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c tdip.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c outermisc.f
mpiifort -i8 -w -p -openmp -i8 -O0  -c rpropg.f
ar -rv /home/jasmeet/rmat/lib/libouter.a rknint.o outermisc.o vibrmt.o kmatadgeneral.o pfarm_interface.o QB_interface.o rot_lin_s.o ixsecs.o eigenp.o rksuite.o bound.o tmatrx.o k_adapt.o km_tdel.o tdip.o rpropg.o cfasym.o interf.o kmatsub.cs.c3v.o kmatsub.c2v.c3v.o swinterf.o interv.o timedel.o reson.o rotions_lin.o rsolve.o stgqb2.o outerio.o mcqd.o borncros.o kmatsub.c2v.cinfv.o
r - rknint.o
r - outermisc.o
r - vibrmt.o
r - kmatadgeneral.o
r - pfarm_interface.o
r - QB_interface.o
r - rot_lin_s.o
r - ixsecs.o
r - eigenp.o
r - rksuite.o
r - bound.o
r - tmatrx.o
r - k_adapt.o
r - km_tdel.o
r - tdip.o
r - rpropg.o
r - cfasym.o
r - interf.o
r - kmatsub.cs.c3v.o
r - kmatsub.c2v.c3v.o
r - swinterf.o
r - interv.o
r - timedel.o
r - reson.o
r - rotions_lin.o
r - rsolve.o
r - stgqb2.o
r - outerio.o
r - mcqd.o
r - borncros.o
r - kmatsub.c2v.cinfv.o
rm -f *.o *~
mv *.mod ../../lib/
make[1]: Leaving directory '/home/jasmeet/ukrmol-out/source/libouter'
make[1]: Entering directory '/home/jasmeet/ukrmol-out/source/libutil'
ifort -w -mkl -i8 -O3 -c gaussq.f
ifort -w -mkl -i8 -O3 -c lmdif1.f
ifort -w -mkl -i8 -O3 -c minpack.f
ifort -w -mkl -i8 -O3 -c dgamln.f
ifort -w -mkl -i8 -O3 -c splev.f
ar -rv /home/jasmeet/rmat/lib/libutil.a gaussq.o lmdif1.o minpack.o dgamln.o splev.o
r - gaussq.o
r - lmdif1.o
r - minpack.o
r - dgamln.o
r - splev.o
rm -f *.o *~
make[1]: Leaving directory '/home/jasmeet/ukrmol-out/source/libutil'

0 Kudos
Highlighted
Beginner
95 Views

hi steve,

with make outer command i am able to create outer but with the following message:

make outer
mpiifort -static-intel -o ./bin/outer -O3 ./source/outer.f -I./include -I/home/jasmeet/rmat/integral_code/include -L/home/jasmeet/rmat/integral_code/lib -L./lib -Wl,--start-group /opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_blas95_ilp64.a /opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_lapack95_ilp64.a /opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_intel_ilp64.a /opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/newbin/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_core.a -lintegral -lcpl -louter -lutil -lintegral -lcpl -Wl,--end-group -openmp -lpthread -lm
ifort: command line remark #10411: option '-openmp' is deprecated and will be removed in a future release. Please use the replacement option '-qopenmp'

0 Kudos
Highlighted
Beginner
95 Views

hi steve,

I have replaced openmp by qopenmp. The outer is created. Thanks for your support

But Still the outer is not working properly.

The following errror is coming:

++ /home/jasmeet/rmat/bin/congen

real    0m0.004s
user    0m0.004s
sys    0m0.000s
++ set +x
++ /home/jasmeet/rmat/bin/scatci 8

real    0m0.339s
user    0m0.328s
sys    0m0.008s
++ set +x
forrtl: severe (24): end-of-file during read, unit 25, file /home/jasmeet/o2/se/fort.25
Image              PC                Routine            Line        Source             
outer              0000000001AB3633  Unknown               Unknown  Unknown
outer              0000000001ADAE94  Unknown               Unknown  Unknown
outer              00000000004219C2  Unknown               Unknown  Unknown
outer              000000000040648E  Unknown               Unknown  Unknown
outer              000000000040642E  Unknown               Unknown  Unknown
libc.so.6          00007F0119638830  Unknown               Unknown  Unknown
outer              0000000000406329  Unknown               Unknown  Unknown

0 Kudos
Highlighted
95 Views

That's an entirely different problem. Your program is reading from unit 25 without opening it first.

0 Kudos
Highlighted
Beginner
95 Views

thanks steve for your support.

0 Kudos
Highlighted
Beginner
95 Views

The size of fort.25 is ZERO.

I don't know where I am wrong.

0 Kudos
Highlighted
95 Views

As I wrote above, you did a READ from unit 25 without opening a file first. This implicitly opens a file fort.25, creating an empty file. It then reads from that empty file and gets an error.

I assume there is some data file you intend to read from - you have to add an OPEN statement that opens that file on unit 25 first.

0 Kudos
Highlighted
Beginner
95 Views

Hi Steve,

I have two different archive files libblas.a in my computer may be from an older and latest version of BLAS package.

When I compile using the latest version and run my input files the size of fort.25 is ZERO.

Whereas when I compile using the older version and run my input files the size of fort.25 is 2994 but still the output file is not complete.

I think this is  a compatibility issue of BLAS version during compilation.

I don't know where I am wrong.

J Singh

0 Kudos
Highlighted
95 Views

You still have an error in your application in that it is reading or writing to files without opening them first, and getting defaults that the program is not expecting. I can't debug your BLAS library for you.

0 Kudos