- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I continue with both my work and my problems.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lf\n",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lf\n",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jpprieto
Hi, I continue with both my work and my problems.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lfn",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lfn",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Quoting - jpprieto
Hi, I continue with both my work and my problems.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lfn",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
The situation: I'm running two codes in diferent lenguages, one is in f90 and the otherone in c. To do the fusion between these programs I creat all .o to link it. The .f90 program calls a function in the .c program. The link is Ok.
The problem: When I open a file from .c program the aplication is stopped with the following message:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This is the line of the error:
double IR13RM(double AEXP)
{
FILE *archsigmaLi;
double dfrec,dA,A,frecLi1,sigmaLi1,frecLi2,sigmaLi2;
archsigmaLi=fopen("sigmaLi.dat","r");
A=0.0;
fscanf(archsigmaLi,"%lf %lfn",&frecLi1,&sigmaLi1);
At the moment of scanf the program is stopped.
Some idea about what is wrong here?
An interesting thing is that when I run the .c program alone, the file is read in a good way and all is Ok.
Thank you.
I changed the file name and the result is the same: severe (174).
This mean that there is an error in the file direction *archsigmaLi, I don't know why but the sistem can not get this direction.
I changed the variable type to float and int, but the problem doesn't disappear.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, the file didn't be at the directory were I was.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page