Topic: Problem with compiling

Hi,

I am using the trial version of Simply Fortran on MacOS 10.14.6. When I compile a f90 code, I get errors like following and no executable is created:

xxxxxx
      |                                                1
Error: Type mismatch in argument 'cx' at (1); passed COMPLEX(16) to REAL(8)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
xxxxxx
      |                                       1
Error: Type mismatch in argument 'cx' at (1); passed COMPLEX(8) to REAL(8)
Error: Last command making (build/antiplanev5.o) returned a bad status
Error: Make execution terminated

When I compile the same code using gfortran (v8.2.0 installed earlier) in Terminal, I get warnings (not errors) similar to the ones above. However, the code compiles and I get an executable file which subsequently runs and produces the correct output. I am ok to live with the warnings and get a working code. How do I do that using Simply Fortran, which, as I said above, exits with error messages and produces no executable file.

Thanks,
Ranjith

Re: Problem with compiling

Ranjith,

I can't exactly explain the error you're seeing, but it appears you're passing a complex variable to a function/subroutine that expects a real variable.  If it is compiling with an older version of GNU Fortran, I would be suspect of the results created by any executable.

Can you provide any further information beyond the compiler errors?  If you don't want the public to see your code, you can email it to support@approximatrix.com to try to identify the issue.

Jeff Armstrong
Approximatrix, LLC

Re: Problem with compiling

Hi Jeff,

I have sent an email to the address you have given.

Thanks,
Ranjith

Re: Problem with compiling

Hi
I installed your simple fortran and want to check it using the trial version . It does  not work. I get the message: enter registration details which I do not have. How can I use it as a trial version ?

Re: Problem with compiling

sarahtuvia wrote:

Hi
I installed your simple fortran and want to check it using the trial version . It does  not work. I get the message: enter registration details which I do not have. How can I use it as a trial version ?

If you've ever tried it before, the trial would probably have expired already.  Can you send me an email at support@approximatrix.com so that I can provide a new trial code?

Jeff Armstrong
Approximatrix, LLC

Re: Problem with compiling

Hello. I am also having problems with mismatch when compiling legacy codes.  I've found the following  information. Hope this could help... (I cannot post the link): "Gfortran 10 added the default behavior to make type mismatches an error instead of a warning. Legacy Fortran programs too often did not explicitly specify the procedure interfaces to allow implicit polymorphism. The Fortran 2008 standard cleaned up this situation in part with type(*).
Workaround: Gfortran flag " -fallow-argument-mismatch " can be used to degrade the errors to warnings. It is however strongly recommended to fix the problem in the legacy code, if it’s part of your code ownership."