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

Error code: 126 loading compiled udf library into fluent

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2020, 10:20
Default Error code: 126 loading compiled udf library into fluent
  #1
New Member
 
Tom Rich
Join Date: Feb 2019
Posts: 4
Rep Power: 7
Perigee is on a distinguished road
I am trying to load a udf library into fluent and consistently get error code 126, I have successfully loaded other udfs into this version of fluent and have attempted to load this library into both fluent 20.0.1 and 18.2 with no success. I have been tried compiling with the default compiler and also with Visual Studio 2019. I have also tried loading fluent without parralel processing enabled. I suspect that this error is due to having tensorflow as an include library, I have linked tensorflow as shown below
Code:
#include "C:\Program Files\ANSYS Inc\v201\fluent\include\tensorflow\c\c_api.h" 
#pragma comment(lib, "C:/Program Files/ANSYS Inc/v201/fluent/lib/tensorflow.lib")
When building my code I get a few warnings but no errors and these dont seem to be what is blocking the loading.
Code:
C:\Program Files\ANSYS Inc\v201\fluent\include\tensorflow\c\c_api.h(935): warning C4190: 'TF_NewWhile' has C-linkage specified, but returns UDT 'TF_WhileParams' which is incompatible with C
C:\Program Files\ANSYS Inc\v201\fluent\include\tensorflow\c\c_api.h(891): note: see declaration of 'TF_WhileParams'
C:\Users\Tom\Desktop\DeepLearningFLUENTsims\PlanarJet1.6_tempslice_files\dp0\FLU-1\Fluent\libudf_vrr\src\StaticLib_VRR2.cpp(71) : warning C4700: uninitialized local variable 'cx_cell' used
If anyone has any ideas on solving the error 126 I would appreciate it
Perigee is offline   Reply With Quote

Old   July 24, 2020, 00:57
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
there is a special workflow for linking external (precompiled) libraries to UDF
you may find it in ANsys Fluent Customization manual
Perigee likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   May 27, 2022, 03:14
Default
  #3
New Member
 
You Wu
Join Date: Nov 2018
Posts: 16
Rep Power: 7
Youwu is on a distinguished road
Hi,
Have you solved this problem? I'm now facing the same issue when loading an external library. I'm now using Fluent 19.3(2019r1) and VS 2017. I didn't get the error message when compiling the udf, but received error 126 when I tried to load the udf.
Youwu is offline   Reply With Quote

Old   August 25, 2022, 14:15
Default
  #4
New Member
 
Liu Wenchao
Join Date: Jan 2021
Posts: 15
Rep Power: 5
ChaoLW is on a distinguished road
Hi, Youwu!
Did you find the solution?
Quote:
Originally Posted by Youwu View Post
Hi,
Have you solved this problem? I'm now facing the same issue when loading an external library. I'm now using Fluent 19.3(2019r1) and VS 2017. I didn't get the error message when compiling the udf, but received error 126 when I tried to load the udf.
ChaoLW is offline   Reply With Quote

Reply

Tags
error 126, fluent, fluent udf, udf


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
UDF library loading problem: parallel processing rishitosh FLUENT 1 May 26, 2019 22:39
Compiling and loading UDF using Batch ALBATTROSS FLUENT 3 May 20, 2019 21:50
Problem loading UDF in Linux environment hjan23 FLUENT 0 December 15, 2017 04:09
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
Creating UDF and loading it in ANSYS Fluent singingfish Fluent UDF and Scheme Programming 1 February 7, 2014 12:10


All times are GMT -4. The time now is 01:59.