tstLibraryBuilder.f90

./Manager/libld/f/tests/tstLibraryBuilder.f90

1 program tstlibrarybuilder
2 
3 #include "ScaleSTL/FortranTestMacros.h"
4 
7 use stringlist_m
8 use datacontainer_m
10 use dbcf_m
11 use origen_testpaths_m
12 use iso_fortran_env, only: error_unit, output_unit
13 !
14 use nemesis_comm, only: build_types, initialize, finalize, node
15 
16 implicit none
17 
18 type(origen_libraryio) :: io
19 type(origen_librarybuilder) :: bld
20 type(origen_library) :: lib,lib2
21 type(origen_libraryheader) :: lh
22 type(origen_nuclideset) :: nucset
23 type(datacontainer) :: options
24 
25 logical :: loaded
26 integer :: position
27 
28 call initialize
29 call build_types
30 if(node() /= 0 ) call finalize
31 
32 call options % initialize()
33 call io % initialize()
34 call lib % initialize()
35 loaded = io % load(lib,trim(decaylib_filepath),options)
36 write(error_unit,*)'loaded=',loaded
37 if( .not. loaded )stop 1
38 call io % destroy()
39 
40 call lib % getptr_definition(lh)
41 call lh % getptr_nuclide_set(nucset)
42 expect_eq(1151,nucset % num_in_sublib(origen_sublib_3fp))
43 write(error_unit,*)'extracted the library'
44 
45 call io % destroy()
46 
47 call bld % initialize()
48 
49 position = 1
50 !call bld % read(lib,position)
51 !write(ERROR_UNIT,*)'out of read'
52 
53 call bld % destroy()
54 !call lib % destroy()
55 call options % destroy()
56 
57 call finalize
58 end program