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

The proper way of installing Visual Studio for UDF compilation 2023

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

Like Tree2Likes
  • 1 Post By this_is_mayhem
  • 1 Post By äther2344

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2023, 03:18
Default The proper way of installing Visual Studio for UDF compilation 2023
  #1
New Member
 
Join Date: Feb 2023
Posts: 2
Rep Power: 0
this_is_mayhem is on a distinguished road
I've been struggling for a week trying to solve a compilation problem. The problem was due to incorrect VS installation. I am a little resentful about the fact that such meager information is designated to this topic (even in Fluent guidelines), hence I decided to make this thread, share my solution and some thoughs.

1. Download VS installer. I use 2019 version, but I am pretty sure it works for the latest 2022 version as well (at least udf.bat script is looking for 2022 build instruments). And of course it should work for previous VS versions.
2. In the installer under Workloads page choose Desktop development with C++ and Universal Windows platform development. This is important. My whole headache was because of this.
1.jpg
3. Launch Fluent via command prompt for VS.
3.1 Find Developer Command Prompt for VS 2019 in the Start menu or just type in the search bar (it could be named different for your version of VS).
2.png
3.2 Navigate to your project directory via cd command.
3.3 Type fluent command.

Some technical discourse: personally I don't understand why there is a reason to launch Fluent via VS command prompt, because when you press Build button in Fluent, it starts udf.bat script which is essentially just doing the same thing for you.


After following these steps my problem was solved. Hope it will help somebody.
emmakateh likes this.
this_is_mayhem is offline   Reply With Quote

Old   March 10, 2024, 12:58
Default
  #2
New Member
 
Alejandro
Join Date: Aug 2023
Posts: 1
Rep Power: 0
äther2344 is on a distinguished road
Hi there, I´m currently having problems trying to use an UDF in Ansys Fluent and I tried nearly everything I could find related to Ansys Fluent.

I tried what you explained but it didnt work out for me either. I am going to quote the error I am getting, maybe some of you out there can help me out on this issue since I am still learning Ansys. Thanks in Advance

ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).
BlueLumos likes this.
äther2344 is offline   Reply With Quote

Old   March 17, 2024, 16:16
Default
  #3
New Member
 
Niall
Join Date: Mar 2024
Posts: 4
Rep Power: 2
BlueLumos is on a distinguished road
Quote:
Originally Posted by äther2344 View Post
Hi there, I´m currently having problems trying to use an UDF in Ansys Fluent and I tried nearly everything I could find related to Ansys Fluent.

I tried what you explained but it didnt work out for me either. I am going to quote the error I am getting, maybe some of you out there can help me out on this issue since I am still learning Ansys. Thanks in Advance

ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).
Hi there I've also been getting the same error but that is after loading my UDF into Ansys. My error message before that is as the follows:

uvdose_par.c(42,50): error: member reference base type 'void' is not a structure or union
par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);

It seems to indicate that line " par_fprintf_head(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,14);" of my code below has a problem.

Would you possibly know how to solve this error? I believe solving this error will also help load for parallel use on the current platform. Many thanks.

Niall
BlueLumos is offline   Reply With Quote

Reply

Tags
compilation, compilation error, fluent, udf, visual studio

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
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 04:37
The udf.h headers are unable to open- in VISUAL STUDIO 13 sanjeetlimbu Fluent UDF and Scheme Programming 4 May 2, 2016 05:38
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25


All times are GMT -4. The time now is 11:25.