subroutine read_config()
implicit none
integer(kind=I4) :: jf, err_read
character(len=032) :: word
character(len=128) :: job_copy
job_copy = "out/"//repos//job_file(4:len_trim(job_file))
VERBOSE = 20
SOLV_MESS = 0
OPU = 0
OUTPUT_FILE = "no_file"
SOLVER_BS = 3
SOLVER_TS = 2
NB_THREADS_MAX = -1
archive = 0
test_num = 0
call get_unit(jf) ; open(jf, file = trim(job_file), status = 'old')
do
word = repeat(' ', len(word))
read(jf, *, iostat = err_read) word
if ( index(word, 'END_FILE' ) /= 0 ) exit
if ( index(word, 'VERBOSE' ) /= 0 ) then
read(jf, *) VERBOSE
endif
if ( index(word, 'SOLV_MESS' ) /= 0 ) then
read(jf, *) SOLV_MESS
endif
if ( index(word, 'OUTPUT_UNIT' ) /= 0 ) then
read(jf, *) OPU
if (OPU==0) then
OPU = OUT_U
else
read(jf, *) OUTPUT_FILE
call get_unit(OPU)
open(unit = OPU, &
file = "out/"//repos//"/"//trim(adjustl(OUTPUT_FILE)), &
status = 'unknown')
endif
endif
if ( index(word, 'SOLVER_BS' ) /= 0 ) then
read(jf, *) SOLVER_BS
if (SOLVER_BS==1) stop "some remaining problems with SuLU, choose '3' instead"
if (SOLVER_BS==2) stop "MUMPS is multithreaded, it is designed for TS, choose '3' instead"
endif
if ( index(word, 'SOLVER_TS' ) /= 0 ) then
read(jf, *) SOLVER_TS
endif
if ( index(word, 'PROBLEM_TYPE' ) /= 0 ) then
read(jf, *) test_num
endif
if ( index(word, 'PARAM_MUSST' ) /= 0 ) then
call read_data(jf, repos)
endif
if ( index(word, 'NB_THREADS_MAX') /= 0 ) then
read(jf, *) NB_THREADS_MAX
if (NB_THREADS_MAX<0) then
!$ NB_THREADS_MAX = omp_get_num_procs()
endif
endif
if ( index(word, 'ARCHIVE') /= 0 ) then
read(jf, *) archive
if (ARCHIVE==1) then
call execute_command_line("sh bin/save/save.sh", wait=.true.)
call execute_command_line("mv *.7z out/"//repos//"/")
endif
endif
enddo
close(jf)
return
endsubroutine read_config