Opened 8 years ago
Closed 7 years ago
#186 closed defect (fixed)
tmplev not initialized
Reported by: | ajornet | Owned by: | jgipsl |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Driver files | Version: | trunc |
Keywords: | tmplev non initilized memory | Cc: |
Description
Variable tmplev is not initialized inside dim2_driver.f90.
It is passed as an argument to restcom.f90->restini(tmplev)
Inside the subroutine restini(...,lev,...):
... restopenini-> does nothing despite of being passed as an argument. ... line 304 IF ( (ALL(MINLOC(lev(:llm)) == MAXLOC(lev(:llm)))) & .AND.(llm > 1) ) THEN ... restopenout -> lev is written into ...
Regarding restini, it is called as well:
teststomate.f90 -> initialised to 0. Nothing else done
ioipslctrl_restini.f90 -> initialised to 0. Nothing else done
restopenout is not called anywhere else.
Valgrind output:
1882 ==12769== Conditional jump or move depends on uninitialised value(s) 1883 ==12769== at 0x37CC35D: restcom_mp_restini_ (restcom.f90:304) 1884 ==12769== by 0x47230F: MAIN__ (dim2_driver.f90:359) 1885 ==12769== by 0x43FB5B: main (in /home/orchidee04/ajornet/bin/orchidee_ol)
So, tmplev can be initialized inside dim2_driver.f90 as follows :
261 lon(:,:) = 0.0
262 lat(:,:) = 0.0
263 tmplev(:) = 0.0
It could also be deleted as it seems it is not user anywhere.
Change History (3)
comment:1 Changed 8 years ago by ajornet
comment:2 Changed 7 years ago by jgipsl
- Owner changed from somebody to jgipsl
- Status changed from new to accepted
comment:3 Changed 7 years ago by jgipsl
- Resolution set to fixed
- Status changed from accepted to closed
Done in trunk rev [3019]
Note: See
TracTickets for help on using
tickets.
Add tmplev(:) = 0.0 at source:/perso/albert.jornet/ORCHIDEE-MICT/src_driver/dim2_driver.f90
Proposed solution at r2936.