CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   .F compiled on Winnt works, but on AIX doesn't (http://www.cfd-online.com/Forums/cfx/22448-f-compiled-winnt-works-but-aix-doesnt.html)

Daiga April 13, 2006 07:27

.F compiled on Winnt works, but on AIX doesn't
 
Hello, does anybody knows where should I look for the problem...

I had a standart script - which calculates x and y components of gradient of additional variable.

This script compiled on WINNT worked correctly. Now I am able only to use cfx account on AIX platform, (which is not on my computer but I reach it by net) and here the script (it is compiled succesfully by fortran for aix and path to aix/lib*.so is correct) anyway causes error of the solver.

source .F file is:

#include "cfx5ext.h"

dllexport(gradWx)

SUBROUTINE GRADWX( NLOC,NRET,NARG,RET,ARGS,CRESLT,CZ,DZ,IZ,LZ,RZ ) #include "MMS.h" #include "cfd_constants.h" #include "stack_point.h" C ------------------------------

INTEGER NLOC, NRET, NARG

CHARACTER CRESLT*(*)

REAL RET( 1:NLOC,1:NRET ), ARGS( 1:NLOC,1:NARG )

INTEGER IZ(*)

CHARACTER CZ(*)*(1)

DOUBLE PRECISION DZ(*)

LOGICAL LZ(*)

REAL RZ(*) C

CHARACTER*15 CFROMR

EXTERNAL CFROMR

CHARACTER*15 CFROMI

EXTERNAL CFROMI C

CHARACTER*120 SUBJ

__stack_point__ pGRAD_VAL C

CALL SET_A_0( RET, NLOC*NRET ) C

SUBJ = 'XStikls.cvar.Gradient'

CALL USER_GETVAR (SUBJ,CRESLT,pGRAD_VAL,CZ,DZ,IZ,LZ,RZ)

IF (CRESLT .NE. 'GOOD') THEN

CALL MESAGE( 'WRITE',CRESLT )

ELSE

CALL EXEC_GCALC( RET(1,1),RZ(pGRAD_VAL),NLOC )

CRESLT = 'GOOD'

END IF

END C

SUBROUTINE EXEC_GCALC( RTVAL, GRAD_PHI, NLOC )

INTEGER NLOC

REAL GRAD_PHI(3,NLOC)

REAL RTVAL(NLOC)

INTEGER ILOC C

DO ILOC=1,NLOC

RTVAL(ILOC) = GRAD_PHI(1,ILOC)

ENDDO C

END

I have faced with error like '' Unable to load symbol gradWx from /fastfs/work/niiumbra/cfx/aix/l- | | ibgrady.so: Function not implemented (gradWx)''

Message: | Stopped in routine UR_REGISTER

or (when using gradwx instead of gradWx)

Error detected by routine PEEKCS CDANAM = /FLOW/PHYSICS/LATEST/ZN1 /SL1 /AV1 /CELAVMAP CRESLT = NONE

or

Error detected by routine DELDIR CDRNAM = H D @ h ` < CRESLT = ILEG

Could anybody explain me does the name of dllexport should be the same I use in name of subroutine or there should be difference? Are there some important things in .F syntax I should use when compiling in Fortran for AIX?

Where should I look for the solution of the problem?

with best regards,

Daiga


opaque April 13, 2006 09:14

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear Daiga,

Again, would you mind posting the section of CCL where the User routine is defined, or referenced, i.e. USER ROUTINE DEFINITIONS..

The error must be an incosistency between the CCL declarations and your fortran file first few lines.. Without looking at them, it is anybody guess of what is wrong..

Good luck, Opaque..

Daiga April 13, 2006 09:33

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear, Opaque sorry, I misunderstood :) routine is defined like that - where in a place of Library name is a correct path to folder aix with all .so and .dll files

USER ROUTINE DEFINITIONS:

USER ROUTINE: gxRoutine

Calling Name = gradWx

Library Name = gradWx

Library Path =

Option = User CEL Function

opaque April 13, 2006 10:01

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear Daiga,

That is the problem.. Please change to

USER ROUTINE DEFINITIONS:

USER ROUTINE: gxRoutine

Calling Name = gradwx

Library Name = gradWx

Library Path =

Option = User CEL Function

The Fortran compilers in UNIX (by default) change the routines names to lowercase, and the calling name must be exact, or the linker will never find it.. Windows, on the other hang is "case blind"; therefore, whatever you type works..

Good luck, Opaque..


Daiga April 14, 2006 09:00

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear opaque,

unfortunately also calling name gradwx & library name gradWx & correct path to the folder aix lead to error...What else should be changed?

Error detected by routine PEEKCS CDANAM = /FLOW/PHYSICS/LATEST/ZN1 /SL1 /AV1 /CELAVMAP CRESLT = NONE WARNING: CFXSTP called recursively. An error has occurred in cfx5solve:


opaque April 17, 2006 09:00

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear Daiga,

These are two different errors.. Using calling name gradwx, and library name gradWx seems to be working since you past the library loading problem.

The second error is due to accessing the content of an additional variable that is not defined in a solid domain.. Which is the name of the ADDITIONAL VARIABLE in your command file (CCL), and what variable are you calling using USER_GETVAR.

Good luck, Opaque..

Daiga April 17, 2006 13:30

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear opaque, I am not sure have I understood the question..

An additional variable cvar is defined in the fluid domain only and the name of the fluid is XStikls.

There is also a solid domain in my model, but the variable cvar is not defined there (I do not need it in the solid domain).

opaque April 17, 2006 13:58

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear Daiga,

Your USER CEL Function is being called for the AV in the solid domain.. I am not sure why, but USER CEL Function must be able to support calls for any domain.. If you are not interested in the value on the solid domain, check which domain is being called for and return 0, or CRESLT different from 'GOOD'.. You should probably need to call USER_CALC_INFO to get the CZONE, and convert_name_s2u to get the Domain name..

This calls are all documented.. Good luck, Opaque..


Daiga April 18, 2006 07:57

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear opaque, could you please clearify what you mean?

In my model the transport equation is solved for AV cvar, I can not solve transport equation in the solid domain so I have not defined cvar there and there could not exist the value for cvar.gradient because there is not cvar. On the fluid-solid boundaries of course I have given cvar=0 or zero flux.In winnt the conditions were the same...

opaque April 18, 2006 09:06

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear Daiga,

I am sorry, but I think that you should contact help desk and they should be able to sort this out..

Opaque..


dorothy May 9, 2006 02:54

addresses
 
compiled email addresses of 2006 till date and date to date email addreses in south america and north america and asia


Daiga May 9, 2006 07:44

Re: .F compiled on Winnt works, but on AIX doesn't
 
Dear opaque, very strange but when I tried the same again after large time, somehow finally it helped:))) Thanks! Daiga


All times are GMT -4. The time now is 15:39.