[Nek5000-users] Compiling nek5000 with MPI on Mac.
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu May 7 16:28:15 CDT 2015
Hi Nicolai,
Try C compiler cc and
IFMPI="false"
first.
(Otherwise you need to be consistent and use mpif77 installed for gfortran)
Aleks
________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Thursday, May 07, 2015 4:03 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] Compiling nek5000 with MPI on Mac.
Hi,
I'm trying to use nek5000 with MPI on a Mac. OS is Yosemite.
Fortran compiler = gfortran:
nikolai:eddy wenhaowu$ gfortran --version
GNU Fortran (GCC) 5.1.0
Copyright (C) 2014 Free Software Foundation, Inc.
C compiler = mpicc from mpich:
nikolai:eddy wenhaowu$ mpicc --version
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
And I followed the instruction 'QuickStart':
Here is the beginning of my 'makenek':
-----------------------------------------------------------------
#!/bin/bash
# Nek5000 build config file
# (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC
# source path
SOURCE_ROOT="/Users/wenhaowu/Documents/testcases/nek5/trunk/nek"
# Fortran compiler
F77="gfortran"
# C compiler
CC="mpicc"
# pre-processor symbol list
# (set PPLIST=? to get a list of available symbols)
#PPLIST="?"
# plug-in list
PLUGIN_LIST=""
# OPTIONAL SETTINGS
# -----------------
# enable MPI (default true)
#IFMPI="false"
...
-----------------------------------------------------------------
Here is my command:
./makenek eddy_uv
Here is an example what goes wrong:
-------------------------------------------------------------------------
mpicc -c -O2 -DPTRSIZE8 -DMPI -DLONGINT8 -DUNDERSCORE -DGLOBAL_LONG_LONG -DPRE
FIX=jl_ /Users/wenhaowu/Documents/testcases/nek5/trunk/nek/nek_comm.c -o obj/nek
_comm.o
In file included from /Users/wenhaowu/Documents/testcases/nek5/trunk/nek/nek_com
m.c:17:
/opt/local/include/mpich-mp/mpi.h:116:56: error: expected identifier
static const MPI_Datatype mpich_mpi_char MPICH_ATTR_TYPE_TAG(char)
= MPI_CHAR;
^
/opt/local/include/mpich-mp/mpi.h:24:106: note: expanded from macro 'MPICH_ATTR_TYPE_TAG'
# define MPICH_ATTR_TYPE_TAG(type) __attribute__((type_tag_for_datatype(MPI,type)))
^
<command line>:2:13: note: expanded from here
#define MPI 1
-------------------------------------------------------------------------
The problem is nek5000 has #defined MPI to be 1, but the mpich header file
'mpi.h' uses the symbol 'MPI' (for a completely different reason).
How do other people use nek5000 with mpi on a Mac?
Thanks.
Sincerely,
Wenhao Wu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20150507/661df031/attachment.html>
More information about the Nek5000-users
mailing list