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

x64 x32 compiler issue

Feng__Jesse
New Contributor II
1,047 Views

I previously submitted a post and made a lot of edits as I found more issues throughout the day. The forum probably saw that as potential spam and automatically removed it. Which is ok, since I wanted to write a new post about this.

 

I installed in the following order:

Visual Studio 2019 (with desktop C++ development)

OneAPI Basic

OneAPI HPC

Abaqus 2020. (I also followed the pinned thread for modifying the Abaqus batch files).

 

The issue manifested with following symptoms:

1. My machine is x64 but only the x86 compiler option can compile Fortran code. x64 compiler returns with linker errors.

2. Abaqus verify is successful at running the default test code, but fails to compile my own test code with a lot of linker errors. If needed, I can post them in replies.

3. The installed Intel Fortran IA64 command prompt can compile the code, but IA32 cannot and returns error saying 64/86 mismatch.

4. When I call just "ifort", I see the following: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on IA-32, Version 2021.8.0. Shouldn't that say 64 Compiler for applications on IA-64?

5. Related to this problem: When I followed the instructions  in the pinned thread on connecting Abaqus to OneAPI. I added the line @call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" intel64 vs2019

When I do this and check Abaqus's system information, I don't see a linker or a C++ compiler recognized by Abaqus.

But when I change it to @call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" intel32 vs2019

Abaqus system information can see a "Microsoft (R) Incremental Linker Version 14.29.30148.0" and a C++ compiler: "Microsoft Visual C++ 14.29.30148.0".

 

Any suggestions would be much appreciated. Thanks!

 

Jesse

0 Kudos
6 Replies
Steve_Lionel
Honored Contributor III
1,037 Views

It certainly won't say "IA-64", which is the no-longer-supported Itanium architecture.

When establishing the command line build environment, you must specify whether you want 32-bit (ia32) or 64-bit (intel64) as the target. You have not shown us how you do this.

The errors you are seeing are being reported by ABAQUS batch scripts, which Intel does not supply and few of us have access to. You also don't say what the linker errors are. If ABAQUS provides both 32-bit and 64-bit libraries, you need to make sure that the correct set are being provided to the linker.

0 Kudos
Feng__Jesse
New Contributor II
1,029 Views

Hi Steve, thanks for responding.

 

For the command line build environment, I ran setvars.bat and setvars-vcvarsall.bat. After I ran those and add the path of ifort to system path, I still cannot compile a Fortran code in system cmd. I get the following error:

 

Z:\Jesse\9 HEA\Code\ManualCompile>ifort /Qsave /real-size:64 main.for
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.8.0 Build 20221119_000000
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

modules.for(15908): remark #6536: All symbols from this module are already visible due to another USE; the ONLY clause will have no effect. Rename clauses, if any, will be honored. [HARD_LAW1_V]
use hard_law1_v
----------^
ifort: error #10037: could not find 'link'

 

In the Intel64 oneAPI CMD, it compiles successfully and runs without errors.

 

I added the @call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" to abq2019.bat as instructed in the pinned thread. Then attempting to run a similar script as the above main.for, I get the linking error and warning messages attached here.

0 Kudos
Steve_Lionel
Honored Contributor III
998 Views

A small correction - you can compile, you just can't link.

After you have done the setvars, please type the following command:

set path > path.txt

and attach path.txt to a reply here.

I would also like to see the output from the setvars.bat call.

Given that you're having this trouble, have you tried running the Abaqus bat file from the Intel compiler command prompt? There is so much we can't see here.

We don't have Abaqus - why aren't you bringing up these issues to Abaqus support? 

0 Kudos
Feng__Jesse
New Contributor II
993 Views

Regarding why not bringing issues to Abaqus - I thought I am having problems with Fortran compiler not the Abaqus side. But this is now no longer the case.

If you have the time, could you just check one last thing for me please? I looked at the linker options installed by Abaqus by default. It is shown below. When I remove the 3 lines of library related options, the linker returned a ton of warning regarding missing debugging information, plus a "LNK4006 DllMain already defined in LIBCMT.lib" warning, but the simulation actually managed to run. The multitude of library-related options used here baffles me. I will try to start a ticket with Abaqus about this but it is a very difficult process if I don't pay, which is I guess another reason why I am here instead.

link_sl=['LINK',
'/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64',#'/NOENTRY',
'/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB',
'/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB',
'/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
'/FIXED:NO', '/dll',
'/debug', # <-- Debugging
'/def:%E', '/out:%U', '%F', '%A', '%L', '%B',
'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

link_exe=['LINK',
'/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', '/STACK:20000000',
'/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB',
'/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB', '/DEFAULTLIB:kernel32.lib',
'/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
'/FIXED:NO', '/LARGEADDRESSAWARE',
'/debug', # <-- Debugging
'/out:%J', '%F', '%M', '%L', '%B', '%O',
'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

0 Kudos
Feng__Jesse
New Contributor II
991 Views

Hi Steve,

 

It turns out you are right, this might be an Abaqus problem after all. After I ran setvars in the CMD environment, I was able to compile the code and link it.

 

I am currently looking at the linker options on other machines that worked and compare to mine. Unfortunately, those machines are all Linux, but hopefully this can help me fix the issue.

0 Kudos
Steve_Lionel
Honored Contributor III
967 Views

Those link options look OK to me.

0 Kudos
Reply