CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   The UDF library you are trying to load (libudf) is not compiled for 3d on the current (https://www.cfd-online.com/Forums/fluent-udf/152332-udf-library-you-trying-load-libudf-not-compiled-3d-current.html)

vigii April 29, 2015 02:50

The UDF library you are trying to load (libudf) is not compiled for 3d on the current
 
Hi All,

I'm trying to do a dynamic meshing using custom UDF. I have installed microsoft visual c++ 2010 express & Microsoft SDK v7.0 and .NET 3.5.

I tried opening the Fluent V14.5 from SDK CMD Shell and compile my UDF. But Whenever, I try compile my UDF I get an error as follows

"The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64)."

It would be really helpful if someone assist me in resolving this issue.

Please let me know if you require additional details to resolve this error.

Regards,
Vignesh V.

pakk April 29, 2015 05:12

The error message tells you what you did, and what went wrong.

Quote:

"The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64)."[emphasis mine]
First keyword: load. This is the error message you get when you try to load the udf. In your post you say it is the error message when you try to compile, but that is simply not true.

Second keyword: not compiled. Your code is not compiled. The obvious solution for this: compile your code.
If you have problems compiling your code, show the message you get when you try to compile your code. Not the error message you get when you try to load your code.

vigii April 29, 2015 05:18

Please find the error displayed as below

HTML Code:

Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor.c to libudf\src
Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor_vane_smoothing.c to libudf\src
udf_names.c file in 3ddp is upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v145\fluent"\fluent14.5.0\src\makefile_nt.udf "libudf\win64\3ddp\makefile" ")
        1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
gerotor.c
..\..\src\gerotor.c(540) : error C2143: syntax error : missing ';' before 'type'
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
gerotor_vane_smoothing.c
Generating Code...

Done.

Opening library "C:\Users\vignesh.v\Desktop\gerotor_test\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).

The system cannot find the file specified.

C:\Users\vignesh.v\Desktop\gerotor_test\libudf\win64\3ddp\libudf.dll
Error Object: #f


pakk April 29, 2015 05:23

Look at the first error you see:
Quote:

..\..\src\gerotor.c(540) : error C2143: syntax error : missing ';' before 'type'
I'll go through it step by step.

"..\..\src\gerotor.c": This means that the error is in this file. This is probably the file you are working on.

"(540)": this is the line number in which the error is.

"error C2143: syntax error": this is the type of error. An error in the syntax.

"missing ';' before 'type'": you forgot to type a ';', and probably it should go somewhere before 'type'. If 'type' is the first word on that line, you probably forgot a ';' on the line before.

vigii April 29, 2015 06:03

Hi Pakk,

But the same file is compiling in Linux version of Ansys.

Can you help me in compiling in Windows version of Ansys.

Regards,
Vignesh V.

pakk April 29, 2015 06:06

I am doing that. I tell you where the mistake is, and what you should change. What more do you want? Do you expect me to hack into your computer and change the code for you? ;)

vigii April 29, 2015 08:18

I can share my screen or provide remote access to fix this issue. Kindly please help me in fixing this issue.

pakk April 29, 2015 08:24

I have already told you what to do.
If you already did that: what was the outcome?
If you did not do that: why did you not do that?

vigii April 29, 2015 12:53

1 Attachment(s)
I have tried the same file in linux which is working good. My question is why its not compiling in Windows. The errors which are listed are meaningless and If you can really help me I would appreciate it. Please find the attached file for your reference.

pakk April 30, 2015 02:50

For you the errors may be meaningless, but that is why I explained you what the error is.

Did you do anything with that information? Nobody expects you to suddenly become a programming expert, but when I show you in which file the error is, and in which line number, I am sure you could have looked up which line that is. Did you even do that?

vigii April 30, 2015 05:58

If you could help me, Please help or give way to those who could resolve my issue.

pakk April 30, 2015 06:42

If you don't want to be helped, then don't come here. If you want to be helped, take the advice you get.

It are three simple steps:
1. Look at the code where the error is.
2. Understand the error.
3. Fix the error.

I can help you in all three steps. But you have to do something. I instructed you several times to do the first step, but for some reason you just don't do that.

Look at line 540 of the file 'gerotor.c'. I can't give instructions in a simpler way than this. You can't fix code without looking at the code, so you will have to look at the code. Do that!

pakk May 1, 2015 08:07

I notice that you don't follow my advice. I also see that you keep saying that you would appreciate it if I could help you, this gives the impression that for you it does not feel as if I am helping you.

On the other hand, I feel as if I am doing everything I can do to help you. I explained you what you first error message meant, I explained step by step what your second error message meant, I translated the error message into plain English, and I told you three times that the key to your solution would be to look up line 540. I really don't know what more you can reasonably expect from anybody to help you.

Can you tell me what I did to give you the feeling that I am not helping?

vigii May 2, 2015 09:09

I found the error is because of c++ C90 compiler incompatibility.

vigii May 2, 2015 09:13

I have fixed the error by changing the compiler. Now the file is compiling and when I load these compiled UDF I get this error as below

HTML Code:

Error:
c:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\win64\3ddp\fl1450s.exe received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f


shivakumar May 3, 2015 13:54

Track your udf.

Use Message("line 1 is correct"\n); after each and every line. This is easiest method to get rid of from the access violation error. Hope this helps

shiv

vigii May 4, 2015 08:24

Hi Shivakumar,

My UDF is compiling and hope there is no error in compilation. But when I load UDF its is throwing out the error as above. Can you please tell me why do I get this error.

Regards,
Vignesh

shivakumar May 4, 2015 09:10

I had the same problem earlier.

I can give an example

Code:

----
----
---
real origin[2], theta_inner, theta_outer, dtheta_inner, dtheta_outer;
Message(" above line 1 is correct\n");

    dtheta_inner=RPM*M_PI/30*dtime;
Message(" above line 2 is correct\n");

    dtheta_outer=Num_Gears_Inner/(Num_Gears_Inner+1.0)*dtheta_inner;
Message(" above line 3 is correct\n");

    theta_inner=RPM*M_PI/30*time+RP_Get_Real("dynamesh/in-cyn/crank-start-angle")*M_PI/180;
Message(" above line 4 is correct\n");

    theta_outer=Num_Ge
---
----

In this manner you should debug your code using message statement. You code has 802 lines so I recommend you to use the Message properly where you feel there is some difficulty.


shiv

yash.aesi June 8, 2016 01:21

UDF comilation error on Linux system
 
1 Attachment(s)
Hello ,

when I am compiling one UDF on window its working fine but the same case when I am trying on the Linux system that time its not getting compiled and giving the below shown error.

Thanks in advance.

Regards,
Sonu.

pakk June 8, 2016 02:57

It is very difficult to find the mistake in your code without seeing your code.

My best guess is that you wrote a comment on line 66 or line 67 like this:
Code:

\\this is a comment
This is not the right way to write comments in c (although the windows-compiler accepts it), and the linux-compiler complains about it.
The correct way to write comments:
Code:

\* this is a comment *\
If you want me to give a better guess, you really have to show your code, at least the part around line 67.


All times are GMT -4. The time now is 06:08.