Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
26873 Discussions

user linker options from linux command line on Windows

RDS
Beginner
272 Views

Hello,

I have a make file from linux to compile a set of fortran files.  I am having difficulty porting the linker commands to Windows.  Can anyone advice if equivalent commands exist on Windows?

ifort -o output.exe file1.o file2.o file3.o file4.o file4.o temp_reac.o hr.o ts.o intelmkl_hpem.o -ldl -Vaxlib -w -I/opt/intel/Compiler/11.1/038/mkl/lib/include -fpp \
-L/opt/intel/Compiler/11.1/038/mkl/lib/em64t \
/opt/intel/Compiler/11.1/038/mkl/lib/em64t/libmkl_solver_lp64.a \
/opt/intel/Compiler/11.1/038/mkl/lib/em64t/libmkl_intel_lp64.a \
-Wl,--start-group \
/opt/intel/Compiler/11.1/038/mkl/lib/em64t/libmkl_intel_thread.a \
/opt/intel/Compiler/11.1/038/mkl/lib/em64t/libmkl_lapack95_lp64.a \
/opt/intel/Compiler/11.1/038/mkl/lib/em64t/libmkl_core.a \
-Wl,--end-group \
-liomp5 -lpthread -lm

 

Thanks!

0 Kudos
5 Replies
RDS
Beginner
265 Views

I forgot to add that I have Intel Parallel Studio XE 2020 for Fortran Windows.

Steve_Lionel
Black Belt Retired Employee
239 Views

Are you trying to do this from the command line/makefile? If you added your sources to a Visual Studio project, it would go a lot easier.

Those options you have from Linux are from gfortran.

Replace "-o output.exe" with "/exe:output.exe" Replace .o with .obj. Remove everything beginning with -ldl. (-fpp doesn't belong in a link line, anyway.) Consult the MKL Link Line advisor to see what you should put in for MKL libraries, or just add /Qmkl and see what it does. That will get you a long way.

 
RDS
Beginner
212 Views

Thank you!

I would certainly prefer to do in Visual Studio but was utterly confused about how to implement all the options from the make file.  I will try with the /Qmkl first and will report back.  I can't seem to find a number of the mkl files in the latest install of Intel MKL -- I wonder if ones referred to in the makefile were from an earlier version of MKL and since deprecated.

Thanks again for your reply.

 

Steve_Lionel
Black Belt Retired Employee
204 Views

Very likely - MKL changes things around release to release. If you have MKL-specific questions you can ask them in Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library - Intel Community

 
RDS
Beginner
142 Views

Sorry for the late response, and thank you for your inputs.  I haven't been able to spend further time on this since my original post but going forward, I do plan to look at the MKL community posts for relevant information.

 

Thanks again.

Reply