- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, there,
I came across an error as follow:
"plastic5.obj : error LNK2019: unresolved external symbol _KPREPARATION@64 referenced in function _KCLOSESTPOINT
plastic5.obj : error LNK2019: unresolved external symbol _KCLOSESTPOINT@84 referenced in function _UMAT"
KPREPARATION ,KCLOSESTPOINT, and UMATare the name of the subroutine. I complie the subroutine KPREPARATION which is called in subroutine KCLOSESTPOINT. and the subroutine KCLOSESTPOINT is called in the subroutine UMAT.
is anybody know what cause this kind of error? and what does the number @64 and @84 mean in this message?
Thank you so much for your help
Jingfen Chen
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
or search for unresoved external symbol in the forum for other similar answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply. I have read the post you recommended. But still not quite sure about what exactly casues to my problem.
the error message is as follow:
"plastic5.obj : error LNK2019: unresolved external symbol _KCLOSESTPOINT@84 referenced in function _UMAT"
however my subroutine has 22 argumentsin the argument list.
SUBROUTINE KCLOSESTPOINT(TSTRESS,EQPSTRAN,STRAN,PLASTRAN,
1 COMMAT,NTENS,N,DDSDDE,P,BETA,HPSTRESS,PFSTRESS2,TAU,DLAMBDA,
2 PFSTRESS,PFEQPSTRAN,HP,STRESS,EQPSTRANK,FP1,STRPSTR,STRESSP)
the call command is as follow:
CALL KCLOSESTPOINT(TSTRESS,EQPSTRAN,STRAN,PLASTRAN,
1 COMMAT,NTENS,N,DDSDDE,P,BETA,HPSTRESS,PFSTRESS2,TAU
2 DLAMBDA,PFSTRESS,PFEQPSTRAN,HP,STRESS,EQPSTRANK,FP1,
3 STRPSTR,STRESSP)
the arguments listed in the subroutine and the call command are both 22.
I don't know why it is said "@84", then this means that I have only 21 arguments passed into the function. I don't know how the number "84" is determined. and how can I find out what cause this error. each argument has been declared in the dimension part and the type part.
DIMENSION DIFFSTRAN(NTENS),STRESS(NTENS),TAU(NTENS+1),
1 DLAMBHPS(NTENS),MATINVS(NTENS,NTENS),MATINVA(NTENS+1,NTENS+1),
2 PFA(NTENS+1),AR(NTENS+1),
3 ATAU(NTENS+1),DDSTRESEQP(NTENS+1),DDSTRESS(NTENS),
4 CDDSTRESS(NTENS),MATA(NTENS+1,NTENS+1),
5 FLOW(NTENS),COMMAT(NTENS,NTENS),PFSEQP(NTENS+1),
6 PLASTRANK(NTENS),STRESSP(NTENS),STRAN(NTENS),PLASTRAN(NTENS),
7 DDSDDE(NTENS,NTENS),HPSTRESS(NTENS),PFSTRESS2(NTENS,NTENS),
8 MATR(NTENS+1),PFSTRESS(NTENS),TSTRESS(NTENS),P(NTENS,NTENS)
DOUBLE PRECISION TOL,DLAMBDA,DDLAMBDA,DIFFSTRAN,EQPSTRANK,
1 EQPSTRAN,TAU,DLAMBHPS,MATINVS,MATINVA,PFA,PFAR,PFAT,AR,
2 ATAU,DDSTRESEQP,DDSTRESS,DDEQPSTRAN,CDDSTRESS,FLOW,COMMAT,
3 PFSEQP,STRAN,PLASTRAN,STRESS,DDSDDE,P,BETA,N,F,STRPSTR,TSTRESS,
4 HP,HPSTRESS,PFSTRESS2,MATA,MATR,PLASTRANK,STRESSP,FP1,
5 FP,SYIELD,PFSTRESS,PFEQPSTRAN
I can't figure it out.
Do you have any suggestion? thank you so much for your help?
Best Regards,
Jingfen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jingfen
CALL KCLOSESTPOINT(TSTRESS,EQPSTRAN,STRAN,PLASTRAN,
1 COMMAT,NTENS,N,DDSDDE,P,BETA,HPSTRESS,PFSTRESS2,TAU
There is a missing , at the end of the above line so you end up with ONE variable called
TAUDLAMBDA
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the call to the subroutine, however, because of the missing comma that Les pointed out to you, there are only 21 arguments, so there will be an unsatisfied reference to _KCLOSESTPOINT@84.
This mode of error checking would not have been available if you had used the default options of Intel Fortran. Are you using the CVF compiler, or are you using the IVF compiler option /interface:cvf ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess that mecej4's intention was perhaps pointing you to take advantage of using modules (i.e. explicit interfaces and other better programming practices) and not rely on the interface error checks you get by use of calling convention. He would be absolutely right.
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!Les, and thank you mecej4 and abhi.
you help me better understand this kind of error.
I spent a whole day checking for this error, and check the argument list again and again. I never thoughtthat the comma would cause the problem.
Thank you so much.
Actually, I use IVF to code the user subroutine but I am not compiling the programme in intel visual fortran interface. Thesubroutine I compiled isa user subroutine for a finite element software ABAQUS, and it is a part of the whole analysis. after I finish the coding, I have to run the ABAQUS and call this subroutine. ABAQUS use IVF to compile the subroutine. and then ABAQUS will return the compiling message into a file. I check the error message according to that file and then fix the error one by one. So most of the functions provided by IVF I cannot use them directly. Or maybe because I don't know how to use them?
Has anyone knows how to use the functions of IVF through a third party software?
Thank you so much!
Best Regards,
Jingfen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
About the use of IVF with Abaqus: One thing that I have learned from bitter experience is to remember the "implicit none" statement in the subroutines that I use with Abaqus."implicitnone"is not used in the example files provided by Abaqus. This is probably due to the fact that it conflicts with the "include 'ABA_PARAM.inc'" statement. I have found, though, that commenting out the "include.." line and add "implicit none" causes no problems in my application, so I always do this during the development phase.
Also if you subroutine calls other subroutines from the same file it is very helpfull to declare explicit interfaces to those subroutines. Some of the more advanced usersin this forumprobably knows how to use modules with IVF-Abaqus, but I haven't found out how to do that yet. Maybe this would also help getting rid of the fixed form source code requirement of Abaqus, which I find quite annoying.
I hope some of the above was useful to you, Jingfen
J_Clausen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also do that when I was coding my user subroutine, I commented out the "include ABQ_parameter.inc" and then add the implicit none,since I am afraid some of the variables I uses might have been assigned a wrong typeif I use"include ABQ_parameter.inc". And I define the types for every variables.
Cheers,
Jingfen

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