Changeset 23430
- Timestamp:
- 10/16/18 14:43:27 (6 years ago)
- Location:
- issm/trunk-jpl/src/m/solvers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/solvers/mumpsnoneoptions.m
r20928 r23430 10 10 11 11 %default mumps options 12 PETSC_VERSION=IssmConfig('_PETSC_MAJOR_'); 13 if PETSC_VERSION==2., 12 PETSC_MAJOR=IssmConfig('_PETSC_MAJOR_'); 13 PETSC_MINOR=IssmConfig('_PETSC_MINOR_'); 14 if PETSC_MAJOR==2., 14 15 mumps.toolkit='petsc'; 15 16 mumps.mat_type=getfieldvalue(options,'mat_type','aijmumps'); … … 17 18 mumps.pc_type=getfieldvalue(options,'pc_type','lu'); 18 19 mumps.mat_mumps_icntl_14=getfieldvalue(options,'mat_mumps_icntl_14',120); 19 mumps.pc_factor_shift_positive_definite=getfieldvalue(options,'pc_factor_shift_positive_definite','true');20 20 end 21 21 22 if PETSC_ VERSION==3.,22 if PETSC_MAJOR==3., 23 23 mumps.toolkit='petsc'; 24 24 mumps.mat_type=getfieldvalue(options,'mat_type','mpiaij'); 25 25 mumps.ksp_type=getfieldvalue(options,'ksp_type','preonly'); 26 26 mumps.pc_type=getfieldvalue(options,'pc_type','lu'); 27 mumps.pc_factor_mat_solver_package=getfieldvalue(options,'pc_factor_mat_solver_package','mumps'); 27 if PETSC_MINOR>8 28 mumps.pc_factor_mat_solver_type=getfieldvalue(options,'pc_factor_mat_solver_type','mumps'); 29 else 30 mumps.pc_factor_mat_solver_package=getfieldvalue(options,'pc_factor_mat_solver_package','mumps'); 31 end 28 32 mumps.mat_mumps_icntl_14=getfieldvalue(options,'mat_mumps_icntl_14',120); 29 mumps.pc_factor_shift_positive_definite=getfieldvalue(options,'pc_factor_shift_positive_definite','true');30 33 mumps.mat_mumps_icntl_28=2; %1=serial, 2=parallel 31 34 mumps.mat_mumps_icntl_29=2; %parallel ordering 1 = ptscotch, 2 = parmetis -
issm/trunk-jpl/src/m/solvers/mumpsoptions.m
r23136 r23430 10 10 11 11 %default mumps options 12 PETSC_VERSION=IssmConfig('_PETSC_MAJOR_'); 13 if PETSC_VERSION==2., 12 PETSC_MAJOR=IssmConfig('_PETSC_MAJOR_'); 13 PETSC_MINOR=IssmConfig('_PETSC_MINOR_'); 14 if PETSC_MAJOR==2., 14 15 mumps.toolkit='petsc'; 15 16 mumps.mat_type=getfieldvalue(options,'mat_type','aijmumps'); … … 17 18 mumps.pc_type=getfieldvalue(options,'pc_type','lu'); 18 19 mumps.mat_mumps_icntl_14=getfieldvalue(options,'mat_mumps_icntl_14',120); 19 mumps.pc_factor_shift_positive_definite=getfieldvalue(options,'pc_factor_shift_positive_definite','true');20 20 end 21 21 22 if PETSC_ VERSION==3.,22 if PETSC_MAJOR==3., 23 23 mumps.toolkit='petsc'; 24 24 mumps.mat_type=getfieldvalue(options,'mat_type','mpiaij'); 25 25 mumps.ksp_type=getfieldvalue(options,'ksp_type','preonly'); 26 26 mumps.pc_type=getfieldvalue(options,'pc_type','lu'); 27 mumps.pc_factor_mat_solver_package=getfieldvalue(options,'pc_factor_mat_solver_package','mumps'); 27 if PETSC_MINOR>8 28 mumps.pc_factor_mat_solver_type=getfieldvalue(options,'pc_factor_mat_solver_type','mumps'); 29 else 30 mumps.pc_factor_mat_solver_package=getfieldvalue(options,'pc_factor_mat_solver_package','mumps'); 31 end 28 32 mumps.mat_mumps_icntl_14=getfieldvalue(options,'mat_mumps_icntl_14',120); 29 30 %Seems like this one is not needed anymore31 mumps.pc_factor_shift_positive_definite=getfieldvalue(options,'pc_factor_shift_positive_definite','true');32 33 33 34 %These 2 lines make raijin break (ptwgts error during solver with PETSc 3.3) -
issm/trunk-jpl/src/m/solvers/mumpsoptions.py
r17497 r23430 16 16 17 17 #default mumps options 18 PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0] 19 if PETSC_VERSION==2.: 18 PETSC_MAJOR=IssmConfig('_PETSC_MAJOR_')[0] 19 PETSC_MINOR=IssmConfig('_PETSC_MINOR_')[0] 20 if PETSC_MAJOR==2.: 20 21 mumps['toolkit']='petsc' 21 22 mumps['mat_type']=options.getfieldvalue('mat_type','aijmumps') … … 23 24 mumps['pc_type']=options.getfieldvalue('pc_type','lu') 24 25 mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120) 25 mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true') 26 if PETSC_VERSION==3.: 26 if PETSC_MAJOR==3.: 27 27 mumps['toolkit']='petsc' 28 28 mumps['mat_type']=options.getfieldvalue('mat_type','mpiaij') 29 29 mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly') 30 30 mumps['pc_type']=options.getfieldvalue('pc_type','lu') 31 mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps') 31 if PETSC_MINOR>8.: 32 mumps['pc_factor_mat_solver_type']=options.getfieldvalue('pc_factor_mat_solver_type','mumps') 33 else: 34 mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps') 32 35 mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120) 33 mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true')34 36 35 37 return mumps
Note:
See TracChangeset
for help on using the changeset viewer.