fortesg / fortrantestgenerator

Unit test generator for Fortran applications using Capture & Replay
GNU General Public License v3.0
24 stars 5 forks source link

FTG generates read statements but not the corresponding write statements for vdiff_up #14

Closed phmarti closed 6 years ago

phmarti commented 6 years ago

Hi,

I'm trying to generate a standalone for the vdiff_up routine in the mo_vdiff_upward_sweep module in ICON-2.4.00-RC.

The capture stage misses a few variables which are required from mo_vdiff_solver.f90 (for example: itotte, iu, iv, etc). And therefore doesn't generate the write statements in the capture code.

On the other hand when the replay code is generated these variables are captured and the corresponding read statements are generated in ftg_vdiff_up_test.f90.

Adding the write statements (and missing PUBLIC) produces a working standalone. I'm using GCC 5.4.0

chovyy commented 6 years ago

Thanks for reporting. Sounds strange, must be a bug. I will check it out asap.

phmarti commented 6 years ago

It looks like this was actually my mistake. Some additional optimization flags got injected into my Makefile and I ended up with a combination of '-g -O0 -save-temps' and '-O2 ...'. The generated code looks fine without the optimization flags.

chovyy commented 6 years ago

Okay, cool.