Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

User subroutine DISP 1

Status
Not open for further replies.

pjuneja

Bioengineer
Jul 25, 2012
31
GB
Hi,

I want to use discrete set of displacements as BC for individual nodes, therefore am trying to use a user subroutine DISP.

I have been struggling with writing a user subroutine (DISP) in ABAQUS. After using lot of help from various forums, people. I have managed to write the subroutine. But, when I add this routine to my job in CAE, and submit the job for analysis. The ABAQUS seems to not do anything at all, I don’t get any error or anything in job monitor tab either. Any thoughts, what might be going wrong?

Attached are the user sub routine file (.f) file.

Thanks
Prab

 
Replies continue below

Recommended for you

First things first: Have you managed to run *any* subroutine on your machine?

If yes, then write a simple fortran code that calls your disp subroutine while providing all the required information to it. Also, make absolutely sure that your code adheres to the fortran syntax.

 
Thanks, Actually I havent namaged to run *any* subroutine on my machine. After your comment, I tried to run the example given by Abaqus in DISP example: udispxxx.inp and udispxxx.f.

This example didnt run either, the system just shows job submitted and nothing else happens.

What should I do?

Thanks
Prab
 
Are you getting any errors/warnings?

Does the job finish but you don't see the effect of you subroutine or does the job just not finish?

If it finishes then: Did you tell the job to use your subroutine? If you are using CAE then you edit the job (in the General tab). If you are using the command line you need to add a flag (I don't use the command line much so I don't know the syntax).

If it doesn't finish you might want to check to make sure you don't have an infinite loop. It's been a while since worked with subroutines but I would usually put WRITE statements for debugging. Then when I was comfortable with how it was running I just deleted them. Though it is unlikely that this is the problem with running the example.


Han primo incensus
 
I am not getting any warnings/errors, the job just stays with the submitted status.

I am adding the subroutine through job (in the general tab).

I reckon somehow the subroutines are not being recognized/processed.

Thanks
Prab
 
I dotn have Intel Fortran Complier, I will get it. For the Visual Studio, is it possible to get it for Linux?

Thanks
Prab
 
for Linux, you can also use gfortran and gcc, just change the compiler bin names in the abaqus env file!
 
Thanks sdeback, what all exactly I need to change in env file?
 
fortDefPath = '/'
ccDefPath = '/'

dirLst = glob.glob('/opt/intel/fce/10.1*')
if dirLst:
dirLst.sort()
fortDefPath = dirLst[-1] + '/bin'

dirLst = glob.glob('/opt/intel/cce/10.1*')
if dirLst:
dirLst.sort()
ccDefPath = dirLst[-1] + '/bin'

fortCompiler = "ifort"
cppCompiler = "icpc"

change ifort to gfortran and icpc to gcc
the path is probably /bin or /usr/bin or /usr/local/bin (instead of the /opt/intel/...)
Easiest to just set fortDefPath and remove the 'if'.
 
Thanks, things are moving forward. After getting gfortran (4.6) and changing the env file, and while running the ABAQUS example I get following error:

Error in job Job-1: Problem during compilation - /home/prab/udispxxx.f

Prab
 
Abaqus JOB Job-1
Abaqus 6.12-1
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens.
<1 out of 6 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
Wed Jan 9 08:02:15 2013
gfortran: error: unrecognized option ‘-auto’
gfortran: error: unrecognized option ‘-w90’
gfortran: error: unrecognized option ‘-w95’
Abaqus Error: Problem during compilation - /home/prab/udispxxx.f
Abaqus/Analysis exited with errors
 
try this in the .env file:

compile_fortran = ( "gfortran -c -O -DLINUX -I%I -fPIC" )
compile_cpp = ( "g++ -c -fPIC -DPIC -w -Wmissing-prototypes -Wuninitialized " +
"-DHKS_LINUX -DLINUX -DHAS_BOOL -DFOR_TRAIL -DHKS_DEBUG " +
"-D_BSD_TYPES -D_BSD_SOURCE -D_GNU_SOURCE " +
"-D_XOPEN_SOURCE_EXTENDED -DEMULATE_EXCEPTIONS=0 " +
"-DGL_GLEXT_PROTOTYPES -DHAVE_OPENGL -DHKS_OPEN_GL " +
"-DSUN_OGL_NO_VERTEX_MACROS -Winline -fpermissive " +
"-instances=explicit -fexceptions -fstrict-prototype " +
"-fvtable-thunks -DTYPENAME= -D_POSIX_SOURCE " +
"-D_XOPEN_SOURCE -DSPECIALIZE -O0 -I%I" )

link_sl = (fortCmd +
" -cxxlib-gcc -fPIC -#threads -shared " +
"%E -Wl,-soname,%U -o %U %F %A %L %B -#parallel -Wl,-Bdynamic " +
"-i-dynamic -lifport -lifcoremt")

link_exe = (cppCmd + " -cxxlib-gcc -fPIC " +
"-Wl,-Bdynamic -i-dynamic -o %J %F %M %L %B %O -lpthread")
 
Still getting an error though different one, below cp of log file

Abaqus JOB Job-1
Abaqus 6.12-1
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens.
<1 out of 6 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
Wed Jan 9 08:19:49 2013
End Compiling Abaqus/Standard User Subroutines
Wed Jan 9 08:19:49 2013
Begin Linking Abaqus/Standard User Subroutines
Wed Jan 9 08:19:49 2013
gfortran: error: unrecognized option ‘-cxxlib-gcc’
gfortran: error: unrecognized option ‘-#threads’
gfortran: error: unrecognized option ‘-#parallel’
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines
Abaqus/Analysis exited with errors
 
I get the same unrecognized options on my linux machine, but the subroutine works regardless. You can remove those options from the env file.
is your abaqus version the same as the manual where you got your input and fortran files from?
 
Before I was using different version of CAE (6.12) to run the example from older version (6.11).

I just tried to run in latest example in comand line, in case CAE was missing stuff during import from .inp file

I still get the same message (mentioned below). In your run do you get the last line (Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines Abaqus/Analysis exited with errors) as well?

Abaqus JOB job_test
Abaqus 6.12-1
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens.
<1 out of 6 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
Wed Jan 9 09:18:03 2013
End Compiling Abaqus/Standard User Subroutines
Wed Jan 9 09:18:03 2013
Begin Linking Abaqus/Standard User Subroutines
Wed Jan 9 09:18:03 2013
gfortran: error: unrecognized option ‘-cxxlib-gcc’
gfortran: error: unrecognized option ‘-#threads’
gfortran: error: unrecognized option ‘-#parallel’
Abaqus Error: Problem during linking - Abaqus/Standard User Subroutines
Abaqus/Analysis exited with errors
 
No, in mine it works :). Use the input file & subroutine file from the same version as your CAE!
 
ohh :), I actually tried it but with CAE gives the error I posted last. Also its the same error if try to run it in throguh comand line as well with the input and subroutine file from the current version.

Can you send me your files, I can try them to test if something is wrong with my set-up? Attached is the env file I have been using.

Thanks
Prab
 
 http://files.engineering.com/getfile.aspx?folder=f0b98d02-3d53-4251-95d3-91a79988cc56&file=abaqus_v6.env
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top