|
[Sponsors] |
User Fortran in Linux - segmentation violation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2015, 14:50 |
User Fortran in Linux - segmentation violation
|
#1 |
New Member
Claudia
Join Date: May 2014
Posts: 7
Rep Power: 12 |
I wrote a Fortran code to implement my outlet boundary conditions in CFX and I created a user CEL function. When I run it on Windows, it works perfectly fine. However, when I try to run my simulations on a Linux Cluster it crashes before the simulation starts.
I re-compiled the code on Linux and updated all the folders and library names. The error I get is: +--------------------------------------------------------------------+ | Initial Conditions Supplied by Fields in the Input Files | +--------------------------------------------------------------------+ Domain Name : Pores Absolute Pressure Courant Number Dynamic Viscosity Effective Density at End of Timestep Pressure Pressure.Gradient Real Partition Number Shear Strain Rate Shear Strain Rate.Trnavg Specific Volume Total Pressure User Momentum Source.Bforce Velocity Velocity.Beta Velocity.Gradient Volume Porosity Slave: 3 Begin USER_INPUT Slave: 3 End USER_INPUT Parallel run: Received message from slave ----------------------------------------- Slave partition : 3 Slave routine : ErrAction Master location : RCVBUF,MSGTAG=1214 Message label : 001100279 Message follows below - : +--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | | Message: | | Signal caught: Segmentation violation | | | | | | | | | | | +--------------------------------------------------------------------+ Parallel run: Received message from slave ----------------------------------------- Slave partition : 3 Slave routine : ErrAction Master location : RCVBUF,MSGTAG=1214 Message label : 001100279 Message follows below - : +--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | | Message: | | Stopped in routine FPX: SIG_HANDLER | | | | | | | | | | | +--------------------------------------------------------------------+ Does anyone have any idea of what this might be? Thanks a lot, Claudia |
|
September 12, 2015, 07:23 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
Looks like a bug in your fortran. Check the simulation runs OK without your fortran. Then put some debugging statements (outputting key variables) in your fortran to find the source. You are probably dividing by zero somewhere.
|
|
September 12, 2015, 07:41 |
|
#3 |
Senior Member
Join Date: Feb 2011
Posts: 496
Rep Power: 18 |
It seems you try to touch memory which is not allowded to touch. You may try to debug your code to find the actual place.
|
|
September 12, 2015, 11:16 |
|
#4 |
New Member
Claudia
Join Date: May 2014
Posts: 7
Rep Power: 12 |
Thank you for your replies. The simulation works well without the Fortran code. It looks like CFX is able to read the code and execute it (it does output the pressure value when I introduce the line write(*,*)'P=',RET(1,1)):
Begin USER_INPUT P= 11168.30 End USER_INPUT I put some debugging statements and it looks like the code crashes right at the end of the subroutine at the line: CRESLT = 'GOOD' I am quite surprised because exactly the same Fortran code works on Windows. Any ideas of what this might be? |
|
September 13, 2015, 07:20 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
Are you using the recommended fortran compiler?
|
|
March 30, 2016, 23:20 |
|
#6 |
New Member
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
Hi, i have the same problem. The CFX version is 15.0, the linux intel fortran compiler is test from 2011~2015. Did you solve the problem?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing external DLL to Ansys CFX using user Fortran | snpradeep | CFX | 2 | May 16, 2014 04:52 |
Particle Transport & Termination Control with User FORTRAN | Julian K. | CFX | 3 | January 12, 2012 10:48 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
User Fortran and interior node information | John | CFX | 0 | August 26, 2008 23:24 |