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

How to set up arch and platform?

I wanted to recompile one code(have worked with this f90 program two years ago).My makefile

F95ROOT=/home/milenko/intel/compilers_and_libraries/linux
MKLROOT=/home/milenko/intel/compilers_and_libraries/linux/mkl

FC90 = $(F95ROOT)/bin/compilervars.sh intel64 linux
FCFLAGS= -O2 -fast -warn uncalled

INCLUDE = $(MKLROOT)/include
LD_LIBRARY_PATH = $(MKLROOT)/lib/intel64
LIBRARY_PATH = $(MKLROOT)/lib/intel64
CPATH = $(MKLROOT)/include
FPATH = $(MKLROOT)/include
NLSPATH = $(MKLROOT)/lib/intel64/locale/en_US
LIBS=-L$(MKLROOT)/lib/intel64 -lmkl_lapack95 -Wl,--start-group \
$(MKLROOT)/lib/intel64/libmkl_lapack95.a \
$(MKLROOT)/lib/intel64/libmkl_blacs.a -Wl,--end group

TARGETS= clean Occam2D

OBJSOC= OccamModules.f90 MT2DModules.f90 Occam.f90 MT2D.f90

all: $(TARGETS)

clean:
        rm -f *.o *~ core *.mod
        rm -f Occam2D
        
Occam2D:$(OBJSOC)
        $(FC90) $(FCFLAGS) -o $@ $(OBJSOC)  $(LIBS)

# General compile rules

.SUFFIXES: .f90 .o

.f90.o:    
    $(FC90) $(FCFLAGS)    -c -o $@ $< 

 

But when I try to compile it I got

milenko@milenko-HP-Compaq-6830s:~/OCCAM2DMT_V3.0/cifort$ make all
rm -f *.o *~ core *.mod
rm -f Occam2D
/home/milenko/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64 linux -O2 -fast -warn uncalled -o Occam2D OccamModules.f90 MT2DModules.f90 Occam.f90 MT2D.f90  -L/home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64 -lmkl_lapack95 -Wl,--start-group /home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_lapack95.a /home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_blacs.a -Wl,--end group
compilervars.sh [-arch] <arch> [-platform <platform>]

  <arch> must be one of the following:
      ia32           : Set up for IA-32 target.
      intel64        : Set up for Intel(R)64 target.
  <platform> must be of the following:
      linux          : Set to Linux target.(default)
      android        : Set to Android target.

If the arguments to the sourced script are ignored (consult docs
for your shell) the alternative way to specify target is environment
variables COMPILERVARS_ARCHITECTURE to pass <arch> to the script
and COMPILERVARS_PLATFORM to pass <platform>
make: *** [Occam2D] Error 1

 

I do not understand,how to set up arch and platform?

0 Kudos
3 Replies
Highlighted
10 Views

Your makefile is incorrect -

Your makefile is incorrect - the definition for FC90 tries to invoke the compilervars script to do a compile, but instead that something specified only once using "source" to establish the compiler environment. The definituon of FC90 should just be "ifort" (no quotes). Then, before you run the makefile, type:

source /home/milenko/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64 

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
10 Views

Thanks Steve.

Thanks Steve.
I have new problem with libraries
ifort  -O2 -fast -warn uncalled -o Occam2D OccamModules.f90 MT2DModules.f90 Occam.f90 MT2D.f90  -L/home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64 -lmkl_lapack95 -Wl,--start-group /home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_lapack95.a /home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_blacs.a -Wl,--end group
ifort: error #10236: File not found:  '/home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_lapack95.a'
ifort: error #10236: File not found:  '/home/milenko/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_blacs.a'

In lib/intel64 I have :
libmkl_ao_worker.so             libmkl_blacs_openmpi_ilp64.a   libmkl_core.so         libmkl_intel_thread.so     libmkl_vml_avx512_mic.so
libmkl_avx2.so                  libmkl_blacs_openmpi_ilp64.so  libmkl_def.so          libmkl_lapack95_ilp64.a    libmkl_vml_avx512.so
libmkl_avx512_mic.so            libmkl_blacs_openmpi_lp64.a    libmkl_gf_ilp64.a      libmkl_lapack95_lp64.a     libmkl_vml_avx.so
libmkl_avx512.so                libmkl_blacs_openmpi_lp64.so   libmkl_gf_ilp64.so     libmkl_mc3.so              libmkl_vml_cmpt.so
libmkl_avx.so                   libmkl_blacs_sgimpt_ilp64.a    libmkl_gf_lp64.a       libmkl_mc.so               libmkl_vml_def.so
libmkl_blacs_ilp64.a            libmkl_blacs_sgimpt_ilp64.so   libmkl_gf_lp64.so      libmkl_rt.so               libmkl_vml_mc2.so
libmkl_blacs_ilp64.so           libmkl_blacs_sgimpt_lp64.a     libmkl_gnu_thread.a    libmkl_scalapack_ilp64.a   libmkl_vml_mc3.so
libmkl_blacs_intelmpi_ilp64.a   libmkl_blacs_sgimpt_lp64.so    libmkl_gnu_thread.so   libmkl_scalapack_ilp64.so  libmkl_vml_mc.so
libmkl_blacs_intelmpi_ilp64.so  libmkl_blas95_ilp64.a          libmkl_intel_ilp64.a   libmkl_scalapack_lp64.a    locale
libmkl_blacs_intelmpi_lp64.a    libmkl_blas95_lp64.a           libmkl_intel_ilp64.so  libmkl_scalapack_lp64.so
libmkl_blacs_intelmpi_lp64.so   libmkl_cdft_core.a             libmkl_intel_lp64.a    libmkl_sequential.a
libmkl_blacs_lp64.a             libmkl_cdft_core.so            libmkl_intel_lp64.so   libmkl_sequential.so
libmkl_blacs_lp64.so            libmkl_core.a                  libmkl_intel_thread.a  libmkl_vml_avx2.so

Should I change to libmkl_blacs_lp64.a   and libmkl_lapack95_lp64.a ​?

0 Kudos
Highlighted
10 Views

I suggest running through the

I suggest running through the MKL Link Line Advisor as MKL changes their library arrangement every once in a while. If you need more help, ask in the MKL forum.

Retired 12/31/2016
0 Kudos