SourceForge

A TUTORIAL EXPLAINING RUNNING WITH PARAMESH COMPILED AS A LIBRARY

In this tutorial you will be led through the process of modefying the code created in the first tutorial to run using PARAMESH as a library.

Step 1. - Edit the file AMRDIR/headers/paramesh_preprocessorh.fh' so that it contains ONLY the following lines.


Step 2. - Build the PARAMESH libraries.

Step 3. - Build your executable.


          gmake -f make_tutor your_tutorial


Step 4. - Copy the file 'AMRDIR/amr_runtime_parameters' to the directory where the executable, 'tutor' will be run from (i.e. the directory where you are when you type 'mpirun').


Step 5. - Edit the 'amr_runtime_parameters' so that it looks like:

100                        ! maxblocks
2                          ! ndim
0                          ! l2p5d
4                          ! nxb
4                          ! nyb
1                          ! nzb
1                          ! nvar
0                          ! nfacevar
0                          ! nvaredge
0                          ! nvarcorn
1                          ! nvar_work
1                          ! nguard
1                          ! nguard_work
1                          ! nfluxvar
0                          ! nedgevar
0                          ! iface_off
1                          ! mflags
0                          ! nfield_divf
4                          ! nboundaries
.true.                     ! diagonals
.true.                     ! amr_error_checking
.false.                    ! no_permanent_guardcells
.false.                    ! advance_all_levels
.true.                     ! force_consistency
.false.                    ! consv_fluxes
.true.                     ! consv_flux_densities
.true.                     ! edge_value
.false.                    ! edge_value_integ
.false.                    ! var_dt
.false.                    ! pred_corr
.false.                    ! empty_cells
.false.                    ! conserve
.false.                    ! divergence_free
.false.                    ! curvilinear
.false.                    ! curvilinear_conserve
.false.                    ! cartesian
.false.                    ! cylindrical
.false.                    ! spherical
.false.                    ! polar
.false.                    ! lsingular_line
.false.                    ! timing_mpi
.false.                    ! timing_mpix
'./'                       ! output_dir

Notes:

You should set the 'no_permanant_guardcells' field in amr_runtime_parameters to be .true. if you ARE NOT using permanent guardcell storage in your tutorial code.  Leave it as above otherwise.

For more information on the format of the amr_runtime_parameters file and the meanings of the variables click here.


Step 5. - Run it !


mpirun -np X your_tutorial/tutor

In this case 'amr_runtime_parameters' is assumed to be located in AMRDIR.

The results should be indentical to those you got in the last tutorial.

You can change any of the values in 'amr_runtime_parameters' and rerun the code WITHOUT having to recompile !

A TUTORIAL WITH NO PERMANENT GUARDCELL STORAGE

Return to Main Page.