CFD Online Logo CFD Online URL
Home > Forums > ANSYS

UDF in parallel (fscanf)

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

LinkBack Thread Tools Display Modes
Old   June 1, 2012, 17:03
Default UDF in parallel (fscanf)
Join Date: Jan 2012
Posts: 32
Rep Power: 7
Vitaly is on a distinguished road

I have a UDF that's using an fscanf function to scan a file with point coordinates. Everything works great in Serial, but when simulating in parallel (even with only 1 processor), specifically the fscanf function is causing the following error output:

0 (..\src\mpsystem.c@1173): mpt_read: failed: errno = 10054

0: mpt_read: error: read failed trying to read 4 bytes: No such file or directory
MPI Application rank 0 exited before MPI_Finalize() with status -1
The Parallel FLUENT process could not be started.

The function is being executed by the host.

Has anyone seen this?


Vitaly is offline   Reply With Quote

Old   October 10, 2012, 05:21
New Member
Join Date: Nov 2010
Posts: 22
Rep Power: 8
gi12 is on a distinguished road
Dear Vitaly,

If you solved your problem can you please let me know how, as I have similar error with fscanf

Many thanks,
gi12 is offline   Reply With Quote

Old   October 10, 2012, 14:18
Join Date: Jan 2012
Posts: 32
Rep Power: 7
Vitaly is on a distinguished road
Hi GI,

To be honest, I don't remember exactly what I did. Looking at my code, I the format looks like this:

real input[N];

cfPtr = fopen("finle_name.txt", "r");
for (i = 0; i<N; i++)


To be honest, I have not looked at this code in a while and don't currently have Fluent installed to check it. In fact, I found it on an old printout that I had in my desk. Nevertheless, I think it worked for me.
I should say that I would get very frustrated with Fluent compiler. Even when I took a UDF class at ANSYS, the instructor was getting frustrated also because simple function would not work. Sometimes I would try the exact same UDF on a different computer in my lab (with Fluent) and it would work with no problem!

I know this is not an ideal explanation, but I hope it helps!

Good luck!

Vitaly is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel UDF problem Lindsay FLUENT 4 June 20, 2016 09:37
"Define_Profile" UDF for parallel solver Antoine Fluent UDF and Scheme Programming 9 February 29, 2016 07:09
Help with Define on Demand UDF in Parallel Mahesh FLUENT 2 August 7, 2007 05:34
Parallel UDF Error Andrew FLUENT 2 March 30, 2007 11:11
UDF in parallel version. yobee FLUENT 0 August 17, 2004 04:12

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