Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

SIGINI SUBROUTINE? FORTRAN COMPILER

Dear all,

I'm using abaqus 2019-Intel Compiler 19.0 Intel(R) 64 Visual Studio 2017, to run SIGINI Subroutine.

I have got fatal error LNK as you can see in the attached photo.

Have you any suggestions please !

Thank you

Best regards,

Mohamed,

Errors.PNG

0 Kudos
10 Replies
Highlighted
Retired Employee
11 Views

It looks to me as if you are

It looks to me as if you are not linking to the language support libraries that are for the compiler version used to compile procedure SIGINI. It could be that these libraries are not being linked in at all, or a much older version is referenced. We can't tell more just from the error messages.

You would have to look at the compiler environment that was set up and the commands used to link. Since you are also using Abaqus, it may be that it is using the wrong compiler and library versions.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
11 Views

Thank you for your answer,

Thank you for your answer,

The compiler works with other subroutines..

It doesn't work only for this subroutine "SIGINI". I think I'm using the wrong library version.

Have you an idea how could I change the library version ?

Thank you.

Best regards,

0 Kudos
Highlighted
Black Belt
11 Views

The linker errors appear to

The linker errors appear to be the result of attempting to build an EXE from sources that do not contain a main program.

Commonly, when users compile short Fortran source files for use with Abaqus, the objective is not to produce an EXE, but a DLL that Abaqus will then call. If this comment applies to SIGNI, you have to use a command (or the corresponding settings in Visual Studio) to build a DLL, not an EXE.

When you report error messages, you should also report the commands whose execution produced those messages. I suspect that your idea that you are using the wrong library stems from an incorrect diagnosis, and seeing the commands would enable us to confirm that suspicion.

0 Kudos
Highlighted
Beginner
11 Views

Thank you for your answer,

Thank you for your answer,

The used commands are from Abaqus Guide for SIGINI subroutine:

SUBROUTINE SIGINI(SIGMA,COORDS,NTENS,NCRDS,NOEL,NPT,LAYER, KSPT,LREBAR,NAMES)

INCLUDE 'ABA_PARAM.INC'

DIMENSION SIGMA(NTENS),COORDS(NCRDS)

CHARACTER NAMES(2)*80

SIGMA(1)=100

SIGMA(2)=100

SIGMA(3)=0

RETURN

END

I have tried to build a DLL, and it works in FORTRAN but when I added it to ABAQUS? IT dosn't work ("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.")

Best regards,

0 Kudos
Highlighted
Black Belt
11 Views

The following test code

The following test code builds and runs with no error when compiled using /warn:interfaces.

module imod
abstract interface
   subroutine psigini(sigma,coords,ntens,ncrds,noel,npt,layer,kspt,lrebar,names)
   include 'aba_param.inc'
   integer :: ntens, ncrds, noel, npt, layer, kspt, lrebar
   dimension :: sigma(ntens), coords(ncrds)
   character(len=80) :: names(2)
   end subroutine
end interface
end module

subroutine sigini(sigma,coords,ntens,ncrds,noel,npt,layer, kspt,lrebar,names)
include 'aba_param.inc'

dimension sigma(ntens),coords(ncrds)
character names(2)*80
sigma(1)=100
sigma(2)=150
sigma(3)=50
return
end

program test
use imod
include 'aba_param.inc'
character(len=80) :: names(2)
real*8 sigma(3), coords(2)
procedure(psigini) :: sigini
procedure(psigini),pointer :: pini
!
ntens=3; ncrds=2; noel=4; npt=6; layer=5;kspt=4; lrebar=10
names(1)='Name1'
names(2)='Name2'
pini => sigini
call pini(sigma,coords,ntens,ncrds,noel,npt,layer,kspt,lrebar,names)
print *,sigma
end program

You could try using the same procedure interface in your code to see if the declarations are proper.

0 Kudos
Highlighted
Retired Employee
11 Views

I don't think it's the lack

I don't think it's the lack of a main program, but linking to the wrong (or missing) Visual C++ libraries. It isn't an issue with your Fortran source, nor the Intel Fortran compiler. It is also not related to argument mismatches.

I don't have or use Abaqus so there isn't much more advice I can offer. Abaqus isn't showing you how it builds the program, and since we can't see it either, we're limited in what we can tell you.

My advice is to contact Abaqus support, as the problem you are seeing relates to how the Abaqus build system works with the Fortran compiler.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Black Belt
11 Views

Perhaps the /MAP linker

Perhaps the /MAP linker option could be used to obtain more information on what is going wrong.

0 Kudos
Highlighted
Retired Employee
11 Views

The Linker /VERBOSE option

The Linker /VERBOSE option would be even more helpful here. But I'm guessing that Mohamed isn't in control over how the Abaqus script invokes the linker, though maybe it provides a way to supply additional options. Again, this is an Abaqus issue.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor III
11 Views

Hi Mohamed,

Hi Mohamed,

I could be worth double checking the SIGINI subroutine argument list for the version of Abaqus being used, since other user subroutines compile and link with Abaqus for you.  Sometimes another argument gets added to the Abaqus user subroutine arguments for a new version of Abaqus.  That has happened to me where a previously working user subroutine quits working with an Abaqus update.  You can check the argument list given in the Abaqus user-subroutine user's manual for your version of Abaqus.

If you are using several user subroutines in your Abaqus analysis, are all the subroutines in one Fortran file?  I think we're limited to specifying just one Fortran file name in the Abaqus command line "user" argument.  If you have another user subroutine that currently works with Abaqus, what happens if you add SIGINI into that source file and try to run with Abaqus?

Regards, Greg

0 Kudos
Highlighted
Beginner
11 Views

Dear all,

Dear all,

Thank you for your answers.

I foud a way to make it works: I creat a model and I apply a predefined residual stress using abaqus, then I change the values of these residual stress using Python script, finally I add my SIGINI subroutine and it works this time. But it applies the residual stress in the last added part of my model (I will manage this).

I think it is not the proper method but it works.

I think the problem is in ABAQUS version.

Thank you again.

Best regards,

0 Kudos