[Developers] problems compiling cactus on mac osx with ifort

Bruno Giacomazzo bgiacoma at aei.mpg.de
Tue Aug 7 12:46:17 CDT 2007


Hi,
 	I was finally able to compile Cactus on my Mac (OS X Version 
10.4.10) using the fortran Intel compiler. I had to modify two files:

1) Cactus/lib/make/extras/MPI/MPICH using a patch that was created by 
Steve White one year ago and which solves a problem with mpich2 since 
tarch is not installed anymore. It use mpich2version instead (see 
mpich2.diff attached). Why this patch was not committed?

2) Cactus/lib/make/known-architectures/darwin since when using gcc to 
link, it tries to use icrt.link which is not installed. (see darwin.diff 
attached).

 	I have also attached the config-info file used to build the 
executable that runs without any problem. Note that I had to add the 
following option in the config file: LIBS=pmpich imf svml ifcore

 	I have used the following version of the compilers and libraries:

gcc version 4.0.1 (Apple Computer, Inc. build 5367)
ifort Version 10.0
hdf5 Version 1.6.5
mpich2 Version 1.0.5


Cheers,
Bruno

-- 
Dr. Bruno Giacomazzo
Max Planck Institute for Gravitational Physics
Albert Einstein Institute
Am Muehlenberg 1
D-14476 Potsdam
Germany

Tel.  : +49 331 567 7183
Fax   : +49 331 567 7252
cell. : +49 173 826 4488
email : bgiacoma at aei.mpg.de

-------------------------------------------------
There are only 10 types of people in the world:
Those who understand binary, and those who don't
-------------------------------------------------
-------------- next part --------------
Index: lib/make/extras/MPI/MPICH
===================================================================
RCS file: /cactusdevcvs/Cactus/lib/make/extras/MPI/MPICH,v
retrieving revision 1.25
diff -u -r1.25 MPICH
--- lib/make/extras/MPI/MPICH	24 Oct 2005 09:12:21 -0000	1.25
+++ lib/make/extras/MPI/MPICH	21 Apr 2006 09:57:16 -0000
@@ -43,15 +43,23 @@
 # Find the MPICH architecture
 
 if test -z "$MPICH_ARCH" ; then
-  if test -x "$MPICH_DIR/bin/tarch" ; then
-    MPICH_ARCH=`$MPICH_DIR/bin/tarch`
-    echo "  MPICH architecture is $MPICH_ARCH"
-  else
-    echo "  Cannot execute $MPICH_DIR/bin/tarch"
-    exit 2
+  # MPICH2 doesn't install tarch
+  if test ! -x "$MPICH_DIR/bin/mpich2version" ; then
+    if test -x "$MPICH_DIR/bin/tarch" ; then
+      MPICH_ARCH=`$MPICH_DIR/bin/tarch`
+      echo "  MPICH architecture is $MPICH_ARCH"
+    else
+      echo "  Cannot execute $MPICH_DIR/bin/tarch"
+      exit 2
+    fi
   fi
 fi
 
+if test -x "$MPICH_DIR/bin/mpich2version" ; then
+  # see MPICH2 User's Guide, sect. 5.3: Special Issues for C++
+  CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"
+fi
+
 # Find the MPICH device - this isn't necessary for mpich-1.2.0
 
 if test -d "$MPICH_DIR/build/$MPICH_ARCH" ; then
@@ -176,7 +184,13 @@
 fi
 
 # Set the MPI version name
-MPI_VERSION="MPICH_$MPICH_DEVICE"
+if test -x "$MPICH_DIR/bin/mpich2version" ; then
+  MPICH2_VERSION=`mpich2version -v`
+  MPICH2_DEVICE=`mpich2version -d`
+  MPI_VERSION="MPICH2 ${MPICH2_VERSION} (${MPICH2_DEVICE})"
+else
+  MPI_VERSION="MPICH_$MPICH_DEVICE"
+fi
 
 # Finally set the library lines.
 MPI_LIBS="$MPICH_LIB $MPICH_DEVICE_LIBS"

------------------------------------------------------------------------

    * Previous message: [Users] trouble building cactus <001800.html>
    * Next message: [Users] problem with CactusEinstein/ADMConstraints
      and AEIThorns/Exact <001801.html>
    * *Messages sorted by:* [ date ] <date.html#1799> [ thread ]
      <thread.html#1799> [ subject ] <subject.html#1799> [ author ]
      <author.html#1799>

------------------------------------------------------------------------
More information about the Users mailing list
<http://www.cactuscode.org/mailman/listinfo/users>
-------------- next part --------------
Index: darwin
===================================================================
RCS file: /cactusdevcvs/Cactus/lib/make/known-architectures/darwin,v
retrieving revision 1.18
diff -r1.18 darwin
283c283
<         : ${LDFLAGS="-Qy $intel_dir/lib/icrt.link"}
---
>         : ${LIBS=""} #LDFLAGS="-Qy $intel_dir/lib/icrt.link"
-------------- next part --------------
# CONFIGURATION  : Whisky_carpet_ifort
# CONFIG-DATE    : Tue Aug  7 16:32:08 2007 (GMT)
# CONFIG-HOST    : dhcp-104.aei.mpg.de
# CONFIG-STATUS  : 0
# CONFIG-OPTIONS :
BLAS_DIR=/usr/lib
CFLAGS=-Drestrict= -std=c99 -DMPICH_IGNORE_CXX_SEEK
CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK
CXXFLAGS=-DMPICH_IGNORE_CXX_SEEK
F77=ifort
F90=ifort
FPP=${PERL} ${CCTK_HOME}/lib/sbin/cpp.pl
GSL_DIR=/sw
HDF5=yes
HDF5_DIR=/usr/local
LAPACK=yes
LAPACK_DIR=/Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/32
LIBS=pmpich imf svml ifcore
MPI=MPICH
MPICH_DIR=/usr/local/mpich2
PERL=perl
THORNLIST=Whisky_carpet.th
THORNLIST_DIR=thornlists


More information about the Developers mailing list