Topic: Trouble with Sample Hello World
Computer: MacMini M4
OS: Tahoe 26.0.1
SimplyFortran: 3.41, Build 4435
I've been having trouble with the Build level of past programs, or at their Run Time.
I opened the HelloWorld Sample, Clicked on hello.f90 and Saved, using the second icon in the tool bar (Save).
Then, under the Project menu I selected Save the Project and it's default path - it creates a Fortran folder in my Users/MyName/folder and put the Hello folder there.
Then I clicked the Build (gear) icon and got this:
==============================================================================
Compiling hello.f90
f951: Error: unknown value 'apple-m1' for '-march'
f951: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8.7-a armv8.8-a armv8.9-a armv8-r armv9-a armv9.1-a armv9.2-a armv9.3-a armv9.4-a native
f951: note: did you mean '-mcpu=apple-m1'?
Error: Last command making (build/hello.o) returned a bad status
Error: Make execution terminated
* Failed *
In my "real life" program, I get a Complete on the Build, but when I run it, it exits apparently before reading any records.
It looks like this:
OPEN (UNIT=20, FILE = "permutationsBase10.txt", STATUS="OLD", ACTION="READ", IOSTAT=ierror)
Print *, "let the fun begin"
ierror = 0
icount = 0
resultw = ""
reorder = ""
!*******************************************
WRITE(*,*)
WRITE(*,'(A)') 'Before Read Loop'
WRITE(*,*)
DO
icount = icount + 1
Read (20,10,IOSTAT=ierror) O, T, S, H, N, I, A, C, R, Y
10 format (10I1)
WRITE(*,*)
WRITE(*,'(A)', ADVANCE = 'NO') 'READ RECORD AT '
WRITE(*,'(1I8)') icount
WRITE(*,*)
IF (ierror > 0) THEN
WRITE (*,'(A)', ADVANCE = 'NO') 'I/O Error at '
WRITE (*,'(2I8)') ierror, icount
GOTO 100
END IF
And ends with:
END DO
100 Write (*,'(A)', ADVANCE = 'NO') ' read all '
WRITE (*,'(I9)') icount
Write (*,*)
This is what I see:
let the fun begin
read all 1
So it does the Print "let the fun begin"
Then it appears to jump immediately to "read all" at the end of the program.
Those "Write" statements are not permenant code. They are just something I put in to see if the program got that far. If I did my homework, there is probably a diagnostic option to execute by stepping through the code one line at a time.
But if that simple HelloWorld example had a problem, then there might be other demons at work.
I wondered if I had downloaded the wrong version, one NOT For Silicon Mac, but looking at the website, all versions (Mac, Window, SiliconMac, have the same version numbers).
As an aside, I see that two dimensional Plotting (Aplot) is an option for Mac. It would be nice if an program that showed its use would be added to the New Projects examples.