Search
Close this search box.
Notifications
Clear all

Compiling user routine into object file.

17 Posts
6 Users
0 Likes
4,029 Views
Posts: 2
(@maxbera)
New Member
Joined: 6 years ago

[QUOTE=Jorgen,n25441]If you have a .dll or .so file then you can use it without any compiler. It is nice and easy to use.

If you have a user-subroutine (for example in Fortran) then you need to first compile it. For that you need to use appropriate compilers.

-Jorgen

Hi Jorgen,

I still have problems with using.obj file without the Intel Fortran compiler. Let me describe the problems I had in details:

Computer A has Windows 7, ABAQUS 6.14-2,Visial Studio 2013, and Intel Fortran composer xe 2013. I can use this system run simulation with user subroutine FILM without any problem.
Computer B has Windows 7, ABAQUs 6.14-2 and Visial Studio 2013.
The purpose is to run the simulation on Computer B with user subroutine without Intel Fortran.

I used the command ABAQUS make library=Myfilm.for on Computer A, it gave me standardU.dll and Myfilm-std.obj. Copied files .cae, .dll, .obj to Computer B
[LIST]
[*]Trial 1: Directly use CAE. Put the cae file, Myfilm-std.obj, and standard U.dll under F:\TEMP. Open CAE=>go to job module=>creat job=>edit job=>under General tab user subroutine file=>select Myfilm.obj.
Submit job, I got the error message 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.
Searched this error message on Google, the conclusion is incorrect installation of VS or Intel Fortran. Since I dont have Intel Fortran installed on Computer B and the versions of ABAQUS on computer A and B are identical, this error message doesnt make any sense. I uninstalled Intel Fortran on Computer A and repeat Trial 1 on Computer A, the same error message. Therefore, in my mind, this error message indicates no Intel Fortran is installed, nothing to do with ABAQUS or VS.
[*]Trial 2: Copy Myfilm-std.obj and standard U.dll to C:\User_Subroutine on Computer B, .CAE under F:\TEMP. Set usub_lib_dir=C:\User_Subroutine in abaqus_v6.env.
a) In CAE, go to job module => creat job => edit job => under General tab user subroutine file => select Myfilm.obj => Write Input => ABAQUS comment window=> abaqus j=myjob (without user=Myfilm-std.obj)
b) In CAE, go to job module => creat job => edit job => under General tab user subroutine file => leave it blank => Write Input => ABAQUS comment window=> abaqus j=myjob (without user=Myfilm-std.obj)
Got the same error message in .msg file ***ERROR: USER SUBROUTINE FILM IS MISSING. It is hard for me to understand that without specifying the name of the subroutine file by using user=, how dose ABAQUS know which subroutine I want to use. I also cant understand Set usub_lib_dir=... in abaqus_v6.env.
[*]Trial 3: Put .cae, .obj, and .dll under F:\Temp.go to job module => creat job => edit job => under General tab user subroutine file => leave it blank => Write Input => ABAQUS comment window=> abaqus j=myjob user=Myfilm-std.obj. No .msg file generated. Found the error message in .log file Begin Linking Abaqus/Standard User Subroutines
LINK is not recognized as an internal or external command,
operable program or batch file.
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
[/LIST] Im at a dead end now. Please kindly guide me. Im sure you successfully did it in Linux and I believe it should work in Windows. Any help will be appreciated.

Reply
Posts: 3
(@madfire89)
New Member
Joined: 6 years ago

Hi everyone,

Im stuck too (following acthuongngos method). :frown:

After compilation I receive both output files (mysub-std.o and libstandardU.so) and moved the libstandardU.so to the job directory. I set a local abaqus_v6.env file within the job directory specifying the usub directory.

[CODE]abaqus_v6.env

usub_lib_dir=file:\\\c:\\abaqustemp[/CODE]

However, the message file says that the subroutine could not be found.

[CODE]job.msg

***ERROR: USER SUBROUTINE UINTER IS MISSING[/CODE]

The directory path within the env files is given in various ways (e.g. custom_v6.env). Ive tried both but none is working.

[CODE]custom_v6.env

plugin_central_dir=C:\\SIMULIA\\CAE\\plugins\\2017
doc_root=file:///C:/Program Files/Dassault Systemes/SIMULIA2017doc/English[/CODE]

[B]UPDATE[/B]

I just noticed out that the compiler (Linux) is generating the correct .so file, while my Windows machine probably will search for an .dll file.

Abaqus erstellt dabei die dynamische Bibliothek [B]libstandardU.so[/B] (MS Windows: [B]libstandardU.dll[/B]) und linkt alle statischen Bibliotheken mit dem Muster [B]/*-std.o[/B] (MS Windows: [B]/*-std.obj[/B]) hinzu.

[URL] https://wiki.ubuntuusers.de/Abaqus/ [/URL]

Yaiks. Im finished :tongue:

Reply
Posts: 3998
(@jorgen)
Member
Joined: 4 years ago

I use that approach for both Linux and Windows computers without any problem. Specifically, this is what I do:

Compile source code on one computer. Save the created dll-file (on Windows) and so-file (on Linux).

Copy the dll or so files to any other computer. On that computer specify the usub_lib_dir variable to point to this file

Run abaqus as usual on the second computer.

-Jorgen

Reply
Page 3 / 3
Share: