Compiling

From ScorecWiki

Jump to: navigation, search

Compiling FMDB

Autotools

  1. checkout ipcomman, FMDB from svn repository
  2. compilation script:
cd $DEVROOT 

# compile ipcomman 

cd $DEVROOT/ipcomman/ipcomman
MPI=/usr/local/openmpi64/latest
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MPI/lib

autoreconf --install --force
./configure --with-mpi=$MPI --prefix=$DEVROOT/ipcomman/install
make clean; make uninstall;
make
make install

#compile FMDB

cd $DEVROOT/FMDB/

./configure  -prefix=$DEVROOT/FMDB/install
--enable-parallel \
--with-mpi=$MPI \
--with-ipcomman=$DEVROOT/ipcomman/install \
--with-zoltan=/users/txie/zoltan/openmpi64/ \
--with-parmetis=/users/txie/parmetis/openmpi64/
make
make install 

Cmake

SCOREC Util

  1. checkout ipcomman, FMDB, Util from svn repository
  2. environmental setting script on scorec machine
export DEVROOT=$PWD
export NODEP=1
export PARALLEL=mpich1
export MPICOMM=ch_p4
export MODELER=null
#export VERS=opt
  1. compilation script
export DEVROOT=$PWD

source env.pglt

echo "STARTING BUILD OPTIMIZED MESHADAPT WITH FMDB"

distclean=distclean

cd ipcomman/ipcomman
gmake $distclean
gmake setup
gmake

cd ../../FMDB/FMDB/FMDB
gmake -f Makefile.scorec $distclean
gmake -f Makefile.scorec setup
cd ../../SCORECModel/SCORECModel
gmake -f Makefile.scorec $distclean
gmake -f Makefile.scorec setup
cd ../../SCORECUtil/SCORECUtil
gmake -f Makefile.scorec $distclean
gmake -f Makefile.scorec setup

cd ../../../FMDB/FMDB/FMDB
gmake -f Makefile.scorec
cd ../../SCORECModel/SCORECModel
gmake -f Makefile.scorec
cd ../../SCORECUtil/SCORECUtil
gmake -f Makefile.scorec


h1. Compile FMDB with iMesh/iMeshP

h2. Compile FMDB with iMesh

  • check out iMesh compliance test

svn co https://svn.scorec.rpi.edu/svn/TSTT/ComplianceTests/iMesh iMesh_ComplianceTest

  • compile FMDB in serial

gmake NODEP=1 TSTT=1 NOSHARED=1 MODELER=null

Then you will get three *.a libs in FMDB/FMDB/lib/, FMDB/SCORECModel/lib, FMDB/SCORECUtil/lib, create one more file: iMesh-Defs.inc using the script below, copy the libs and this .inc file into the same folder(eg. /users/YOUR_NAME/imesh_develop/lib)


IMESH_CXXFLAGS = -O2 IMESH_CFLAGS = -O2 IMESH_LDFLAGS = IMESH_CXX_LDFLAGS = IMESH_CXX_LIBS =

IMESH_INCLUDES = -I$(IMESH_INCLUDEDIR)/FMDB

IMESH_LIBS = -L$(FMDB_IMESH_LIBDIR)/lib -lFMDB -lSCORECModel -lSCORECUtil

IMESH_INCLUDEDIR =/users/YOUR_NAME/imesh_develop/include FMDB_IMESH_LIBDIR =/users/YOUR_NAME/imesh_develop


  • build iMesh_ComplianceTest

./configure --with-iMesh=/users/YOUR_NAME/imesh_develop/lib make

  • run iMesh_ComplianceTest

iMesh_unitTest cube.sms


h2. iMeshP Tests

  • compile FMDB with iMeshP impl.

gmake NODEP=1 PARALLEL=openmpi IMESHP=1 MODELER=null checkone DIR=Testing/iMeshP

  • go to Testing/iMeshP folder, run

/usr/local/openmpi64/latest/bin/mpirun -np 4 ./main part.sms

  • use totalview debugger

http://wiki.ccni.rpi.edu/index.php/16_Rack_CCNI_Blue_Gene#Totalview

/usr/local/openmpi64/latest/bin/mpirun -np 4 -tv ./main part.sms

Personal tools