<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 12pt;">Hi Nicolai,<br>
<br>
Try C compiler cc and <br>
<br>
IFMPI="false"<br>
<br>
first.<br>
<br>
(Otherwise you need to be consistent and use mpif77 installed for gfortran)<br>
<br>
Aleks<br>
<br>
<br>
<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF820863"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Thursday, May 07, 2015 4:03 PM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> [Nek5000-users] Compiling nek5000 with MPI on Mac.<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>Hi, </div>
I'm trying to use nek5000 with MPI on a Mac. OS is Yosemite.
<div><br>
Fortran compiler = gfortran:</div>
<div><br>
nikolai:eddy wenhaowu$ gfortran --version<br>
GNU Fortran (GCC) 5.1.0<br>
Copyright (C) 2014 Free Software Foundation, Inc.<br>
<br>
</div>
<div>C compiler = mpicc from mpich:<br>
<br>
</div>
<div>nikolai:eddy wenhaowu$ mpicc --version<br>
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)<br>
Target: x86_64-apple-darwin14.3.0<br>
Thread model: posix<br>
<br>
<br>
And I followed the instruction 'QuickStart':</div>
<div><br>
Here is the beginning of my 'makenek':<br>
-----------------------------------------------------------------<br>
#!/bin/bash <br>
<br>
# Nek5000 build config file <br>
<br>
# (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC <br>
<br>
<br>
# source path <br>
<br>
SOURCE_ROOT="/Users/wenhaowu/Documents/testcases/nek5/trunk/nek"<br>
<br>
<br>
# Fortran compiler <br>
<br>
F77="gfortran"<br>
<br>
<br>
# C compiler <br>
<br>
CC="mpicc"<br>
<br>
<br>
# pre-processor symbol list <br>
<br>
# (set PPLIST=? to get a list of available symbols) <br>
<br>
#PPLIST="?" <br>
<br>
<br>
# plug-in list <br>
<br>
PLUGIN_LIST=""<br>
<br>
<br>
<br>
# OPTIONAL SETTINGS <br>
<br>
# ----------------- <br>
<br>
<br>
# enable MPI (default true) <br>
<br>
#IFMPI="false"<br>
<br>
...<br>
-----------------------------------------------------------------<br>
<br>
Here is my command:<br>
./makenek eddy_uv<br>
<br>
Here is an example what goes wrong:<br>
<div>-------------------------------------------------------------------------<br>
mpicc -c -O2 -DPTRSIZE8 -DMPI -DLONGINT8 -DUNDERSCORE -DGLOBAL_LONG_LONG -DPRE<br>
<br>
FIX=jl_ /Users/wenhaowu/Documents/testcases/nek5/trunk/nek/nek_comm.c -o obj/nek<br>
<br>
_comm.o<br>
<br>
In file included from /Users/wenhaowu/Documents/testcases/nek5/trunk/nek/nek_com<br>
<br>
m.c:17:<br>
<br>
/opt/local/include/mpich-mp/mpi.h:116:56: error: expected identifier<br>
<br>
static const MPI_Datatype mpich_mpi_char MPICH_ATTR_TYPE_TAG(char)<br>
<br>
= MPI_CHAR;<br>
<br>
^<br>
<br>
/opt/local/include/mpich-mp/mpi.h:24:106: note: expanded from macro 'MPICH_ATTR_TYPE_TAG'<br>
<br>
# define MPICH_ATTR_TYPE_TAG(type) __attribute__((type_tag_for_datatype(MPI,type)))<br>
<br>
^<br>
<br>
<command line>:2:13: note: expanded from here<br>
<br>
#define MPI 1<br>
-------------------------------------------------------------------------</div>
<div><br>
<div>The problem is nek5000 has #defined MPI to be 1, but the mpich header file<br>
'mpi.h' uses the symbol 'MPI' (for a completely different reason).<br>
<br>
</div>
<div>How do other people use nek5000 with mpi on a Mac?<br>
<br>
Thanks.<br>
<br>
Sincerely,<br>
<br>
Wenhao Wu<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>