|
[Sponsors] |
June 1, 2012, 18:03 |
UDF in parallel (fscanf)
|
#1 |
Member
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 14 |
Hello,
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? Thanks, Vitaly |
|
October 10, 2012, 06:21 |
|
#2 |
New Member
Join Date: Nov 2010
Posts: 22
Rep Power: 16 |
Dear Vitaly,
If you solved your problem can you please let me know how, as I have similar error with fscanf Many thanks, GI |
|
October 10, 2012, 15:18 |
|
#3 |
Member
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 14 |
Hi GI,
To be honest, I don't remember exactly what I did. Looking at my code, I the format looks like this: DEFINE_ON_DEMAND(func) { real input[N]; cfPtr = fopen("finle_name.txt", "r"); for (i = 0; i<N; i++) { fscanf(cfPtr,"&lf",&input[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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parallel UDF problem | Lindsay | FLUENT | 4 | June 20, 2016 10: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 06:34 |
Parallel UDF Error | Andrew | FLUENT | 2 | March 30, 2007 12:11 |
UDF in parallel version. | yobee | FLUENT | 0 | August 17, 2004 05:12 |