Skip to content
Snippets Groups Projects
Commit 59f9f40d authored by Dave Whipp's avatar Dave Whipp
Browse files

Added nest type for using nested model parameters. Reorganized things to have...

Added nest type for using nested model parameters. Reorganized things to have debug level 1 only write to screen; 2 to files.
parent ca73f40d
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@ type (edge),dimension(:),allocatable::ed,edswap
type (parameters) params
type (thread) threadinfo
type (ziso) zi
type (nest_info) nest
integer n_iproc_st,n_iproc_end,n_iproc
integer ldb,nrhs,n,nz_loc
......@@ -94,18 +95,21 @@ call mpi_comm_rank (mpi_comm_world,iproc,ierr)
call write_streepjes(6,2)
!=====[allocate threadinfo and open mpi log and memory heap files]=========
params%nmpi=nproc
call int_to_char(ciproc,3,iproc)
!!=====[allocate threadinfo and open mpi log and memory heap files]=========
!params%nmpi=nproc
!
!call int_to_char(ciproc,3,iproc)
!
!threadinfo%Logunit=1000+iproc
!open (unit=threadinfo%Logunit,file='./DEBUG/mpilogs/Log_'//ciproc//'.dat',status='replace')
!write(threadinfo%Logunit,*) 'This is DOUAR-WSMP v0.1 (2011-03-23)'
!if (iproc.eq.0) write(*,*) 'This is DOUAR-WSMP v0.1 (2011-03-23), using ', nproc, ' processors.'
!write(threadinfo%Logunit,'(a,i3)') 'Log file of mpi process',iproc
!
!call heap_init(threadinfo,2000+iproc,'./DEBUG/mpilogs/mem_heap_'//ciproc//'.dat')
threadinfo%Logunit=1000+iproc
open (unit=threadinfo%Logunit,file='./DEBUG/mpilogs/Log_'//ciproc//'.dat',status='replace')
write(threadinfo%Logunit,*) 'This is DOUAR-WSMP v0.1 (2011-03-23)'
params%nmpi=nproc
if (iproc.eq.0) write(*,*) 'This is DOUAR-WSMP v0.1 (2011-03-23), using ', nproc, ' processors.'
write(threadinfo%Logunit,'(a,i3)') 'Log file of mpi process',iproc
call heap_init(threadinfo,2000+iproc,'./DEBUG/mpilogs/mem_heap_'//ciproc//'.dat')
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
......@@ -130,13 +134,37 @@ else
end if
call write_streepjes(6,2)
call show_time (total,step,inc,0,'Start of Computations$')
call show_time (total,step,inc,1,'Reading Input$')
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
! read debug level
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
call read_controlling_parameters (params,threadinfo,'debug')
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
! allocate threadinfo, open MPI log and memory heap files
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
call int_to_char(ciproc,3,iproc)
if (params%debug.gt.1) then
threadinfo%Logunit=1000+iproc
open (unit=threadinfo%Logunit,file='./DEBUG/mpilogs/Log_'//ciproc//'.dat',status='replace')
write(threadinfo%Logunit,*) 'This is DOUAR-WSMP v0.1 (2011-03-23)'
write(threadinfo%Logunit,'(a,i3)') 'Log file of mpi process',iproc
write(threadinfo%Logunit,'(a16,i3)') 'debug',params%debug
call heap_init(threadinfo,2000+iproc,'./DEBUG/mpilogs/mem_heap_'//ciproc//'.dat')
endif
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
! read controlling parameters
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
call read_controlling_parameters (params,threadinfo)
call read_controlling_parameters (params,threadinfo,'main')
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
......@@ -145,9 +173,6 @@ call read_controlling_parameters (params,threadinfo)
!------------------------------------------------------------------------------|
call io_DoRuRe2 (params,'init')
call show_time (total,step,inc,0,'Start of Computations$')
call show_time (total,step,inc,1,'Reading Input$')
allocate (surface ( params%ns ),stat=err) ; if (err.ne.0) call stop_run ('Error alloc surface in main$')
allocate (surface0 ( params%ns ),stat=err) ; if (err.ne.0) call stop_run ('Error alloc surface0 in main$')
allocate (mat (0:params%nmat),stat=err) ; if (err.ne.0) call stop_run ('Error alloc mat in main$')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment