<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Huong,<br>
<br>
You should use sites/intrepid.alcf.anl.gov/Makefile.h as a<br>
starting point and then customize it for your needs. It has the<br>
following line to specify macro definitions for XLF compiler:<br>
MDEFS= -WF,.<br>
<br>
Chris<br>
<br>
On 31/05/10 15:04, huong luu wrote:
<blockquote
cite="mid:AANLkTimUcVyYbeVOMOJ1oFVqHllDqQZVQM0jv0uVz5J8@mail.gmail.com"
type="cite">Hi Chris,
<div><br>
</div>
<div>Thanks for your reply. I am using mpif90 wrappers. I change to
another MPICH and this time, I think it calls to XL compiler (xlf90)
and I still have the same error:</div>
<div>
<div>-----------------------------------------------------------------</div>
<div>[luu1@turing-2 object]$ gmake</div>
<div>Calculating dependencies</div>
<div>./setup_depends.py --generateINTERMEDIATElines -c -O2
-fdefault-real-8 -fdefault-double-8 -ffree-line-length-none -I
/usr/include -DH5_USE_16_API -O2 -c -std=c99 -Wno-long-long -O
-fomit-frame-pointer -finline-functions *.f *.f90 *.F90 *.F </div>
<div>./setup_addcdepends.py -I /usr/include -DH5_USE_16_API -O2 -c
-std=c99 -Wno-long-long -O -fomit-frame-pointer -finline-functions *.c</div>
<div>rm -f reorder.sh</div>
<div>/opt/mpich-mx-gcc-32/bin/mpif90 -c -O2 -fdefault-real-8
-fdefault-double-8 -ffree-line-length-none -DMAXBLOCKS=1000 -DNXB=8
-DNYB=8 -DNZB=1 -DN_DIM=2 ut_interpolationInterface.F90</div>
<div>/opt/ibmcmp/xlf/11.1/bin/xlf90_r: 1501-274 (W) An incompatible
level of gcc has been specified.</div>
<div>/opt/ibmcmp/xlf/11.1/bin/xlf90_r: 1501-214 (W) command option M
reserved for future use - ignored</div>
<div>/opt/ibmcmp/xlf/11.1/bin/xlf90_r: 1501-210 (S) command option
NXB=8 contains an incorrect subargument</div>
<div>gmake: *** [ut_interpolationInterface.o] Error 40</div>
<div>---------------------------------------------------</div>
<div><br>
</div>
</div>
<div>I am not sure where I should add those macro definitions. Could
you please explain it more clearly to me?</div>
<div><br>
</div>
<div>Thanks a lot.</div>
<div>BTW, here's my Makefile:</div>
<div><br>
</div>
<div>
<div># FLASH makefile definitions for ix86-64 Linux (gfortran
compiler)</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Set the HDF/HDF5 library paths -- these need to be updated for
your system</div>
<div>#----------------------------------------------------------------------------</div>
<div>HDF5_PATH = /usr</div>
<div>MPI_PATH = /opt/mpich-mx-gcc-32</div>
<div>ZLIB_PATH =</div>
<div><br>
</div>
<div>PAPI_PATH =</div>
<div>PAPI_FLAGS =</div>
<div><br>
</div>
<div>NCMPI_PATH =</div>
<div>MPE_PATH =</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Compiler and linker commands</div>
<div>#</div>
<div># Use the MPICH wrappers around the compilers -- these will
automatically</div>
<div># load the proper libraries and include files. Version of
MPICH prior</div>
<div># to 1.2.2 (?) do not recognize .F90 as a valid Fortran file
extension.</div>
<div># You need to edit mpif90 and add .F90 to the test of filename
extensions,</div>
<div># or upgrade your MPICH.</div>
<div>#----------------------------------------------------------------------------</div>
<div>FCOMP = ${MPI_PATH}/bin/mpif90</div>
<div>CCOMP = ${MPI_PATH}/bin/mpicc</div>
<div>CPPCOMP = ${MPI_PATH}/bin/mpic++</div>
<div>LINK = ${MPI_PATH}/bin/mpif90</div>
<div><br>
</div>
<div>
<div># pre-processor flag</div>
<div>PP = -D</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Compilation flags</div>
<div>#</div>
<div># Three sets of compilation/linking flags are defined: one for
optimized</div>
<div># code, one for testing, and one for debugging. The default is
to use the</div>
<div># _OPT version. Specifying -debug to setup will pick the
_DEBUG version,</div>
<div># these should enable bounds checking. Specifying _TEST is
used for</div>
<div># flash_test, and is set for quick code generation, and
(sometimes)</div>
<div># profiling. The Makefile generated by setup will assign the
generic token</div>
<div># (ex. FFLAGS) to the proper set of flags (ex. FFLAGS_OPT).</div>
<div>#----------------------------------------------------------------------------</div>
<div><br>
</div>
<div>FFLAGS_OPT = -c -O2 -fdefault-real-8 -fdefault-double-8
-ffree-line-length-none</div>
<div>FFLAGS_DEBUG = -g -c -fdefault-real-8 -fdefault-double-8
-ffree-line-length-none</div>
<div>FFLAGS_TEST = -c -fdefault-real-8 -fdefault-double-8
-ffree-line-length-none</div>
<div><br>
</div>
<div>F90FLAGS =</div>
<div><br>
</div>
<div>CFLAGS_OPT = -O2 -c -std=c99 -Wno-long-long -O
-fomit-frame-pointer -finline-functions</div>
<div>CFLAGS_DEBUG = -g -c</div>
<div>CFLAGS_TEST = -c</div>
<div><br>
</div>
<div># if we are using HDF5, we need to specify the path to the
include files</div>
<div>CFLAGS_HDF5 = -I ${HDF5_PATH}/include -DH5_USE_16_API</div>
<div>
<div>#----------------------------------------------------------------------------</div>
<div># Linker flags</div>
<div>#</div>
<div># There is a seperate version of the linker flags for each of
the _OPT,</div>
<div># _DEBUG, and _TEST cases.</div>
<div>#----------------------------------------------------------------------------</div>
<div><br>
</div>
<div>LFLAGS_OPT = -o</div>
<div>LFLAGS_DEBUG = -g -o</div>
<div>LFLAGS_TEST = -o</div>
<div><br>
</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Library specific linking</div>
<div>#</div>
<div># If a FLASH module has a 'LIBRARY xxx' line in its Config
file, we need to</div>
<div># create a macro in this Makefile.h for LIB_xxx, which will be
added to the</div>
<div># link line when FLASH is built. This allows us to switch
between different</div>
<div># (incompatible) libraries. We also create a _OPT, _DEBUG, and
_TEST</div>
<div># library macro to add any performance-minded libraries (like
fast math),</div>
<div># depending on how FLASH was setup.</div>
<div>#----------------------------------------------------------------------------</div>
<div><br>
</div>
<div>LIB_OPT =</div>
<div>LIB_DEBUG =</div>
<div>LIB_TEST =</div>
<div><br>
</div>
<div>LIB_HDF5 = -L ${HDF5_PATH}/lib -lhdf5 -lz -Wl,-R/usr/lib</div>
<div><br>
</div>
<div>LIB_PAPI =</div>
<div>
<div>LIB_MATH = -ldfftw -ldrfftw</div>
<div><br>
</div>
<div>LIB_MPI =</div>
<div>#-L ${MPI_PATH}/lib -lfmpich -lmpich </div>
<div>LIB_NCMPI =</div>
<div>#-L $(NCMPI_PATH)/lib -lpnetcdf</div>
<div>LIB_MPE =</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Additional machine-dependent object files</div>
<div>#</div>
<div># Add any machine specific files here -- they will be compiled
and linked</div>
<div># when FLASH is built.</div>
<div>#----------------------------------------------------------------------------</div>
<div><br>
</div>
<div>MACHOBJ =</div>
<div><br>
</div>
<div><br>
</div>
<div>#----------------------------------------------------------------------------</div>
<div># Additional commands</div>
<div>#----------------------------------------------------------------------------</div>
<div><br>
</div>
<div>MV = mv -f</div>
<div>AR = ar -r</div>
<div>RM = rm -f</div>
<div>CD = cd</div>
<div>RL = ranlib</div>
<div>ECHO = echo</div>
</div>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">On Mon, May 31, 2010 at 2:40 PM, Christoper
Daley <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:cdaley@flash.uchicago.edu">cdaley@flash.uchicago.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
Huong,<br>
<br>
I think you may be using the wrong compiler options. Which compiler<br>
are you using? If you are using an XL compiler you must specify macro<br>
definitions using -WF,-D.<br>
<br>
Chris
<div>
<div class="h5"><br>
<br>
<br>
On 31/05/10 13:17, huong luu wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I was trying to compile FLASH on my system. I had a SUCCESS for ./setup
*** -auto but when I do a gmake then I got this error:<br>
<br>
[luu1@turing-4 object]$ gmake<br>
Calculating dependencies<br>
./setup_depends.py --generateINTERMEDIATElines -c -O2 -fdefault-real-8
-fdefault-double-8 -ffree-line-length-none -I /usr/include
-DH5_USE_16_API -O2 -c -std=c99 -Wno-long-long -O -fomit-frame-pointer
-finline-functions *.f *.f90 *.F90 *.F<br>
./setup_addcdepends.py -I /usr/include -DH5_USE_16_API -O2 -c -std=c99
-Wno-long-long -O -fomit-frame-pointer -finline-functions *.c<br>
rm -f reorder.sh<br>
/turing/home/luu1/install/mpich/bin/mpif90 -c -O2 -fdefault-real-8
-fdefault-double-8 -ffree-line-length-none -DMAXBLOCKS=1000 -DNXB=8
-DNYB=8 -DNZB=1 -DN_DIM=2 ut_interpolationInterface.F90<br>
f90: 1501-274 (W) An incompatible level of gcc has been specified.<br>
f90: 1501-214 (W) command option M reserved for future use - ignored<br>
f90: 1501-210 (S) command option NXB=8 contains an incorrect subargument<br>
gmake: *** [ut_interpolationInterface.o] Error 40<br>
<br>
Since the command option NXB=8 is automatically generated, I don't know
how to fix it. I was being able to run FLASH on another machine and am
trying to repeat it here. I changed the path accordingly to the new
machine. So I don't know why I have this error.<br>
<br>
Any suggestion?<br>
<br>
Thanks in advance,<br>
Huong<br>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>