Hi All I have multiple f95 files. I like to run a make file to compile & link the objs to create the executable files. I am using Silverfrost FTN95 Express.. Can any one help me with the sample make file for multiple f95 files compilation and linking... I tried so many options using FTN95 and SLINK, but it is failing.. Can anybody help with the perfect make file with whatever autoexec.bat configurations. I am using WIndows 7.. Thanks in advance
make file to build executable in fortran
You will find instructions and examples in ftn95.chm under FTN95->Using MK32.
Hi Paul Thanks. I followed them, but not helpful. See the makefile that I used..
Step1.exe: Step1.obj store1.obj step1_arrayhandle.obj slink step1.lnk
Step1.obj: Step1.f95 ftn95 d:\c00\lfa\step1 /check
store1.obj: store1.f95 ftn95 d:\c00\lfa\store1 /check
step1_arrayhandle.obj: step1_arrayhandle.f95 ftn95 d:\c00\lfa\step1_arrayhandle /check
It says.. step1.lnk is missing.. any clues..
The .lnk suffix is probably a bad choice of file extension name. Try changing the name of slink.lnk to slink.txt, making sure slink.txt contains the valid commands to link the program
John
Thanks John.. let me try..
Hi John The make file is working perfectly.. Thanks a lot for your help..
But I have another problem in compiler & linker... When I use /CHECK option in compilation, it gives error saying 'Salford Run-time library. Insufficient memory available for CHECK mode. Fatal run-time error' How do I get over this. I have Win7 OS and fine. The same in normal mode (without /CHECK), it runs fine.
Can you help me to fix this.
Thanks & Regards Narayanamoorthy
[/img]
We need an estimate of how much memory you need.
Do you have large arrays? How many elements? How many bytes per element?
Given an estimate of the total size, we can then determine if the error report is spurious or if you might be reaching the limit.
Alternatively, try a short program like the following and iterate with n to find out when your error occurs...
double precision,allocatable::arr(:,:)
n = 32000
allocate(arr(n,n))
end
Hi Paul Thanks for your reply. I use the arrays of array1(25:25) and array2(500) elements. I use default KIND allocations. I feel this size is very smaller.. But I will be expanding the arrays later.. But for this allocation of arrays, those error appeared..
How this insufficient memory error can be removed?
Thanks in advance
This seems odd. Can you supply a small program that illustrates the error report?
Hi Paul Good Morning.. Thanks for your reply and sample code. You are right. In my case, it can go upto 64000 size for two-ranked array. However, with /CHECK option, it stopped working while executing the exe file. If I stop the exe execution it displays the following error.
FortranApplication1.exe
Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflo w. at FortranApplication1.MAIN() in D:\C00\t00.F95:line 9
Whereas, without /CHECK option, it is done without any runtime error. In that case, it runs smoothly for even n=292000.. How do I handle this in case of /CHECK option incorporated to check the errors during run time.. Thanks
The error reports describes a bug in your program which you need to identify and fix.