[FLASH-USERS] looking for help
Zhang Chao
walli1986 at hotmail.com
Thu Jun 16 03:34:37 EDT 2011
Dear Dean and Shravan,
Thank you for the help.
I would like to thank Dean especially, because I learn a lot from your
email.
But now I meet a new problem, I follow the User’s guide, create a new
folder (named my hostname) in the sites/ directory and create a Makefile.h.
This time I want to ask 2 problems.
Firstly, in the Makefile.h, there is a path “CPPCOMP =
/opt/software/mpich2-gnu/bin/mpiCC”. But I cannot find “mpiCC” in my
computer. There are “mpif90”and “mpicc” in the computer.
Secondly, when I type “gmake” in the object/ directory, the error comes
out.
Here is the error:
[walli at localhost object]$ gmake
Calculating dependencies
./setup_depends.py --generateINTERMEDIATElines -c -O2 -fdefault-real-8 -fdefault-double-8
-ffree-line-length-none -I /opt/hdf-1.6.5/include -O2 -c *.f *.f90 *.F90
*.F
Traceback (most recent call last):
File "./setup_depends.py", line 257, in ?
main()
File "./setup_depends.py", line 133, in main
ofd = file("Makefile.Depend","w")
IOError: [Errno 13] Permission denied: 'Makefile.Depend'
rm: cannot remove `.success': Permission denied
gmake: *** [printflags] Error 1
I really don’t know how to deal with this. Could anyone help me about this?
Best wish,
Zhang Chao
The following is my Makefile.h
I just change the “HDF5_PATH”, “NCMPI_PATH”, “FCOMP”, “CCOMP”,
“CPPCOMP”, “LINK”
# FLASH makefile definitions for ix86-64 Linux (gfortran compiler)
#----------------------------------------------------------------------------
# Set the HDF/HDF5 library paths -- these need to be updated for your system
#----------------------------------------------------------------------------
HDF4_PATH =
HDF5_PATH = /opt/hdf-1.6.5
ZLIB_PATH =
PAPI_PATH =
PAPI_FLAGS =
NCMPI_PATH = /opt/software/parallel-netcdf-1.0.2
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 = /opt/software/mpich2-gnu/bin/mpif90
CCOMP = /opt/software/mpich2-gnu/bin/mpicc
CPPCOMP = /opt/software/mpich2-gnu/bin/mpiCC
LINK = /opt/software/mpich2-gnu/bin/mpif90
# 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 -ffree-line-length-none
FFLAGS_DEBUG
= -g -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none
FFLAGS_TEST = -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none
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 = -I$(NCMPI_PATH)/include
#----------------------------------------------------------------------------
# Linker flags
#
# There is a seperate version of the linker flags for each of the _OPT,
# _DEBUG, and _TEST cases.
#----------------------------------------------------------------------------
LFLAGS_OPT = -static -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 = -lmfhdf -ldf -ljpeg -lz
LIB_HDF5 = -L ${HDF5_PATH}/lib -lhdf5 /usr/lib64/libz.a
LIB_PAPI =
LIB_MATH = -ldfftw -ldrfftw
LIB_MPI =
LIB_NCMPI = -L $(NCMPI_PATH)/lib -lpnetcdf
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
--------------------------------------------------
From: "Dean Townsley" <Dean.M.Townsley at ua.edu>
Sent: Thursday, June 16, 2011 2:44 AM
To: "Zhang Chao" <walli1986 at hotmail.com>
Cc: <flash-users at flash.uchicago.edu>
Subject: Re: [FLASH-USERS] looking for help
> Hi Zhang,
>
> It looks like your compiler flags are probably not appropriate for your
> compiler.
>
> Assuming that you are using a gnu compiler stack (i.e. gfortran) the
> flags I use are:
>
> FFLAGS_OPT = -c -O3 -fdefault-real-8 -fdefault-double-8
> -ffree-line-length-none
> FFLAGS_DEBUG = -g -Warray-bounds -c -fdefault-real-8 -fdefault-double-8
> -ffree-line-length-non
> e
> FFLAGS_TEST
> = -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none
>
> These are basically the same as those in the
> sites/Prototypes/Linux/Makefile.h.gfortran file included with the
> distribution. If you are using gnu compilers, you should take that as
> your starting point for getting a working Makefile.h rather than the
> plain sites/Prototypes/Linux/Makefile.h one.
>
> I hope that helps.
>
> Dean
>
> On 06/14/2011 10:14 PM, Zhang Chao wrote:
>> Dear all,
>> I am new to the flash code. when I follow the user's guide. I met lots
>> of questions.
>> First, when I type "./setup Sedov -auto", "cd object" and "gmake", the
>> error came out
>> [walli at localhost object]$ gmake
>> rm -f reorder.sh
>> /opt/software/mpich2-gnu/bin/mpif90 -c -O2 --tp4 -CcdRR8
>> -DMAXBLOCKS=1000 -DNXB=8 -DNYB=8 -DNZB=1 -DN_DIM=2
>> ut_interpolationInterface.F90
>> gfortran: unrecognized option '-CcdRR8'
>> cc1: error: unrecognized command line option "-ftp4"
>> gmake: *** [ut_interpolationInterface.o] Error 1
>> a part of my Makefile.h is that:
>> #----------------------------------------------------------------------------
>> # Set the HDF/HDF5 library paths -- these need to be updated for your
>> system
>> #----------------------------------------------------------------------------
>>
>> HDF5path = /opt/hdf-1.6.5
>> MPIpath = /opt/software/mpich2-gnu
>> PAPI_PATH =
>> PAPI_FLAGS =
>> ZLIB_PATH =
>> NCMPI_PATH = /opt/parallel-netcdf-1.0.2
>> MPE_PATH =
>> #----------------------------------------------------------------------------
>> # Compiler and linker commands
>> #
>> # We use the f90 compiler as the linker, so some C libraries may
>> explicitly
>> # need to be added into the link line.
>> #----------------------------------------------------------------------------
>> FCOMP = ${MPIpath}/bin/mpif90
>> CCOMP = gcc
>> CPPCOMP = gcc
>> LINK = ${MPIpath}/bin/mpif90
>>
>> # pre-processor flag
>>
>> PP = -D
>> FFLAGS_OPT = -c -O2 --tp4 -CcdRR8
>> FFLAGS_DEBUG = -c -g --trace --trap --chk[aes] -CcdRR8
>> FFLAGS_TEST = -c -CcdRR8
>> should I change the "FFLAGS_OPT, FFLAGS_DEBUT, FFLAGS_TEST"?
>> I really don't know how to do this. Can anybody help me?
>> Best wishes,
>> Zhang Chao
>
More information about the flash-users
mailing list