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

udf line 1 syntax error showing in HPC

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 30, 2024, 21:57
Default udf line 1 syntax error showing in HPC
  #1
New Member
 
Partha Pratim Roy
Join Date: Dec 2024
Posts: 3
Rep Power: 2
Griffinus is on a distinguished road
Hi,

I am trying to run a very simple udf in fluent. The udf actually makes a sinusoidal velocity with time at the inlet and as for the outlet, the gauge pressure is 0. The geometry is simple rectangular channel. When I tried to interpret the udf in my pc, no error was shown, and I was able to compile the udf as well in my pc. There was no error.

However, when I tried to interpret the udf (.c) file in the HPC, it was showing line 1 syntax error like the following:

cpp: error trying to exec 'cc1': execvp: No such file or directory Error: "/storage/coda1/p-skumar61/0/proy62/udf/unsteady_test.c": line 1: syntax error. cpp: error trying to exec 'cc1': execvp: No such file or directory Error: "/storage/coda1/p-skumar61/0/proy62/udf/unsteady_test.c": line 1: syntax error.

Can anyone help me in understanding what the problem is? i am providing the udf code below for reference:

code:

#include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position)
{

face_t f;

real t = CURRENT_TIME;


begin_f_loop(f, thread)

{

F_PROFILE(f, thread, position) = 15.0 * sin(10.*t);


}

end_f_loop(f, thread)

}
Griffinus is offline   Reply With Quote

Old   January 1, 2025, 07:35
Default
  #2
Member
 
Refik
Join Date: Dec 2014
Location: Turkey
Posts: 65
Rep Power: 12
rewol is on a distinguished road
Looks like it looks for a file but cant find it.
Here is what i do when i need a UDF in HPC environment:

1. Start a new case in local pc.
2. Compile my udf and make sure libudf folder is created.
3. Save the case with compiled udf.
4. Copy the case and libudf to same directory in HPC along with my udf file (Ex: MYUDF.C)
5. Create the case and load UDF through journal (not compile)
6. Run the case.
rewol is offline   Reply With Quote

Old   January 1, 2025, 14:40
Default
  #3
New Member
 
Partha Pratim Roy
Join Date: Dec 2024
Posts: 3
Rep Power: 2
Griffinus is on a distinguished road
Hi,

Thank you for your advice. I tried to compile it, and it is now running well. But I am facing the same issue if I try to interpret a udf in the HPC. Do you know the reason behind that?
Griffinus is offline   Reply With Quote

Old   January 2, 2025, 00:43
Default
  #4
Member
 
Refik
Join Date: Dec 2014
Location: Turkey
Posts: 65
Rep Power: 12
rewol is on a distinguished road
Hello,

Sorry but nothing comes to mind. But if compiling works, why would you use interpret? As far as i remember, you dont even need an external compiler with latest fluent versions, since it was built-in.

Best,

Refik
rewol is offline   Reply With Quote

Old   January 2, 2025, 03:29
Default
  #5
New Member
 
Partha Pratim Roy
Join Date: Dec 2024
Posts: 3
Rep Power: 2
Griffinus is on a distinguished road
Hi Refik,

Thank you for the advice. It helped a lot.
Griffinus is offline   Reply With Quote

Reply

Tags
hpc, syntax_error, 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
[Gmsh] Structured meshing in Gmsh the_phew OpenFOAM Meshing & Mesh Conversion 19 August 24, 2022 04:19
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 05:43
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 21:47.