Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mehdi_M_1
Beginner
131 Views

cluster_sparse_solver library and path setting in LINUX

Hello,

I have a question regarding compiling a program containing cluster_sparse_solve.

I have developed a program for 3D flow field calculation using finite element method, using Intel parallel studio in my laptop, which is working with WINDOWS OS. I have compiled the program using the following lines:

 

step1 :

set path=C:\MyIntel\IntelSWTools\compilers_and_libraries_2017.4.210\windows\redist\intel64\mkl; C:\MyIntel\IntelSWTools\compilers_and_libraries_2017.4.210\windows\redist\intel64\compiler;C:\MyIntel\IntelSWTools\compilers_and_libraries_2017.4.210\windows\redist\intel64\tbb\vc_mt;%path%

 

step 2 :

set lib=C:\MyIntel\IntelSWTools\compilers_and_libraries_2017.4.210\windows\mkl\lib\intel64;%lib%

 

for the mentioned lined, I have used mkl_link_tool mpiifort C:\FORTRAN\Programmes\MPI\main01.f90

 

Then, after setting the path and libraries, I have used the followings:

 

step 3:

mpiifort USEFULLS.f90 CONSTANTS.f90 PRE_PROCESSOR_3D.f90 DATATYPES.f90 VEL_SUBS.f90 SPARSE_SUB.f90 -I"C:\MyIntel\IntelSWTools\compilers_and_libraries_2017.4.210\windows\mkl\include" "parallel01.f90" mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib mkl_blacs_intelmpi_lp64.lib impi.lib libiomp5md.lib -o Pstatic -heap-arrays

 

It works perfectly, without any problem. Also, I shall add that I have also compiled the program using dynamic libraries, as well. (I have used the the online link advisor for the recently mentioned line (step 3)- https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/)

 

But, I want to use the in a better computer which has Intel parallel Studio just under a LINUX OS. I have used again the online link advisor and then I have used the following to compile my code:

 

mpiifort USEFULLS.f90 CONSTANTS.f90 PRE_PROCESSOR_3D.f90 DATATYPES.f90 VEL_SUBS.f90 SPARSE_SUB.f90 -I. /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/include "parallel01.f90" -Wl,--start-group . /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_lp64.a . /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_intel_thread.a . /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.a . /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group -liomp5 -lpthread -lm -ldl -o Pstatic -heap-arrays

 

But I do not know:

a – How to determine the path and libraries in linux system (I mean what is mentioned in step 1 and step 2, but for linux)

b – How to find the suitable lines and libraries in linux system

c - I have found mkl_link_tool in linux instalation directory, but it does not work! Why?

 

At the moment, it gives the following errors:

 

parallel01.f90(17): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MKL_CLUSTER_SPARSE_SOLVER]

USE MKL_CLUSTER_SPARSE_SOLVER

------------^

parallel01.f90(61): error #6457: This derived type name has not been declared. [MKL_CLUSTER_SPARSE_SOLVER_HANDLE]

TYPE(MKL_CLUSTER_SPARSE_SOLVER_HANDLE) :: CPT(64)

-------------^

parallel01.f90(268): error #6404: This name does not have a type, and must have an explicit type. [CPT]

CPT(:)%dummy = 0

--------^

parallel01.f90(268): error #6514: Substring or array slice notation requires CHARACTER type or array. [CPT]

CPT(:)%dummy = 0

--------^

parallel01.f90(268): error #6460: This is not a field name that is defined in the encompassing structure. [DUMMY]

CPT(:)%dummy = 0

---------------^

parallel01.f90(268): error #6158: The structure-name is invalid or is missing. [CPT]

CPT(:)%dummy = 0

--------^

compilation aborted for parallel01.f90 (code 1)

 

Best regards

Mehdi

0 Kudos
5 Replies
Gennady_F_Intel
Moderator
131 Views

Hello, regard to questions a and b -- these are general questions how to work on unix system and you may find the answers everywhere. For example, you may have a look at the mkl's examples and see how we build mkl examples and how to set appropriated paths.

regard to c -   " I have found mkl_link_tool in linux installation directory, but it does not work! Why?"  Could you give some details? how do you launch  this tool and what do see as output?

Mehdi_M_1
Beginner
131 Views

Hello Gennady,

Thanks for your reply.

Regarding the first section of your reply (Hello, regard to questions a and b -- these are general questions how to work on unix system and you may find the answers everywhere. For example, you may have a look at the mkl's examples and see how we build mkl examples and how to set appropriated paths.), I have used what I have found in the internet, but it is not working. So, I would be thankful if you could introduce me an example for cluster_sparse_solver linking (by that I mean adding path, libraries and compilation terms). I have also seen the example of IFORT for cluster_sparse_solver in the installation directory. In those examples (I think) make files are used, but I am looking for command line compilation.

Regarding the second section, I have used mkl_link_tool in WINDOWS OS as follows:

  • C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\tools> mkl_link_tool

This will lead to introducing mkl_link_tool

Also

  • C:\.......\mkl\tools> mkl_link_tool  mpiifort E:\FORTRAN\F0_Flow_Field\parallel00.f90

This will produce commands for defining the path, setting the libraries and compiling terms and switches.

       Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.3

       ==========================================================

Output

======

Set lib=C:\Program Files(x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\lib\intel64;%lib%; && mpiifort  -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\include" "E:\FORTRAN\Programmes\Three_DIM\F0_Flow_Field\parallel00.f90"  mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib

"Files" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

NOTE: You may use the following environment setting to run the executable if your environment has not been updated yet: set path=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\..\redist\intel64\mkl;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\..\redist\intel64\compiler;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\..\redist\intel64\tbb\vc_mt;%path%;

And, I was expecting such a result in my Linux computer. In my Linux computer I typed:

….tools>./ mkl_link_tool   mpiifort home/…/parallel00.f90   : I saw just an error message

….tools> / mkl_link_tool   mpiifort home/…/parallel00.f90   : I saw just an error message

….tools>   mkl_link_tool   mpiifort home/…/parallel00.f90   : I saw just an error message

I think this command can help me in Linux OS, as it helped me in WINDOWS OS, if I can use it properly.

Best regards

Mehdi

 

Jing_X_Intel
Employee
131 Views

try to enter /opt/intel/compilers_and_libraries_2017.x.xxx/linux/mkl/tools and run ./mkl_link_tool in that directory.

Alternatively, run /opt/intel/compilers_and_libraries_2017.x.xxx/linux/mkl/tools/mkl_link_tool from any directory.

Mehdi_M_1
Beginner
131 Views

Hello Jing,

I used ./mkl_link_tool in its directory, but unfortunately I see the following message:

[mehdi@frontend mkl]$ cd tools
[mehdi@frontend tools]$ ls
builder  mkl_link_tool
[mehdi@frontend tools]$ ./mkl_link_tool
-bash: ./mkl_link_tool: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[mehdi@frontend tools]$

Also /opt/intel/compilers_and_libraries_2017.x.xxx/linux/mkl/tools/mkl_link_tool does not work.

Best regards

Mehdi

 

 

 

Jing X. (Intel) wrote:

try to enter /opt/intel/compilers_and_libraries_2017.x.xxx/linux/mkl/tools and run ./mkl_link_tool in that directory.

Alternatively, run /opt/intel/compilers_and_libraries_2017.x.xxx/linux/mkl/tools/mkl_link_tool from any directory.

Jing_X_Intel
Employee
131 Views

This error msg indicates that bit of your OS and bit of your binary does NOT match.

64-bit OS does NOT support running of 32-bit binary by default. Please Google how to enable 32-bit binary support on your 64-bit Linux distribution.

Reply