CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

User Fortran in Linux - segmentation violation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2015, 14:50
Default User Fortran in Linux - segmentation violation
  #1
New Member
 
Claudia
Join Date: May 2014
Posts: 7
Rep Power: 12
clau90 is on a distinguished road
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
clau90 is offline   Reply With Quote

Old   September 12, 2015, 07:23
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   September 12, 2015, 07:41
Default
  #3
Senior Member
 
Join Date: Feb 2011
Posts: 496
Rep Power: 18
Antanas is on a distinguished road
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.
Antanas is offline   Reply With Quote

Old   September 12, 2015, 11:16
Default
  #4
New Member
 
Claudia
Join Date: May 2014
Posts: 7
Rep Power: 12
clau90 is on a distinguished road
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?
clau90 is offline   Reply With Quote

Old   September 13, 2015, 07:20
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Are you using the recommended fortran compiler?
ghorrocks is offline   Reply With Quote

Old   March 30, 2016, 23:20
Default
  #6
New Member
 
Join Date: Mar 2009
Posts: 2
Rep Power: 0
klarke is on a distinguished road
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?
klarke is offline   Reply With Quote

Reply


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
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


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