hexagon logo

How do I properly set up a user written subroutine solver (CNFSUB, GFOSUB ,etc.)? The sysary and errmess functions used in most of the c_usersubs cannot be located.

When trying to build a user written subroutine using CNFSUB for example, I faced two issues:
 
1) the errmess and impact functions could not be found
2) While Adams was linked with my dll, creating a custom solver, the path to certain libraries was not found
 
Are there any standard steps in linking my dll to the adams solver? Is there any example code available?
 
Thank you in Advance
  • #1: Have a look at the include file slv_c_utils.h which is used in all C user subroutines. You will find the c_errmes and the c_impact functions.
    #2: You need to run in a command prompt which has all the right path settings, etc.
    If you have both C and FORTRAN subroutines you should use the Intel Parallel Studio command prompt.
    If you only use C user subroutines, you can use the Developer Command Prompt from Visual Studio.
    Note that if you don't have FORTRAN subroutines to link, you need to set the following environment variable prior to building your user-dll:
    set NO_FORTRAN=1
    Search for NO_FORTRAN in the Adams online help to learn more about this