[petsc-dev] make all PETSc Fortran examples modern freeform?

Barry Smith bsmith at mcs.anl.gov
Thu Nov 7 13:46:30 CST 2013


  We had a user who had trouble because he named his file “wrong”. People have trouble dealing with .F .f .F90 meaning different things and just randomly using some extension and having it not work and not knowing how to fix it.

   Thus I proposed that we have a configure flag that force PETSc makefiles to automatically use free-form for all extensions (we could make that the default). If the user really wants fixed form (because they have old code and are too lazy to fix it) then they would configure PETSc to not use free-form for all extensions.

   Otherwise for each user that comes along we have to give an email tutorial on how to compile there code as free form or fixed form and get them to change extensions. They won’t understand and then there will be several iterations of email. This is all wasted time for both use and them.  Telling people to put a particular string attached to FFLAGS in the command line or makefile is not a good fix because they will always forget it and screw it up. 

    Thus I propose we “update” configure to handle this situation easier.

  Barry



On Nov 7, 2013, at 12:51 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Satish Balay <balay at mcs.anl.gov> writes:
>>> Surely we don't need to make *.F90 examples work with -ffixed-form.
>> 
>> yes thats what I meant. [.F90 examples should not run when configured with fixed-form]
>> 
>> Also - I don't see a big need for users to install PETSc with
>> FFLAGS=-fixed-form or FFLAGS=-free-form.
> 
> I agree that there is no point to FFLAGS=-fixed-form, but
> FFLAGS=-free-form might be needed to confirm that all our *.F files
> compile correctly as free form.
> 
>> The current default build is more univeral - and the users can either
>> name their sourcefiles .F or .F90 based on fixed/free form.
> 
> Yes, I assume Barry started the thread because it's ugly and error-prone
> to write polyglots.




More information about the petsc-dev mailing list