ForestClaw / forestclaw

Quadtree/octree adaptive PDE solver based based on p4est.
http://www.forestclaw.org
BSD 2-Clause "Simplified" License
58 stars 22 forks source link

Building f90 modules using autoconf/autotools : Get correct dependencies. #70

Open donnaaboise opened 9 years ago

donnaaboise commented 9 years ago

Originally reported by: Donna Calhoun (Bitbucket: donnaaboise, GitHub: donnaaboise)


Problem with compiling f90 code (see branch claw5.0) :

#!bash
  F77      src/solvers/fclaw2d_clawpack5.0/fortran_source/flux2.lo
../forestclaw/src/solvers/fclaw2d_clawpack5.0/fortran_source/flux2.f:57.9:

      use amr_module                                                    
         1
Fatal Error: File 'amr_module.mod' opened at (1) is not a GNU Fortran module file
Makefile:1698: recipe for target 'src/solvers/fclaw2d_clawpack5.0/fortran_source/flux2.lo' failed
gmake[1]: *** [src/solvers/fclaw2d_clawpack5.0/fortran_source/flux2.lo] Error 1
gmake[1]: Leaving directory '/Users/calhoun/projects/ForestClaw/code/forestclaw-build'
Makefile:1848: recipe for target 'all-recursive' failed
gmake: *** [all-recursive] Error 1

donnaaboise commented 9 years ago

Original comment by Donna Calhoun (Bitbucket: donnaaboise, GitHub: donnaaboise):


Hm... Clawpack 5.0 is all in f90, as is Ash3d. So we will have to see what we can do to get something to work with f90.

donnaaboise commented 9 years ago

Original comment by Carsten Burstedde (Bitbucket: cburstedde, GitHub: cburstedde):


The autoconf/automake system knows nothing about fortran modules. The reason is that their dependencies and rules are too complicated in practice, and consistent checking is not being implemented for the time being.

C and C++ dependency checking and automatic recompilation works well.

Bottom line is that fortran files are not always automatically rebuilt, so sometimes it may be necessary to make clean manually.