- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
My system is 64 bit with Windows 7.
I want to run ABAQUS 6.13 with a subroutine which should be compiled by Fortran compiler. I have Intel Composer XE 2013 (Intel Compiler 14), which is able to build 32bit and 64bit applications.
The general settings are OK because Abaqus Verfication says it can work with a sample subroutine.
But when I want to do my own simulation it gives again the error:
LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
When I changed abaqus_v6.env file (machine type in link_sl and link_exe from /machine:AMD64 to /machine:X86), the error again changed to
export.def : error LNK2001: unresolved external symbol _forceCRTManifestCUR
standardU.lib : fatal error LNK1120: 1 unresolved externals
I first build an object file from my fortran code and the pass it to Abaqus. Maybe the object file is built for a 32 bit application type. I do not know how I can say ifort to build it for a 64bit application type. I searched but no luck. Can you please help me?
Thank you very much,
Vahid
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect that your installation has only one bit-size for Abaqus, i.e, you have only a 32-bit Abaqus or only a 64-bit, not both. You need to ascertain which one.
If you installed both the 32- and 64-bit versions of Intel Fortran, you would have ...Intel\Composer XE 2015\bin\ia32\ifort.exe and ...Intel\Composer XE 2015\bin\intel64\ifort.exe. You have to make Abaqus choose the appropriate one.
The error regarding forceCRTManifestCUR is probably caused by mixing different versions of the Visual Studio libraries, or using (possibly Abaqus provided) libraries that were built using a different version of Visual Studio. Not knowing details of your software set up, that is all that I am able to say.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vahid,
You could check the Fortran and link syntax set in the abaqus_v6.env environment file, which is usually in: C:\SIMULIA\Abaqus\6.14-1\SMA\site\abaqus_v6.env (or the 6.x-x folder for the Abaqus version you are using). Look for the compile_fortran, link_sl, and link_exe commands and the options that are set for each. You may need to update those commands so that Abaqus can find the correct version of Fortran to link the user subroutine to your analysis.
In the Abaqus Analysis User's Guide, 18.1.1 User subroutines: overview, the paragraph on "compilation and linking problems" has a link that points to the Abaqus Installation and Licensing Guide, and in section 4.1.4 System customization parameters there is some more information about the Fortran and link commands that may help.
Are you able to run the Fortran user subroutine from a main program, instead of from an Abaqus analysis. By setting up a "main.exe" program that calls the user subroutine, you would at least know that it can be run successfully, which may help narrow the problem to the Abaqus linking options in the environment file.
Regards,
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When building from the command line, you select the compiler by your choice of the argument to compilervars.bat (or ifortvars.bat), used to set up the environment. An argument of "ia32" selects the 32-bit compiler, "intel64" selects the 64-bit compiler. I don't know how ABAQUS sets up the environment. However, the comments from Greg and mecej4 are also important.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Greg and mecej4:
Attached you can find abaqus_v6.env, to see if something should be changed. When installing Abaqus I think it was installed both for 32 bit and 64 bit systems (as Intel Visual C++ for 32 and 64 bit was both installed), but when looking at the link_sl and link_exe, I see some parameters are only for 32 bit system, but I am not sure. I do not know how to make sure which version is installed on my system.
@Greg:Yes I am able to run a Fortran project for both systems (32 and 64 bit) in VS2012.
@Steve: I did not understand how I should choose the compiler from the command line. Anyway, the Abaqus bat file which is called every time is as below:
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\vcvars64.bat" intel64 call "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\ifortvars.bat" intel64 vs2012 @echo off "C:\SIMULIA\Abaqus\6.13-1\code\bin\abq6131.exe" %*
As I said, Abaqus does itself a verfication with a sample code itself and it passes when the target machine in the abaqus_v6.env (attached) is AMD64. But when I myself pass an .obj file to it, it gives the confliction error. That is why I think I need to choose the compiler when building that obj. file. Can you please explain more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would help us understand the problem if you showed the complete error message with the name of the object it complained about, so we know where the x86 module came from. The change you made initially was inappropriate.
Perhaps you're linking against another library that is the wrong architecture? It might help if you could add /verbose:libs to the link options and showed the output from that. (If the linking is done with "ifort", add this to the end of the command line and precede it with "/link".)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the quoted ifortvars call, you are building with Ifort to run only on windows x64. You couldn't link any objects built for 32 bit Windows (having the x86 machine tag).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@steve: Abaqus does the linking itselt, I just pass the source or obj. file to it. I should add /verbose:libs in the text file attached, but I don't know to which variable should I add it (link_exe or link_sl, you can see a short introduction in this link, section 4.1.4)
Why in the link_sl and link_exe variables, I see some parameters are only for 32 bit system?
Here is the error with the original linking settings (machin:amd64):
Abaqus JOB std_user
Abaqus 6.13-4
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens.
<441 out of 1200 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
2/20/2015 1:19:50 PM
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.176 Build 20140130
Copyright (C) 1985-2014 Intel Corporation. All rights reserved.
End Compiling Abaqus/Standard User Subroutines
Begin Linking Abaqus/Standard User Subroutines
Creating library standardU.lib and object standardU.exp
MSVCRT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
Abaqus Error: Problem during linking - Abaqus/Standard 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.
Abaqus/Analysis exited with errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The lines for link_sl and link_exe in your abaqus_v6.txt contain "/machine:IX86". That does not seem correct, since the rest of that script suggests that your target is 64-bit, so you should have "/machine:x64' instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mecej4: As mentioned in the question, when I change it to x64, I get the LNK1112 error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show the output of "set lib" in this build environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response. But how?
Tha command for Abaqus for example is like below:
abaqus job=xxx.inp user=my_subroutine.for\obj. I am not sure If I have access to the building section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You invoke Abaqus from something, yes? Just type the command into the command prompt there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vahid,
When abaqus runs it should create a jobname.log file with the output from the Fortran compiling and linking steps (where "jobname" is the filename entered after the job= keyword in the abaqus command, and note that I omit the "interactive" option on the abaqus command line to get the jobname.log file). I ran an example analysis, and an excerpt from the jobname.log file contains this text:
... Begin Compiling Abaqus/Standard User Subroutines 3/11/2015 8:14:08 AM Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.3.202 Build 20140422 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. End Compiling Abaqus/Standard User Subroutines Begin Linking Abaqus/Standard User Subroutines Creating library standardU.lib and object standardU.exp End Linking Abaqus/Standard User Subroutines 3/11/2015 8:14:10 AM Begin Analysis Input File Processor 3/11/2015 8:14:10 AM Run pre.exe ...
Hopefully your jobname.log file may reveal useful details about the Fortran version being used or any messages.
As a test, I also ran the abaqus analysis from an Intel Fortran console window instead of the Abaqus console window, which worked for me. Perhaps it would be worth trying that on your computer, since the Fortran console window would have all the Fortran environment variables set. I opened the Fortran console window from: Start/All Programs/Intel Parallel Studio XE 2013/Command Prompt/Parallel Studio XE with Intel Complier.../Intel64 Visual Studio 2012 mode...
Then I entered the abaqus command line to run the analysis. Perhaps using the Fortran console window would reveal if the abaqus console window has not been fully initialized to run with Fortran user subroutines.
Regards,
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had to only add
ifortvars.bat intel64 vs2012 only in the abaqus.bat, while I had added it in abqxxxx.bat by mistake. It should be like this.
Thank you all.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page