Prev: Libraries on Linux
Next: Write to file from DLL
From: glen herrmannsfeldt on 20 Apr 2007 16:52 ben_nielsen20(a)yahoo.com wrote: > Can subroutines be run by themselves? no. > This comes up with the same "No such file or directory" response in > the compiler. > gfortran DQAGI.f 3omega.f -o 3omega.exe It should say which file wasn't found. Note that unix file name are case sensitive, and are assumed to be in the same directory unless you say otherwise. -- glen
From: ben_nielsen20 on 20 Apr 2007 16:15 Here's what it says: C:\GFORTRAN\BIN>dir *.f Volume in drive C is System Volume Serial Number is 5852-4E18 Directory of C:\GFORTRAN\BIN 04/20/2007 12:21 PM 12,748 3omega.f 04/20/2007 12:06 PM 226,064 DQAGI.f 2 File(s) 238,812 bytes 0 Dir(s) 87,331,287,040 bytes free I've been saving both programs in Notepad. Is it necessary to save them as Unicode or ANSI file type? When I save them as ANSI I get "No such file or directory". When I save them as Unicode I get some errors: C:\GFORTRAN\BIN>gfortran dqagi.f 3omega.f -o 3omega.exe dqagi.f:1.1: \xFF\xFE SUBROUTINE DQAGI(F,BOUND,INF,EPSABS,EPSREL,RESULT,ABSERR,NEVAL, 1 Error: Non-numeric character in statement label at (1) dqagi.f:1.2: \xFF\xFE SUBROUTINE DQAGI(F,BOUND,INF,EPSABS,EPSREL,RESULT,ABSERR,NEVAL, 1 Error: Invalid character in name at (1) dqagi.f:163.22: DIMENSION IWORK(LIMIT),WORK(LENW) 1 Error: Variable 'limit' cannot appear in the expression at (1) dqagi.f:161.27: INTEGER IER,INF,IWORK,LAST,LENW,LIMIT,LVL,L1,L2,L3,NEVAL 1 Error: The module or main program array 'iwork' at (1) must have constant shap dqagi.f:163.34: DIMENSION IWORK(LIMIT),WORK(LENW) 1 Error: Variable 'lenw' cannot appear in the expression at (1) dqagi.f:160.63: DOUBLE PRECISION ABSERR,BOUND,EPSABS,EPSREL,F,RESULT,WORK 1 Error: The module or main program array 'work' at (1) must have constant shape 3omega.f:1.1: \xFF\xFEc version 1, 01-Nov-2001 1 Error: Non-numeric character in statement label at (1) 3omega.f:1.2: \xFF\xFEc version 1, 01-Nov-2001 1 Error: Invalid character in name at (1)
From: e p chandler on 20 Apr 2007 18:01 On Apr 20, 3:34 pm, Beliavsky <beliav...(a)aol.com> wrote: > On Apr 20, 2:52 pm, e p chandler <e...(a)juno.com> wrote: > > > > > > > On Apr 20, 2:21 pm, ben_nielse...(a)yahoo.com wrote: > > > > Can subroutines be run by themselves? > > > > This comes up with the same "No such file or directory" response in > > > the compiler. > > > gfortran DQAGI.f 3omega.f -o 3omega.exe > > > It might help if you show us what appears when you issue the command > > > dir *.f > > > (If you are in a fullscreen session, switch to a command prompt > > (console) window with alt-enter. Then click the icon at upper left and > > select edit then mark. Click and drag the mouse to hilight part of the > > screen. Press ENTER to copy. Now open up some other application like > > NOTEPAD and EDIT then PASTE. You now have an instant text screen shot > > suitable for including in a newsgroup posting. > > The OP should just type > > dir *.f > temp.txt > > He can open temp.txt and paste its contents wherever. It works on > Unix, too, and also for command line programs that he creates. Hope > this does not sound abrupt. Happy Friday. > Thanks for the reminder. Simple and portable (mutatis mutandis). Happy Friday. -- elliot
From: e p chandler on 20 Apr 2007 18:13 On Apr 20, 4:15 pm, ben_nielse...(a)yahoo.com wrote: > Here's what it says: > > C:\GFORTRAN\BIN>dir *.f > Volume in drive C is System > Volume Serial Number is 5852-4E18 > > Directory of C:\GFORTRAN\BIN > > 04/20/2007 12:21 PM 12,748 3omega.f > 04/20/2007 12:06 PM 226,064 DQAGI.f > 2 File(s) 238,812 bytes > 0 Dir(s) 87,331,287,040 bytes free > > I've been saving both programs in Notepad. Is it necessary to save > them as Unicode or ANSI file type? When I save them as ANSI I get "No > such file or directory". When I save them as Unicode I get some > errors: > > C:\GFORTRAN\BIN>gfortran dqagi.f 3omega.f -o 3omega.exe > dqagi.f:1.1: > > \xFF\xFE SUBROUTINE > DQAGI(F,BOUND,INF,EPSABS,EPSREL,RESULT,ABSERR,NEVAL, > 1 > Error: Non-numeric character in statement label at (1) > dqagi.f:1.2: > > \xFF\xFE SUBROUTINE > DQAGI(F,BOUND,INF,EPSABS,EPSREL,RESULT,ABSERR,NEVAL, > 1 > Error: Invalid character in name at (1) > dqagi.f:163.22: > > DIMENSION IWORK(LIMIT),WORK(LENW) > 1 > Error: Variable 'limit' cannot appear in the expression at (1) > dqagi.f:161.27: > > INTEGER IER,INF,IWORK,LAST,LENW,LIMIT,LVL,L1,L2,L3,NEVAL > 1 > Error: The module or main program array 'iwork' at (1) must have > constant shap > dqagi.f:163.34: > > DIMENSION IWORK(LIMIT),WORK(LENW) > 1 > Error: Variable 'lenw' cannot appear in the expression at (1) > dqagi.f:160.63: > > DOUBLE PRECISION ABSERR,BOUND,EPSABS,EPSREL,F,RESULT,WORK > 1 > Error: The module or main program array 'work' at (1) must have > constant shape > 3omega.f:1.1: > > \xFF\xFEc version 1, 01-Nov-2001 > 1 > Error: Non-numeric character in statement label at (1) > 3omega.f:1.2: > > \xFF\xFEc version 1, 01-Nov-2001 > 1 > Error: Invalid character in name at (1) Notepad is known to sometimes insert garbage characters at the start of files that it does not recognize as text. If you can not see these characters in Notepad, open a command window and use "EDIT filename" from the command line. EDIT has two side effects. It converts LF to CR/ LF and it strips trailing Control-Z. EDIT leaves embedded tab characters intact. Try right clicking on the link to the source file or the fullsource file, then select "save target as" (.f document type is fine) and click OK. You will get a LF delimited text file. If the compiler complains, use EDIT or any of a number of other utilities.
From: ben_nielsen20 on 20 Apr 2007 19:11
Now I'm getting this error: C:\GFORTRAN\BIN>gfortran 3omega.f 3omega.f:1.1: \xFF\xFEc version 1, 01-Nov-2001 1 Error: Non-numeric character in statement label at (1) 3omega.f:1.2: \xFF\xFEc version 1, 01-Nov-2001 1 Error: Invalid character in name at (1) Is this some of the garbage characters that Notepad puts in? |