Bug 166728 - New port: science/fvcom-mpi
Summary: New port: science/fvcom-mpi
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-07 15:40 UTC by Jason W. Bacon
Modified: 2013-02-20 17:40 UTC (History)
0 users

See Also:


Attachments
file.shar (1.02 KB, text/plain)
2012-04-07 15:40 UTC, Jason W. Bacon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2012-04-07 15:40:03 UTC
Variant of science/fvcom built with openmpi.

FVCOM is a prognostic, unstructured-grid, finite-volume, free-surface, 3-D
primitive equation coastal ocean circulation model developed by UMASSD-WHOI
joint efforts.

WWW:    http://fvcom.smast.umassd.edu/FVCOM/index.html

Fix: Patch attached with submission follows:
Comment 1 Max Brazhnikov freebsd_committer freebsd_triage 2012-09-25 15:12:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->makc

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-02-20 17:30:55 UTC
Author: makc
Date: Wed Feb 20 17:30:45 2013
New Revision: 312631
URL: http://svnweb.freebsd.org/changeset/ports/312631

Log:
  Add new ports science/fvcom and science/fvcom-mpi:
  
  FVCOM is a prognostic, unstructured-grid, finite-volume, free-surface,
  3-D primitive equation coastal ocean circulation model developed
  by UMASSD-WHOI joint efforts.
  
  WWW: http://fvcom.smast.umassd.edu/FVCOM/index.html
  
  PR:		ports/166726
  PR:		ports/166728
  Submitted by:	Jason Bacon <jwbacon at tds.net>

Added:
  head/science/fvcom/
  head/science/fvcom-mpi/
  head/science/fvcom-mpi/Makefile   (contents, props changed)
  head/science/fvcom/Makefile   (contents, props changed)
  head/science/fvcom/distinfo   (contents, props changed)
  head/science/fvcom/files/
  head/science/fvcom/files/patch-METIS_source-makefile   (contents, props changed)
  head/science/fvcom/files/patch-Makefile   (contents, props changed)
  head/science/fvcom/files/patch-mod_lag.F   (contents, props changed)
  head/science/fvcom/pkg-descr   (contents, props changed)
Modified:
  head/science/Makefile

Modified: head/science/Makefile
==============================================================================
--- head/science/Makefile	Wed Feb 20 17:24:04 2013	(r312630)
+++ head/science/Makefile	Wed Feb 20 17:30:45 2013	(r312631)
@@ -51,6 +51,8 @@
     SUBDIR += fasthenry
     SUBDIR += felt
     SUBDIR += flounder
+    SUBDIR += fvcom
+    SUBDIR += fvcom-mpi
     SUBDIR += fvm
     SUBDIR += g3data
     SUBDIR += gamess

Added: head/science/fvcom-mpi/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom-mpi/Makefile	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,15 @@
+# Created by: Jason Bacon <jwbacon@tds.net>
+# $FreeBSD$
+
+PKGNAMESUFFIX=	-mpi
+
+MAINTAINER=	jwbacon@tds.net
+
+LIB_DEPENDS+=	mpi:${PORTSDIR}/net/openmpi
+
+MASTERDIR=	${.CURDIR}/../fvcom
+
+MAKE_ARGS+=	FC=${LOCALBASE}/mpi/openmpi/bin/mpif90 \
+		PORT_CPP_FLAGS+=-DMULTIPROCESSOR
+
+.include "${MASTERDIR}/Makefile"

Added: head/science/fvcom/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/Makefile	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,45 @@
+# Created by: Jason Bacon <jwbacon@tds.net>
+# $FreeBSD$
+
+PORTNAME=	fvcom
+PORTVERSION=	2.7.1
+CATEGORIES=	science
+MASTER_SITES=	http://fvcom.smast.umassd.edu/FVCOM/index.html/
+DISTNAME=	sourcecode1
+DIST_SUBDIR=	fvcom
+
+MAINTAINER=	jwbacon@tds.net
+COMMENT=	Unstructured Grid Finite Volume Coastal Ocean Model
+
+# Check netcdf lib for Fortran support!
+LIB_DEPENDS+=	netcdff:${PORTSDIR}/science/netcdf-ftn \
+		lapack:${PORTSDIR}/math/lapack \
+		blas:${PORTSDIR}/math/lapack
+
+USE_FORTRAN=	yes
+WRKSRC=		${WRKDIR}/FVCOM2.7.1/FVCOM_source
+
+PLIST_FILES=	bin/${PORTNAME}${PKGNAMESUFFIX}
+
+RESTRICTED=	may not be redistributed because of licensing reasons
+
+.include <bsd.port.pre.mk>
+
+.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTFILES})
+IGNORE=	may not be redistributed because of licensing reasons.\
+	Please register at http://fvcom.smast.umassd.edu/FVCOM/index.html\
+	in order to download the source code ${DISTFILES}\
+	and place it in ${DISTDIR}/${DIST_SUBDIR}/
+.endif
+
+post-extract:
+	${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
+
+pre-build:
+	(cd ${WRKSRC}/../METIS_source && make)
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/fvcom \
+		${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
+
+.include <bsd.port.post.mk>

Added: head/science/fvcom/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/distinfo	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,2 @@
+SHA256 (fvcom/sourcecode1.tar.gz) = b687fccef91e37b3b98554bd80bfbf6f857703cd9bdfde166b502bee7473b7ad
+SIZE (fvcom/sourcecode1.tar.gz) = 6162463

Added: head/science/fvcom/files/patch-METIS_source-makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/files/patch-METIS_source-makefile	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,11 @@
+--- ../METIS_source/makefile.orig	2012-03-31 22:00:57.000000000 -0500
++++ ../METIS_source/makefile	2012-03-31 22:01:01.000000000 -0500
+@@ -2,7 +2,7 @@
+ AR = ar rv
+ RANLIB = ranlib
+ # add path to c compiler 
+-CC = icc 
++CC = gcc 
+ # add c compiler optimization flags
+ OPTFLAGS = -O2
+ CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES)

Added: head/science/fvcom/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/files/patch-Makefile	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,134 @@
+--- Makefile.orig	2009-09-22 14:45:57.000000000 -0500
++++ Makefile	2012-03-31 21:58:24.000000000 -0500
+@@ -17,7 +17,7 @@
+ #                           UNCOMMENT TO SELECT DOUBLE PRECISION
+ #--------------------------------------------------------------------------
+ 
+-#            FLAG_1 =  -DDOUBLE_PRECISION 
++             FLAG_1 =  -DDOUBLE_PRECISION 
+ 
+ #--------------------------------------------------------------------------
+ #        SPHERICAL          SELECT SPHERICAL COORDINATES FOR INTEGRATION
+@@ -35,7 +35,7 @@
+ #                           UNCOMMENT TO INCLUDE FLOODYING/DRYING
+ #--------------------------------------------------------------------------
+ 
+-#             FLAG_3 = -DWET_DRY
++             FLAG_3 = -DWET_DRY
+ 
+ #--------------------------------------------------------------------------
+ #        MULTI_PROCESSOR    INCLUDES PARALLELIZATION WITH MPI
+@@ -45,13 +45,14 @@
+ #                           UNCOMMENT TO INCLUDE MPI PARALLEL CAPABILITY
+ #--------------------------------------------------------------------------
+ 
+-              FLAG_4 = -DMULTIPROCESSOR
++#              FLAG_4 = -DMULTIPROCESSOR
+ 
+ # For em64t computers at SMAST (guppy)
+ #              PARLIB = -L/hosts/salmon01/data00/medm/em64t/lib64 -lmetis 
+ 
+ # For i386 computers at SMAST (salmon and minke)
+ #              PARLIB = -L/hosts/salmon01/data00/medm/lib -lmetis 
++#              PARLIB = -L${LOCALBASE}/lib -lmetis 
+               PARLIB = -L../METIS_source -lmetis 
+ 
+ # For Typhoeus and Hydra
+@@ -67,7 +68,7 @@
+ #                           UNCOMMENT TO INCLUDE WATER QUALITY MODEL
+ #--------------------------------------------------------------------------
+ 
+-#             FLAG_5 = -DWATER_QUALITY
++             FLAG_5 = -DWATER_QUALITY
+ 
+ #--------------------------------------------------------------------------
+ #        NETCDF OUTPUT      DUMP OUTPUT INTO NETCDF FILES (yes/no)
+@@ -79,8 +80,10 @@
+ #                           UNCOMMENT TO INCLUDE NETCDF OUTPUT CAPABILITY
+ #--------------------------------------------------------------------------
+            FLAG_6       =  -DNETCDF_IO
+-             IOLIBS       =  -L/hosts/mao/usr/medm/install/netcdf/3.6.3/em64t/lib  -lnetcdf
+-             IOINCS       =  -I/hosts/mao/usr/medm/install/netcdf/3.6.3/em64t/include
++# FreeBSD ports netcdf fortran support is separate from the standard
++# netcdf library. Must have both -lnetcdff and -lnetcdf
++             IOLIBS       =  -L${LOCALBASE}/lib -lnetcdff -lnetcdf
++             IOINCS       =  -I${LOCALBASE}/include
+ 
+ # For em64t computers at SMAST (guppy)
+ #             IOLIBS       =  -L/hosts/salmon01/data00/medm/em64t/lib64  -lnetcdf
+@@ -107,7 +110,7 @@
+ #                           UNCOMMENT TO INCLUDE DATA ASSIMILATION 
+ #--------------------------------------------------------------------------
+ 
+-#             FLAG_7 = -DNG_OI_ASSIM
++             FLAG_7 = -DNG_OI_ASSIM
+ 
+ # For Build on em64t computer (Guppy) 
+ #             OILIB  = -L/usr/X11R6/lib64 -L/usr/local/lib64 -lmkl_lapack -lmkl_em64t -lguide -lpthread
+@@ -381,15 +384,15 @@
+ #--------------------------------------------------------------------------
+ #  Intel/MPI Compiler Definitions (SMAST)      
+ #--------------------------------------------------------------------------
+-          CPP      = /usr/bin/cpp
+-          CPPFLAGS = $(DEF_FLAGS) -DINTEL   
+-          FC       = mpif90 
+-         DEBFLGS  = #-check all
++#          CPP      = /usr/bin/cpp
++#          CPPFLAGS = $(DEF_FLAGS) -DINTEL   
++#          FC       = mpif90 
++#         DEBFLGS  = #-check all
+ # Use 'OPT = -O0 -g'  for fast compile to test the make 
+ # Use 'OPT = -xP'      for fast run on em64t (Hydra, Typhoeus and Guppy)
+ # Use 'OPT = -xN'      for fast run on em64t (Salmon and Minke)
+ #         OPT      = -O0 -g 
+-          OPT      = -xP
++#          OPT      = -xP
+ #          OPT      = -xN
+ 
+ # Do not set static for use with visit!
+@@ -398,12 +401,11 @@
+ #--------------------------------------------------------------------------
+ #  gfortran defs 
+ #--------------------------------------------------------------------------
+-#         CPP      = /usr/bin/cpp 
+-#         CPPFLAGS = $(DEF_FLAGS)  -DGFORTRAN
+-#         FC       = gfortran  -O3 
+-#         DEBFLGS  = 
+-#         OPT      = 
+-#         CLIB     = 
++         CPP      = cpp 
++         CPPFLAGS = $(DEF_FLAGS)  -DGFORTRAN
++         DEBFLGS  = -g
++         OPT      = -O
++         CLIB     = 
+ #--------------------------------------------------------------------------
+ #  absoft / mac os x defs
+ #--------------------------------------------------------------------------
+@@ -448,7 +450,8 @@
+ #--------------------------------------------------------------------------
+ #  CAT Preprocessing Flags
+ #--------------------------------------------------------------------------
+-           CPPARGS =  $(CPPFLAGS) $(DEF_FLAGS) $(FLAG_1) $(FLAG_2) \
++           CPPARGS =  $(CPPFLAGS) $(DEF_FLAGS) $(PORT_CPP_FLAGS) \
++   $(FLAG_1) $(FLAG_2) \
+    $(FLAG_3) $(FLAG_4) $(FLAG_5) $(FLAG_6)  \
+    $(FLAG_7) $(FLAG_8) $(FLAG_9) $(FLAG_10) \
+    $(FLAG_11) $(FLAG_12) $(FLAG_13) $(FLAG_14) \
+@@ -463,7 +466,7 @@
+ 
+             LIBS  =	$(PV3LIB) $(CLIB)  $(PARLIB) $(IOLIBS)	\
+ 			$(MPILIB) $(GOTMLIB) $(KFLIB) $(BIOLIB)	\
+-			$(OILIB) $(VISITLIB) $(PETSC_LIB)
++			$(OILIB) $(VISITLIB) $(PETSC_LIB) -llapack -lblas
+ 
+             INCS  = 	$(IOINCS) $(GOTMINCS) $(BIOINCS) $(VISITINC) $(PETSC_FC_INCLUDES)
+ 
+@@ -539,6 +542,8 @@
+ #  Linking Directives
+ #--------------------------------------------------------------------------
+ 
++all:		$(EXEC)
++
+ $(EXEC):	$(OBJS)
+ 		$(FC) $(FFLAGS) $(VISOPT) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXEC)
+ 

Added: head/science/fvcom/files/patch-mod_lag.F
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/files/patch-mod_lag.F	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,16 @@
+--- mod_lag.F.orig	2008-07-25 16:44:11.000000000 -0500
++++ mod_lag.F	2012-03-31 21:57:17.000000000 -0500
+@@ -212,7 +212,12 @@
+   !Lagrangian particle associated scalar
+   character(len=80) :: lag_scal_choice
+   integer, parameter:: n_scal_choice = 6
+-  character(len=80) :: scal_choices(n_scal_choice) = (/"s1","t1","rho1","km","kh","user_defined"/)
++  character(len=80) :: scal_choices(n_scal_choice) = (/ "s1          ", &
++							"t1          ", &
++							"rho1        ", &
++							"km          ", &
++							"kh          ", &
++							"user_defined"/)
+   logical           :: scal_choice_valid
+ 
+ 

Added: head/science/fvcom/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/fvcom/pkg-descr	Wed Feb 20 17:30:45 2013	(r312631)
@@ -0,0 +1,5 @@
+FVCOM is a prognostic, unstructured-grid, finite-volume, free-surface,
+3-D primitive equation coastal ocean circulation model developed
+by UMASSD-WHOI joint efforts.
+
+WWW: http://fvcom.smast.umassd.edu/FVCOM/index.html
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Max Brazhnikov freebsd_committer freebsd_triage 2013-02-20 17:32:24 UTC
State Changed
From-To: open->closed

New port added, with minor changes. Thanks!