Hello dear FORTRAN users,
I am having a strange problem with my FORTRAN application. Here are some details about my application:
- Uses ALLOCATABLE Data structures to hold information
- Interfaces with a C++ dll which returns an array pointer. Interface uses the iso_c_binding standard. I convert the C++ array pointer to FORTRAN pointer using the intrinsic method c_f_pointer
- Reads from an XML file and writes outputs to an XML file, and two text files.
The application builds without any problem. I am using gfortran compiler with "Simply FORTRAN" IDE. After I built it, I tried it in debug mode within the IDE and it runs. So today morning I just thought I will double click the application EXE and see that such a launch will work. In doing so, I found out that the application is not responding. I had to go to Task manager and kill the program. I tried multiple times and everytime that happened. So just randomly, I deleted the output files created by the application and gmon.out and again double clicked the EXE. Voila, the program runs again.
It might run a few times and randomly it will freeze. Then I repeat the above process and sometimes it brings the application back to life and other times not. I am really lost what is the problem here. Is it a process of bad memory management? Is it something to do with how the C++ pointer and FORTRAN pointer is handled?
I thought it could be a problem with the debug version, so I changed the project to options to no include Debug variables. The problem however exists.
Any ideas/help/suggestion is much appreciated.
Regards
Sankar
I am having a strange problem with my FORTRAN application. Here are some details about my application:
- Uses ALLOCATABLE Data structures to hold information
- Interfaces with a C++ dll which returns an array pointer. Interface uses the iso_c_binding standard. I convert the C++ array pointer to FORTRAN pointer using the intrinsic method c_f_pointer
- Reads from an XML file and writes outputs to an XML file, and two text files.
The application builds without any problem. I am using gfortran compiler with "Simply FORTRAN" IDE. After I built it, I tried it in debug mode within the IDE and it runs. So today morning I just thought I will double click the application EXE and see that such a launch will work. In doing so, I found out that the application is not responding. I had to go to Task manager and kill the program. I tried multiple times and everytime that happened. So just randomly, I deleted the output files created by the application and gmon.out and again double clicked the EXE. Voila, the program runs again.
It might run a few times and randomly it will freeze. Then I repeat the above process and sometimes it brings the application back to life and other times not. I am really lost what is the problem here. Is it a process of bad memory management? Is it something to do with how the C++ pointer and FORTRAN pointer is handled?
I thought it could be a problem with the debug version, so I changed the project to options to no include Debug variables. The problem however exists.
Any ideas/help/suggestion is much appreciated.
Regards
Sankar