04-04-2009, 01:10 PM
Hi forum
I have successfully compiled Flash Code, http://flash.uchicago.edu/website/home/ , to run under Ubuntu 8.10AMD64;
Followed this howto : http://www.astro.sunysb.edu/mzingale/flash-fedora/
This app is mainly targeted to Unixes, running in BIG machines
I Included this here because this solved hot/dense plasma hydrodynamic problems, like supernovae Explosions, nuclear fusion burn/deflagration... it is a shock propagation code.
feel free to try this...
Best regards
Alex
Well here it goes :
You untar the package into /usr/local for instance... mine is
You install the packages that support message passing interface calculation in Ubuntu :libopenmpi, openmpi, python-mpi as well as the blacs-mpich packages, and the scalapack-mpich.
Then you cd to /usr/local/FLASH3.1 and
This way, you will have a default makefile associated with your computer configuration, now to edit that configuration :
This is my edited Makefile.h that lives in
The parts that i edited are isolated with comment lines :FCOMP CCOMP CPPCOMP and LINK had to be changed from mpif90 to mpif90.openmpi, mpicc.openmpi, mpicc.openmpi, and mpif90.openmpi respectively.
The flag compiler options had to be set like the following :
Now you only have to change some settings in formatting in some source .f90 :
Open checkpoint_wr.F90 in
and edit line 221:
There is also another source file to edit, which carries the same bug... when you 'make' the build process will report you the name of that file and the very same bug : correct it the same way as for checkpoint_wr.F90.
Now you are ready to go :
problem_name lives inside one of the directories of /usr/local/<flashdir>/setups
This will create a makefile for your problem inside /usr/local/<flashdir>/objects;
type make;
If everything goes allright, by now you have an executable inside of objects called , (or flash_whatever); cd objects and edit flash.par ( this is not a cray-T3E you are using to run your problem... :-) ) and change lrefinemax to 7 ( steps of iterative mesh refinement in zones of high gradients )
You are set now: Type ./flash3, and it will create inside of objects a series of hdf5 files with the results of the simulation that you performed.
Now you will be able to extract useful information about that simulation.
Enjoy
PS I am now tryin to install fluka, http://www.fluka.org/fluka.php, so as to couple a multigroup neutron transport transient problem with a plasma being adiabatically compressed by a shock wave delivered by an inert material shell.
fluka is a more "civilized" ( or should i say civilian ...? :-) ) version of mcnp code mcnpx : http://mcnpx.lanl.gov/
Doesnt have the libraries of neutron transport cross sections for different materials, nor the opacity values for radiant transport... but with some little hacking and physics knowledge... you can work things out and simulate whatever they do not want you to... heheheheh :-D
I have successfully compiled Flash Code, http://flash.uchicago.edu/website/home/ , to run under Ubuntu 8.10AMD64;
Followed this howto : http://www.astro.sunysb.edu/mzingale/flash-fedora/
This app is mainly targeted to Unixes, running in BIG machines
I Included this here because this solved hot/dense plasma hydrodynamic problems, like supernovae Explosions, nuclear fusion burn/deflagration... it is a shock propagation code.
feel free to try this...
Best regards
Alex
Well here it goes :
You untar the package into /usr/local for instance... mine is
Code:
/usr/local/FLASH3.1You install the packages that support message passing interface calculation in Ubuntu :libopenmpi, openmpi, python-mpi as well as the blacs-mpich packages, and the scalapack-mpich.
Then you cd to /usr/local/FLASH3.1 and
Code:
mkdir -p flash/source/sites/<your hostname>
cp flash/source/sites/Prototypes/Linux/Makefile.h flash/source/sites/<your hostname>This way, you will have a default makefile associated with your computer configuration, now to edit that configuration :
Quote:# FLASH makefile definitions for ix86 Linux (Portland Group compiler)
# note, in order to get pgprof to work properly, it was necessary to
# download a new version from ftp://ftp.pgroup.com/ that plays nicely
# with GNOME.
#----------------------------------------------------------------------------
# Set the HDF/HDF5 library paths -- these need to be updated for your system
#----------------------------------------------------------------------------
HDF4_PATH = /usr/local/hdf4
HDF5_PATH = /opt/HDF5-1.4.2-patch1-serial/
ZLIB_PATH =
PAPI_PATH =
PAPI_FLAGS =
NCMPI_PATH =
MPE_PATH =
#----------------------------------------------------------------------------
# Compiler and linker commands
#
# Use the MPICH wrappers around the compilers -- these will automatically
# load the proper libraries and include files. Version of MPICH prior
# to 1.2.2 (?) do not recognize .F90 as a valid Fortran file extension.
# You need to edit mpif90 and add .F90 to the test of filename extensions,
# or upgrade your MPICH.
#----------------------------------------------------------------------------
###########################################################
FCOMP = mpif90.openmpi
###########################################################
CCOMP = mpicc.openmpi
###########################################################
CPPCOMP = mpiCC.openmpi
###########################################################
LINK = mpif90.openmpi
###########################################################
# pre-processor flag
PP = -D
#----------------------------------------------------------------------------
# Compilation flags
#
# Three sets of compilation/linking flags are defined: one for optimized
# code, one for testing, and one for debugging. The default is to use the
# _OPT version. Specifying -debug to setup will pick the _DEBUG version,
# these should enable bounds checking. Specifying _TEST is used for
# flash_test, and is set for quick code generation, and (sometimes)
# profiling. The Makefile generated by setup will assign the generic token
# (ex. FFLAGS) to the proper set of flags (ex. FFLAGS_OPT).
#----------------------------------------------------------------------------
########################################################
FFLAGS_OPT = -c -O2 -fdefault-real-8 -fdefault-double-8
FFLAGS_DEBUG = -g -c -fdefault-real-8 -fdefault-double-8
FFLAGS_TEST = -c -fdefault-real-8 -fdefault-double-8
########################################################
F90FLAGS =
CFLAGS_OPT = -O2 -c
CFLAGS_DEBUG = -g -c
CFLAGS_TEST = -c
# if we are using HDF5, we need to specify the path to the include files
CFLAGS_HDF5 = -I $(HDF5_PATH)/include
CFLAGS_NCMPI =
#----------------------------------------------------------------------------
# Linker flags
#
# There is a seperate version of the linker flags for each of the _OPT,
# _DEBUG, and _TEST cases.
#----------------------------------------------------------------------------
LFLAGS_OPT = -o
LFLAGS_DEBUG = -g -o
LFLAGS_TEST = -o
#----------------------------------------------------------------------------
# Library specific linking
#
# If a FLASH module has a 'LIBRARY xxx' line in its Config file, we need to
# create a macro in this Makefile.h for LIB_xxx, which will be added to the
# link line when FLASH is built. This allows us to switch between different
# (incompatible) libraries. We also create a _OPT, _DEBUG, and _TEST
# library macro to add any performance-minded libraries (like fast math),
# depending on how FLASH was setup.
#----------------------------------------------------------------------------
LIB_OPT =
LIB_DEBUG =
LIB_TEST =
LIB_HDF4 = -L $(HDF4_PATH)/lib -lmfhdf -ldf -ljpeg -lz
LIB_HDF5 = -L $(HDF5_PATH)/lib -lhdf5
LIB_PAPI =
LIB_MATH = -ldfftw -ldrfftw
LIB_NCMPI =
LIB_MPE =
#----------------------------------------------------------------------------
# Additional machine-dependent object files
#
# Add any machine specific files here -- they will be compiled and linked
# when FLASH is built.
#----------------------------------------------------------------------------
MACHOBJ =
#----------------------------------------------------------------------------
# Additional commands
#----------------------------------------------------------------------------
MV = mv -f
AR = ar -r
RM = rm -f
CD = cd
RL = ranlib
ECHO = echo
This is my edited Makefile.h that lives in
Quote:<FLASHDIR>/source/sites/<MyHostname>/
The parts that i edited are isolated with comment lines :FCOMP CCOMP CPPCOMP and LINK had to be changed from mpif90 to mpif90.openmpi, mpicc.openmpi, mpicc.openmpi, and mpif90.openmpi respectively.
The flag compiler options had to be set like the following :
Quote:########################################################
FFLAGS_OPT = -c -O2 -fdefault-real-8 -fdefault-double-8
FFLAGS_DEBUG = -g -c -fdefault-real-8 -fdefault-double-8
FFLAGS_TEST = -c -fdefault-real-8 -fdefault-double-8
########################################################
Now you only have to change some settings in formatting in some source .f90 :
Open checkpoint_wr.F90 in
Code:
FLASH3.1/source/io/amr/hdf5_serial/Code:
write (num_to_str, '(I)') MAX_BLK_MSGS toCode:
write (num_to_str, '(I16.6)') MAX_BLK_MSGSThere is also another source file to edit, which carries the same bug... when you 'make' the build process will report you the name of that file and the very same bug : correct it the same way as for checkpoint_wr.F90.
Now you are ready to go :
Code:
cd /usr/local/<flashdir>
./setup <problem_name> -autoproblem_name lives inside one of the directories of /usr/local/<flashdir>/setups
This will create a makefile for your problem inside /usr/local/<flashdir>/objects;
type make;
If everything goes allright, by now you have an executable inside of objects called , (or flash_whatever); cd objects and edit flash.par ( this is not a cray-T3E you are using to run your problem... :-) ) and change lrefinemax to 7 ( steps of iterative mesh refinement in zones of high gradients )
You are set now: Type ./flash3, and it will create inside of objects a series of hdf5 files with the results of the simulation that you performed.
Now you will be able to extract useful information about that simulation.
Enjoy
PS I am now tryin to install fluka, http://www.fluka.org/fluka.php, so as to couple a multigroup neutron transport transient problem with a plasma being adiabatically compressed by a shock wave delivered by an inert material shell.
fluka is a more "civilized" ( or should i say civilian ...? :-) ) version of mcnp code mcnpx : http://mcnpx.lanl.gov/
Doesnt have the libraries of neutron transport cross sections for different materials, nor the opacity values for radiant transport... but with some little hacking and physics knowledge... you can work things out and simulate whatever they do not want you to... heheheheh :-D
