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

linking intel fortran with visual studio

ganguly__shouvik
Beginner
2,040 Views

I am trying to set up Abaqus 2016 with intel parallel studio 2019 and visual studio 2019.

I have first set up visual studio 2019 and then parallel studio 2019 on my computer. Then I have added the environment paths to ifortvars and vsvars64 . 

When I start Abaqus I get the following message on console

Invalid command line argument: vs2019


Intel(R) MPI Library 2019 Update 4 for Windows* Target Build Environment for Intel(R) 64 applications
Copyright 2007-2019 Intel Corporation.

Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
Intel(R) Compiler 19.0 Update 4 (package 245)

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.1.3
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

 

Hence it appears that Abaqus is able to recognize visual studio 2019 and intel parallel studio 2019.

However it cannot recognizer the environment variable vs2019.  Is this due to intel fortran not recognising visual studio or incomplete path?

Thank you

0 Kudos
11 Replies
Steve_Lionel
Honored Contributor III
2,043 Views

[Deleted]

0 Kudos
ganguly__shouvik
Beginner
2,044 Views

The abaqus startup shortcut has been edited to invoke intel fortran and visual studio as

"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\bin\ifortvars.bat" intel64 vs2019 & C:\WINDOWS\system32\cmd.exe /k

 

I guess the fortran environment does not recognize the command vs2019. Do I need to add any other path other than folder where vsvars64.bat  is located

i.e C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build;

and the path for ifortvars

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.4.245\windows\bin

I am using latest intel parallel studio 2019 update 4

0 Kudos
Steve_Lionel
Honored Contributor III
2,044 Views

It is not clear to me which script is complaining. When I try it, the ifortvars.bat does recognize vs2019 and I get no error. Maybe it's an ABAQUS script that is complaining?

0 Kudos
ganguly__shouvik
Beginner
2,044 Views

I found the complain was from ippvars.bat as it did not have a case for vs2019.

However even if that is corrected the link errors remain.

The error says it may be due to different releases. Is it due to version issues, I am using Abaqus 2016

explicitU_static.lib(vdflux.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vdisp.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vdload.obj) : error LNK2001: unresolved external symbol memmove
explicitU.dll : fatal error LNK1120: 4 unresolved externals
Abaqus Error: Problem during linking - Single Precision Abaqus/Explicit User Subroutines.
  This error may be due to a mismatch in the Abaqus user subroutine arguments.
  These arguments sometimes change from release to release, so user subroutines
  used with a previous release of Abaqus may need to be adjusted.

 

0 Kudos
ganguly__shouvik
Beginner
2,044 Views

I am attaching the files for your reference. The command to execute this is

abaqus job=Change-Mod.inp user=vusfldMod.for

0 Kudos
mecej4
Honored Contributor III
2,043 Views

Microsoft rearranged the contents of the SDK libraries between versions 13, 15 and 17 of VC. The entry point memmove is in libvcruntime.lib as of VS17. Please add that library to the linker input list and see if that fixes the problem.

Few of us in this forum have Abaqus, so there is not much that we can do with the attachment that you posted in #6.

0 Kudos
ganguly__shouvik
Beginner
2,044 Views

Thank you for the information.

I have added the path to libvcruntime.lib but still get the same error.

So the fortran files (in vfric_coef.obj etc) are invoking memmove and the location is not being found within visual studio 2019

Is there any other way .

 

explicitU_static.lib(vfric_coef.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vfriction.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vcosimulation0.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vdflux.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vdisp.obj) : error LNK2001: unresolved external symbol memmove
explicitU_static.lib(vdload.obj) : error LNK2001: unresolved external symbol memmove
explicitU.dll : fatal error LNK1120: 4 unresolved externals

0 Kudos
Andreas13
Beginner
2,007 Views

Dear all, 

I receive the same issues for Abaqus 2017 and also tried other VS and Intel version. 

Does anyone has a solution, she/he wants to share?

Thanks and best, 

Andreas

0 Kudos
mecej4
Honored Contributor III
1,985 Views

Linker problems such as not finding memmove are usually the result of attempting to link object files and libraries that have been compiled with different versions of MSVC tools.

The solution must necessarily depend on knowing those versions.

You may try (at your own risk) adding these libraries to the list of libraries to be scanned by the linker: vcruntime.lib and ucrt.lib.

0 Kudos
andrew_4619
Honored Contributor II
2,044 Views

Consider the linker options /Verbose or /verbose:lib as they will show what libraries are being found and used. Consider a consequence of #7, the linker might see more than one libvcruntime.lib but maybe if the first one it finds is not the one you need the problem does not go away 

0 Kudos
Greg_T_
Valued Contributor I
1,959 Views

@ganguly__shouvik Do you want to link a user subroutine to an Abaqus analysis, such as using UMAT or DLOAD, etc.?  If yes, I have success by adding the "user=mysub.f" key word to the abaqus command line.  That option tells the abaqus job to look for the Fortran source file in the same directory as the abaqus input file.  I also use the Intel Fortran command window to run the abaqus job.  I open the Intel Fortran command window from the Start menu, finding the latest Intel Fortran version, which will automatically run the batch files to initialized the Intel Fortran variables.  Would this approach work for your analysis?

Regards, Greg T.

0 Kudos
Reply