CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF library trying to load is not compiled for parallel use on the current platform

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2021, 12:39
Default UDF library trying to load is not compiled for parallel use on the current platform
  #1
New Member
 
Arjun Sajith
Join Date: May 2021
Posts: 4
Rep Power: 5
Arjunsajith is on a distinguished road
I am working with ANSYS Fluent 19.2 and VS2017 and when I try to build & load my UDF i get the following error:
The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).
The system cannot find the file specified.
I found that when building the UDF it does not seem to complete the process. The message is as follows:
Error: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).\n\nThe system cannot find the file specified.
\n\nC:\Users\theki\Desktop\ansys\pcm_files\dp0\FFF \Fluent\libudf\win64\3d_host\libudf.dll
Error Object: #f

I started Fluent in serial as well as parallel mode. Error exists in both mode.
Anyone got a clue what the problem might be?


Thanks in advance

Arjun
Arjunsajith is offline   Reply With Quote

Old   May 28, 2021, 12:53
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Yes, you probably missed an error during compiling. Check my signature.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   May 28, 2021, 13:11
Default
  #3
New Member
 
Arjun Sajith
Join Date: May 2021
Posts: 4
Rep Power: 5
Arjunsajith is on a distinguished road
Copied C:\Users heki\Desktop\ansys\pcm_files\dp0\FFF\Fluent rail.c to libudf\src
Creating user_nt.udf file for 3d_host ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\sr c\udf\makefile_nt.udf "libudf\win64\3d_host\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\3d_host")# Generating ud_io1.h
trail.c
C:\PROGRA~1\ANSYSI~1\v192\fluent\fluent19.2.0\src\ main\global.h(9): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
Creating user_nt.udf file for 3d_node ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\sr c\udf\makefile_nt.udf "libudf\win64\3d_node\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\3d_node")# Generating ud_io1.h
trail.c
C:\PROGRA~1\ANSYSI~1\v192\fluent\fluent19.2.0\src\ main\global.h(9): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory

Done.



This is the error while building.

How do i deal with this error .

Thanks in advance

Arjun
Arjunsajith is offline   Reply With Quote

Old   May 28, 2021, 13:25
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Read it.

It says there is a problem on line 9. You try to include stdio.h, but that file does not exist.

Why do you include that file? You don't need that in Fluent UDFs...
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   May 29, 2021, 09:06
Default
  #5
New Member
 
Arjun Sajith
Join Date: May 2021
Posts: 4
Rep Power: 5
Arjunsajith is on a distinguished road
This is the code i have used for the UDF . I have not given stdio.h command but still it is having this error.


#include "udf.h"

DEFINE_PROPERTY(PCM_density,cell,thread)
{

real tempe2,r;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
r=785;
else if ((tempe2 > 298.6) && (tempe2 < 300.6))
{

r=785-(36*(tempe2-298.6)/2);
}

else if (tempe2 >= 300.6)
{
r=749*(1-0.001*(tempe2-300.6));
}
#endif
return r;

}

DEFINE_PROPERTY(PCM_Dynamicviscosity,cell,thread)
{
real tempe2,mu;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
mu=1;
else if ((tempe2 > 298.6) && (tempe2 <= 300.5))
mu=(300.6-tempe2)/2;
else if ((tempe2 > 300.5) && (tempe2 <= 300.6))
mu=(300.6035-tempe2)/2.07;
else if (tempe2 > 300.6)
mu=0.00169;
#endif
return mu;
}

DEFINE_PROPERTY(PCM_thermalconductivity,cell,threa d)
{
real tempe2,k;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
k=0.19;
if ((tempe2 > 298.6) && (tempe2 < 300.6))
{
k=0.19-(0.01*(tempe2-298.6)/2;
}
else
{
k=0.18;
}
#endif
return k;
}

DEFINE_SPECIFIC_HEAT(PCM_specificheat, T, Tref, h, yi)
{
real cp,dnum;
#if !RP_HOST
if (T <= 298.6)
cp=1800;
if ((T > 298.6) && (T < 300.6))
{
cp=1800+(600*(T-298.6)/2);
}
else
{
cp=2400;
}
*h=cp;
#endif
return cp;
}
Arjunsajith is offline   Reply With Quote

Old   May 29, 2021, 12:09
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
O, I see. I'm sorry, I did not look good enough, the error is in global.h, not in your code.

I guess that you have never compiled before with this installation? If so, it's good to mention that next time.

The problem is in the compiler installation (VS2017): it looks like not all files are included, or they are not configured good. This has nothing to do with your code.

The bad news: I have no idea how to fix this. Reinstall is the only thing I can think of.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   October 3, 2021, 09:35
Default
  #7
New Member
 
Parvaneh Zare
Join Date: Jul 2021
Posts: 4
Rep Power: 5
Parvaneh is on a distinguished road
Quote:
Originally Posted by Arjunsajith View Post
This is the code i have used for the UDF . I have not given stdio.h command but still it is having this error.


#include "udf.h"

DEFINE_PROPERTY(PCM_density,cell,thread)
{

real tempe2,r;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
r=785;
else if ((tempe2 > 298.6) && (tempe2 < 300.6))
{

r=785-(36*(tempe2-298.6)/2);
}

else if (tempe2 >= 300.6)
{
r=749*(1-0.001*(tempe2-300.6));
}
#endif
return r;

}

DEFINE_PROPERTY(PCM_Dynamicviscosity,cell,thread)
{
real tempe2,mu;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
mu=1;
else if ((tempe2 > 298.6) && (tempe2 <= 300.5))
mu=(300.6-tempe2)/2;
else if ((tempe2 > 300.5) && (tempe2 <= 300.6))
mu=(300.6035-tempe2)/2.07;
else if (tempe2 > 300.6)
mu=0.00169;
#endif
return mu;
}

DEFINE_PROPERTY(PCM_thermalconductivity,cell,threa d)
{
real tempe2,k;
#if !RP_HOST
tempe2 = C_T(cell,thread);
if (tempe2 <= 298.6)
k=0.19;
if ((tempe2 > 298.6) && (tempe2 < 300.6))
{
k=0.19-(0.01*(tempe2-298.6)/2;
}
else
{
k=0.18;
}
#endif
return k;
}

DEFINE_SPECIFIC_HEAT(PCM_specificheat, T, Tref, h, yi)
{
real cp,dnum;
#if !RP_HOST
if (T <= 298.6)
cp=1800;
if ((T > 298.6) && (T < 300.6))
{
cp=1800+(600*(T-298.6)/2);
}
else
{
cp=2400;
}
*h=cp;
#endif
return cp;
}

Hi, Could you please let me know whether you solved the problem?
Parvaneh is offline   Reply With Quote

Old   October 3, 2021, 15:58
Default
  #8
New Member
 
Arjun Sajith
Join Date: May 2021
Posts: 4
Rep Power: 5
Arjunsajith is on a distinguished road
Sorry, I did not get any solution.
Arjunsajith is offline   Reply With Quote

Old   October 3, 2021, 17:13
Default
  #9
New Member
 
Parvaneh Zare
Join Date: Jul 2021
Posts: 4
Rep Power: 5
Parvaneh is on a distinguished road
Quote:
Originally Posted by Arjunsajith View Post
Sorry, I did not get any solution.

Thank you for your quick response. I found the solution. After installing Microsoft Visual Studio, the problem has been solved. Since I am using compiling, an external compiler such as Microsoft Visual Studio is required.



Thanks
Parvaneh is offline   Reply With Quote

Old   December 9, 2021, 07:36
Default
  #10
New Member
 
central province
Join Date: Oct 2020
Posts: 9
Rep Power: 6
Krasa is on a distinguished road
Please I am also having same issue which version of VS you have installed
Krasa is offline   Reply With Quote

Old   December 9, 2021, 07:47
Default
  #11
New Member
 
Parvaneh Zare
Join Date: Jul 2021
Posts: 4
Rep Power: 5
Parvaneh is on a distinguished road
Quote:
Originally Posted by Krasa View Post
Please I am also having same issue which version of VS you have installed

Microsoft Visual Studio 2010. This version works well with most of the ANSYS versions.
Parvaneh is offline   Reply With Quote

Old   June 7, 2023, 06:20
Default
  #12
New Member
 
Damir
Join Date: Apr 2023
Posts: 7
Rep Power: 3
salkynbekov is on a distinguished road
Quote:
Originally Posted by Arjunsajith View Post
Sorry, I did not get any solution.
Hello,


for me with UDF I get bad results.

If I use constant paramters and Boussinesq aproximation it gives me good convergense with experimental setup.

Did you get any results, could you share with your study?

Best Regards.
salkynbekov is offline   Reply With Quote

Old   January 31, 2024, 13:11
Default
  #13
New Member
 
Marshall McCray
Join Date: Mar 2023
Location: Houston, TX
Posts: 10
Rep Power: 3
marshallmccray is on a distinguished road
I solved the problem by removing "&" from the name of my working directory. I know this is a one-off solution but posting here in case it helps.
marshallmccray is offline   Reply With Quote

Old   July 25, 2024, 16:47
Default
  #14
New Member
 
Camila Solano
Join Date: Mar 2024
Posts: 3
Rep Power: 2
Camiwu is on a distinguished road
hello, did you solved this problem? I'm using Fluent 2023, and VS 2022 version
Camiwu is offline   Reply With Quote

Old   August 3, 2024, 00:13
Default
  #15
New Member
 
Anurag Bhattacharjee
Join Date: Jun 2024
Posts: 3
Rep Power: 2
Anurag_B is on a distinguished road
I had faced this problem as well. I seem to have gotten rid of this problem by opening fluent from "x86_x64 Cross Tools Command Prompt for VS 2019".

Open x86_x64 Cross Tools Command Prompt for VS 2019 (or your installed version) and navigate to the fluent directory and open fluent from there. This gets rid of a lot of warning for me too.
Anurag_B is offline   Reply With Quote

Old   August 19, 2024, 15:02
Default
  #16
New Member
 
Camila Solano
Join Date: Mar 2024
Posts: 3
Rep Power: 2
Camiwu is on a distinguished road
I've opened Fluent the way you mentioned but still got the same error.
I'm opening fluent using the following directory structure: fluent.exe 2ddp -t4 -mpi=intel

please let me know if there is something wrong with that. I only face this issue when in my code I want to write a .txt file, otherwise it loads well.
Camiwu is offline   Reply With Quote

Reply

Tags
ansys 19.2, fluent, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Current density visualisation (PEM fuel cell add-on module) pchoopanya FLUENT 10 August 21, 2023 15:33
UDF: How to load data from an external file into a vector EmiS Fluent UDF and Scheme Programming 17 January 14, 2019 02:55
UDF library load error smgeorge531 Fluent UDF and Scheme Programming 6 August 26, 2013 05:06
cannot load UDF library jayilosa Fluent UDF and Scheme Programming 3 November 16, 2011 13:44
setting up compiled UDF library in windows2000 sivakumar FLUENT 1 October 19, 2001 04:46


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