Discussion:
[OMPI users] An old code compatibility
Mahmood Naderan
2016-11-14 16:08:01 UTC
Permalink
Hi,
The following mpifort command fails with a syntax error. It seems that the
code is compatible with old gfortran, but I am not aware of that. Any idea
about that?

mpifort -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore
-I/opt/fftw-3.3.5/include -O3 -c xml.f90
xml.F:641.46:

CALL XML_TAG("set", comment="spin "
1
Error: Syntax error in argument list at (1)




In the source code, that line is

CALL XML_TAG("set", comment="spin "//TRIM(ADJUSTL(strcounter)))


Regards,
Mahmood
Jeff Squyres (jsquyres)
2016-11-14 16:42:31 UTC
Permalink
Remember that mpifort is just a wrapper over your underlying fortran compiler. If your fortran compiler can't compile your Fortran code, then neither can mpifort.

You can use the "--showme" option to mpifort to show you the command line that it is invoking under the coverts. E.g.:

mpifort -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore -I/opt/fftw-3.3.5/include -O3 -c xml.f90 --showme
Hi,
The following mpifort command fails with a syntax error. It seems that the code is compatible with old gfortran, but I am not aware of that. Any idea about that?
mpifort -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore -I/opt/fftw-3.3.5/include -O3 -c xml.f90
CALL XML_TAG("set", comment="spin "
1
Error: Syntax error in argument list at (1)
In the source code, that line is
CALL XML_TAG("set", comment="spin "//TRIM(ADJUSTL(strcounter)))
Regards,
Mahmood
_______________________________________________
users mailing list
https://rfd.newmexicoconsortium.org/mailman/listinfo/users
--
Jeff Squyres
***@cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
Mahmood Naderan
2016-11-14 19:19:54 UTC
Permalink
The output is not meaningful for me.
If I add --showme option, the output is http://pastebin.com/FX1ks8iW

and if I drop --showme, the output is http://pastebin.com/R1QFYVBe

Please search for xml.F. Do you have any idea?


Regards,
Mahmood
Jeff Squyres (jsquyres)
2016-11-14 19:44:22 UTC
Permalink
Post by Mahmood Naderan
The output is not meaningful for me.
If I add --showme option, the output is http://pastebin.com/FX1ks8iW
--showme does not compile anything. It just shows you what underlying command line *would* be invoked (if you dropped the --showme option).

mpifort (and mpicc and ...) does not actually do any compilation. The only thing it does is add some command line parameters and invoke the underlying compiler. I'm saying that --showme shows you the underlying command that will be invoked. You can invoke that yourself / verify that the right Fortran compiler is being used / etc. to see why your code is no longer compiling.
--
Jeff Squyres
***@cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
Dave Love
2016-11-15 15:05:21 UTC
Permalink
Post by Mahmood Naderan
Hi,
The following mpifort command fails with a syntax error. It seems that the
code is compatible with old gfortran, but I am not aware of that. Any idea
about that?
mpifort -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore
-I/opt/fftw-3.3.5/include -O3 -c xml.f90
CALL XML_TAG("set", comment="spin "
1
Error: Syntax error in argument list at (1)
In the source code, that line is
CALL XML_TAG("set", comment="spin "//TRIM(ADJUSTL(strcounter)))
Apparently that mpifort is running cpp on .f90 files, and without
--traditional. I've no idea how it could be set up to do that; gfortran
itself won't do it.

Loading...