Post Reply 
Howto: Building Flash Code for Linux x64 architecture; Ubuntu AMD64
04-04-2009, 01:10 PM (This post was last modified: 04-04-2009 08:45 PM by continuum.)
Post: #1
Howto: Building Flash Code for Linux x64 architecture; Ubuntu AMD64
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
Code:
/usr/local/FLASH3.1

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

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/
and edit line 221:

Code:
write (num_to_str, '(I)') MAX_BLK_MSGS  to
Code:
write (num_to_str, '(I16.6)') MAX_BLK_MSGS

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 :

Code:
cd /usr/local/<flashdir>
./setup <problem_name> -auto

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
Find 
Reply 
02-03-2010, 12:07 AM
Post: #2
RE: Howto: Building Flash Code for Linux x64 architecture; Ubuntu AMD64
(04-04-2009 01:10 PM)Alexvader2 Wrote:  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
Code:
/usr/local/FLASH3.1

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

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/
and edit line 221:

Code:
write (num_to_str, '(I)') MAX_BLK_MSGS  to
Code:
write (num_to_str, '(I16.6)') MAX_BLK_MSGS

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 :

Code:
cd /usr/local/<flashdir>
./setup <problem_name> -auto

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


Thanks.
Could you please write one for CentOS systems?
I tried to compile flash. I do not know whether I even need this.
Heard of MayaVi ?

Check it out. Heard a lot of good things about it Smile
Find 
Reply 
11-27-2011, 07:04 PM
Post: #3
Best porn site in the world
Listor inneh&aring;ller ofta, livsmedelsprover, foder till s&auml;llskapsdjur, f&ouml;delsedag freebies, tv&auml;ttning, dofter, personliga hygienprodukter, l&auml;kemedel, objekt f&auml;gring, t-tr&ouml;jor, presenter, b&ouml;cker d&auml;rtill tidningar, MP3, kuponger d&auml;rtill mycket more.
<a href="http://tylersmiths.multiply.com/journal/item/1/7_Points_You_have_to_know_With_regards_to_On-line_Paid_for_Online_surveys
">tidningserbjudande
</a> Freebie platser f&ouml;r den h&aring;rda k&auml;rnan gratisgrunka j&auml;gare, det finns webbplatser som du kan registrera dig som kommer ordna ett vanligt e full av speciella Gratis erbjudanden fr&aring;n olika f&ouml;retag b&aring;de p&aring; n&auml;tet med utanf&ouml;r.
Reply 
11-28-2011, 06:57 PM
Post: #4
Best porn site in the world
You kan hitta gratis tr&auml;d, djur samt o synnerligen kassa d&auml;rtill pengar also.
<a href="http://michaelalexandre.tumblr.com/post/12824940012/earn-money-in-your-own-home-via-money-studies
">tidningar erbjudanden
</a> Ingen betalning kr&auml;vs men du kan bli ombedd att l&auml;mna en donation f&ouml;r att bitr&auml;da utvecklarna att forts&auml;tta sitt arbete.
Reply 
03-09-2012, 10:42 AM
Post: #5
Tibet travel
Tibet travel djt tibet budget tour jgq Tibet visa information qrk Tibet tours from Beijing lht Qinghai Tibet train jer Tibet tour packages hong kong iei Tibet tours review gyo Tibet trip advisor gus Tibet travel tips hah Tibetan vacations eue mt kailash tours gwi tibet bicycle tour vacations hcs vacation to china tibet azb how to take train to tibet psg good travel service in Tibet jew
<a href="http://www.etibettours.info">Visit Tibet travel</a> qda <a href="http://www.tibettavelpermit.info">Tibet travel permit Beijing</a> lnb <a href="http://www.tibetgrouptours.info">tibet group tour</a> znq <a href="http://www.tibethottours.info">Tibet tours 2012</a> vnz <a href="http://www.tibettraintr.info">Qinghai Tibet train</a> fwn <a href="http://www.tibetchinatour.info">China Tibet tours</a> xob <a href="http://www.tourreview.info">Tibet travel review</a> qxk
<a href="http://www.tibettraveltips.info">Tibet travel warnings</a> brd <a href="http://www.tibetattraction.info">Tibet travel tips</a> gro <a href="http://www.tibetvacation.info">Tibetan vacations</a> jtl <a href="http://www.kailashtreks.info">mt kailash tours</a> nbp <a href="http://www.tibetbiketour.info">tibet bicycle tour vacations</a> vsh
<a href="http://www.chinatibettours.info">china tibet travel</a> qgw <a href="http://www.tibettraintours.info">train to tibet</a> bqz <a href="http://www.tibettravelagency.info">best travel agency in tibet</a> ise
http://www.etibettours.info gug http://www.tibettavelpermit.info wxi http://www.tibethottours.info dno http://www.tibettraintr.info twc http://www.tibetchinatour.info zfh http://www.tourreview.info vsa http://www.tibettraveltips.info ovq http://www.tibetattraction.info zpw http://www.tibetvacation.info dhl http://www.kailashtreks.info kjc http://www.tibetbiketour.info iav http://www.tibetgrouptours.info itk http://www.tibettravelagency.info hea http://www.tibettraintours.info mdc http://www.chinatibettours.info rzf
Reply 
03-13-2012, 12:51 AM
Post: #6
true religion outlet
how to tell real true religion jeans from fake oid true religion jeans outlet uav
<a href="http://www.truereligion.info">how to tell real true religion jeans from fake</a> ujs <a href="http://www.outlettruereligion.info">true religion</a> vkq
http://www.truereligion.info ueq http://www.outlettruereligion.info hfw
Reply 
03-16-2012, 04:11 PM
Post: #7
how to buy North Face Jackets Cheap
http://www.salenorthface.info vsf http://www.northfacechee.info rkb
North Face Outlet spi North Face Jackets for Men wsl
<a href="http://www.salenorthface.info">North Face Jackets</a> qwv <a href="http://www.northfacechee.info">North Face Jackets</a> uli
Reply 
03-19-2012, 07:45 AM
Post: #8
cheap jerseys
I am modish,predisposition you a advantageous daytime!
Reply 
04-08-2012, 07:47 AM
Post: #9
nltohzrt
payday loans for unemployed
online payday cash advance
payday advances
bad credit payday loans guaranteed approval
instant payday lenders
payday loans in colorado
fast cash payday loan
fast easy payday loan
paycheck in advance
instant payday loan lenders
payday loans consolidation
online payday cash advances
pay advance loan
interest on payday loans
need payday loan immediately
payday loan in 1 hour
payday loan no faxing
get payday loan
payday loans in arkansas
sameday payday loans online
Reply 
04-08-2012, 04:13 PM
Post: #10
ibiqwran
http://shebei.blog.www.eltaib3.getsparkp...ber/131076
http://www.fightenglish.com/index.php/fo...ber/23269/
http://www.brightspark.uk.com/index.php/member/2958/
http://emms.org.uk/member/13238
http://www.zeldaelements.net/member/119337
http://africollins.com/index.php/member/11168/
http://www.prismaticdragon.com/nblog/ind...ember/6774
http://www.indiauncut.com/member/165272/
http://issprops.com/member/1607
http://www.dryaddesign.com/index.php/member/19496/
http://www.bowmanbluewater.com/index.php?/member/5218/
http://shebei.blog.getsparkplugs.com/member/131076
http://www.truststeven.com/index.php/member/53718/
http://shebei.blog.www.eltaib3.getsparkp...ber/131076
http://blumercpas.com/member/119538
http://www.zeldaelements.net/member/119337
http://www.interpolnyc.com/member/161341/
http://www.21plus.org/member/49576
http://www.imoca.org/en/index.php/member/124003
http://www.popwaffle.com/index.php/member/34383/

bingo sites
no deposit bingo
Reply 
Post Reply 


[-]
Quick Reply
Message
Type your reply to this message here.


Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Lightbulb How to install Abaqus 6.8 in linux continuum 458 37,872 05-13-2012 11:38 AM
Last Post: seo website
  Howto: Continuum shell stacking direction on cylindrical solid composite section continuum 9 3,008 05-09-2012 08:13 PM
Last Post: RigardaySS97
  How to install matlab student R14 v7 in linux continuum 2 1,222 04-13-2012 07:20 PM
Last Post: DradyjatGrera
  Howto:Rdesktop & VPN. Linux->Windows kinematic 10 1,345 04-11-2012 11:05 PM
Last Post: DradyjatGrera
  Lessons Learned While Building Reddit to 270 Million Page/Month kinematic 0 783 05-18-2010 08:33 AM
Last Post: kinematic