Search
Close this search box.
Notifications
Clear all

Compiling user routine into object file.

17 Posts
6 Users
0 Reactions
4,791 Views
Posts: 6
Topic starter
(@lucky)
Active Member
Joined: 15 years ago

re:

Jorgen,

Yes, the full file path always works. Since, I will be using same subroutine library for running many simulations in different directories, I need to keep the path updated accordingly. If using same directory, one way would be to create a file name based on the job start time, to avoid the file I/O conflict and to keep the results distinguished.

I would like to keep different jobs in different directories, and I do not know how to do that. Should I use CNAME in the input file and subroutine, and use it to create a file name?

Alankar

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

I dont know of a simple and elegant solution to your problem. I recommend that you try the solutions that you mentioned and see what works best for you.

-Jorgen

Reply
Posts: 3
(@avin1103)
New Member
Joined: 8 years ago

Linking Abaqus and subroutines

Hello,
Im having the same problem.
I am using the 2016 version of Abaqus but still dont have a Fortran compiler. So the use of Abaqus make utility may help me.
To my understanding after reading your conversation, if I want to run analysis with a subroutine on my computer (I have only Abaqus 2016, but not any compiler), I need:

(1) Having source file [B]abc.for[/B] containing any subroutines I want to use.
(2) Using [B]Abaqus make[/B] utility on a computer that has both Abaqus and compiler to create a shared object, as follows:
[B]Abaqus make library=abc.for[/B] (2a)
(3) The command (2a) will give me an object file [B]abc-std.obj[/B] and a shared object [B]standardU.so[/B]. Right?
(4) I copy [B]only[/B] the [B]standardU.so[/B] to a directory A on my computer and setting [B]usub_lib_dir[/B]=path to directory A in Abaqus environment file, then run analysis using:
[B]abaqus job=job-name[/B] (without [B]User = ....[/B])

Is that a right procedure?

[QUOTE=alankar,5465]Hi Jorgen,

I compile it exactly as you told:

abaqus make library=myumat.f

and it gives me the following files:

myumat-std-o
libstandardU.so

Then I tried the *.so file on abaqus job command to run the simulation like this:

(1) abaqus job=myinput input=myinput user=libstandardU.so

also

(2) abaqus job=myinput input=myinput user=myumat.f

(with the above *.so library file in the local directory)

But neither work out.

(1) Showed Error: The following file(s) could not be located: libstandardU.f, libstandardU.o

(2) showed Error: A license for FCompL could not be obtained.

Am I missing something here?

Thanks for your reply.

A

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

Sounds great 🙂

Reply
Posts: 6
(@Mechanic)
Active Member
Joined: 9 years ago

[QUOTE=Jorgen,n25324]Sounds great 🙂

Hi Jorgen,

1. If we can use the .dll or .so file so easily without any compiler, then why is there are so many people asking in forums how to link intel fortran with ABAQUS?

2. What are the disadvantages of using this instead of using the compilers?

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

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

Reply
Posts: 2
(@maxbera)
New Member
Joined: 7 years ago

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 sucssefully did it in Linux and I believe it should work in Windows. Anyhelp will be appreciated.

Reply
Page 2 / 3
Share: