Index: head/biology/canu/Makefile =================================================================== --- head/biology/canu/Makefile (revision 499250) +++ head/biology/canu/Makefile (revision 499251) @@ -1,63 +1,68 @@ # $FreeBSD$ PORTNAME= canu DISTVERSIONPREFIX= v DISTVERSION= 1.8 PORTREVISION= 3 CATEGORIES= biology java perl5 MAINTAINER= jwb@FreeBSD.org COMMENT= Single molecule sequence assembler LICENSE= GPLv2 LICENSE_FILE= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/README.license.GPL -BROKEN_aarch64= fails to link: undefined reference to omp_set_num_threads -BROKEN_armv6= fails to install: mv: rename site_perl to /wrkdirs/usr/ports/biology/canu/work/canu-1.7/src/usr/local/FreeBSD-armv6/lib/perl5/site_perl: No such file or directory -BROKEN_armv7= fails to install: mv: rename site_perl to /wrkdirs/usr/ports/biology/canu/work/canu-1.7/src/usr/local/FreeBSD-armv7/lib/perl5/site_perl: No such file or directory - LIB_DEPENDS= libboost_regex.so:devel/boost-libs RUN_DEPENDS= gnuplot:math/gnuplot USES= compiler:openmp gmake perl5 USE_JAVA= yes USE_GITHUB= yes JAVA_RUN= yes JAVA_VERSION= 1.8+ GH_ACCOUNT= marbl WRKSRC_SUBDIR= src -# Makefile compiles directly into ${DESTDIR}${PREFIX} -MAKE_ENV+= DESTDIR=${WRKSRC} +# Upstream Makefile compiles directly into ${DESTDIR}${PREFIX} rather than +# using a separate install target. +MAKE_ENV= DESTDIR=${WRKSRC} CANU_BUILD_ENV=ports -post-patch: - ${REINPLACE_CMD} \ +.include + +# GCC 4.2.1 (still base compiler on some 2nd tier platforms) cannot build canu +.if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 +USE_GCC= yes +.endif + +pre-configure: + @${REINPLACE_CMD} \ -e 's|-O4||g' \ -e 's|-funroll-loops||g' \ -e 's|-fexpensive-optimizations||g' \ - -e 's|amd64|${ARCH}|g' \ ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's|\\$$bin/mhap-|${JAVAJARDIR}/mhap-|g' \ + @${REINPLACE_CMD} \ + -e 's|\\$$bin/mhap-|${JAVAJARDIR}/mhap-|g' \ ${WRKSRC}/pipelines/canu/OverlapMhap.pm - ${REINPLACE_CMD} -e 's|RealBin/lib|RealBin/../${SITE_PERL_REL}/canu|g' \ + @${REINPLACE_CMD} \ + -e 's|RealBin/lib|RealBin/../${SITE_PERL_REL}/canu|g' \ ${WRKSRC}/pipelines/canu.pl # Upstream does not want to use lib/perl5/site_perl post-build: @${MKDIR} ${WRKSRC}${PREFIX}/FreeBSD-${ARCH}/lib/perl5 ${MV} ${WRKSRC}${PREFIX}/FreeBSD-${ARCH}/lib/site_perl \ ${WRKSRC}${PREFIX}/FreeBSD-${ARCH}/lib/perl5 do-install: @${MKDIR} ${STAGEDIR}${PREFIX} (cd ${WRKSRC}${PREFIX}/FreeBSD-${ARCH} && \ ${COPYTREE_BIN} bin ${STAGEDIR}${PREFIX}) # STRIP_CMD fails without this on 11.1 under poudriere @${CHMOD} u+w ${STAGEDIR}${PREFIX}/bin/* - ${STRIP_CMD} \ + @${STRIP_CMD} \ `file ${STAGEDIR}${PREFIX}/bin/* | ${GREP} ELF | cut -d : -f 1` (cd ${WRKSRC}${PREFIX}/FreeBSD-${ARCH} && \ ${COPYTREE_SHARE} "lib share" ${STAGEDIR}${PREFIX}) -.include +.include Index: head/biology/canu/files/patch-Makefile =================================================================== --- head/biology/canu/files/patch-Makefile (nonexistent) +++ head/biology/canu/files/patch-Makefile (revision 499251) @@ -0,0 +1,116 @@ +--- Makefile.orig 2018-10-22 16:47:31 UTC ++++ Makefile +@@ -481,68 +481,65 @@ endif + + + ifeq (${OSTYPE}, FreeBSD) +-ifeq (${MACHINETYPE}, amd64) +- CC ?= gcc48 +- CXX ?= g++48 + +- # GCC +- CXXFLAGS += -I/usr/local/include -D_GLIBCXX_PARALLEL -pthread -fopenmp -fPIC +- LDFLAGS += -L/usr/local/lib -D_GLIBCXX_PARALLEL -pthread -fopenmp -rpath /usr/local/lib/gcc48 -lm -lexecinfo ++ ifeq (${CANU_BUILD_ENV}, ports) + +- # CLANG +- #CXXFLAGS += -I/usr/local/include -D_GLIBCXX_PARALLEL -pthread -fPIC +- #LDFLAGS += -L/usr/local/lib -D_GLIBCXX_PARALLEL -pthread -lm -lexecinfo -lgomp ++ ################################################# ++ # If compiling within ports system (recommended) ++ ################################################# + +- #CXXFLAGS += -Wall -Wextra -Wformat -Wno-unused -Wno-parentheses +- CXXFLAGS += -Wall -Wextra -Wformat -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-char-subscripts -Wno-write-strings -Wno-sign-compare -Wno-format-truncation ++ # Use architecture as defined by ports rather than uname ++ # ${ARCH} matches uname -p, not uname -m ++ MACHINETYPE=${ARCH} + +- # Google Performance Tools malloc and heapchecker (HEAPCHECK=normal) +- #CXXFLAGS += +- #LDFLAGS += -ltcmalloc ++ # Take compiler and most flags from the env and make command line ++ CXXFLAGS += -D_GLIBCXX_PARALLEL -fPIC -pthread -fopenmp ++ LDFLAGS += -D_GLIBCXX_PARALLEL -pthread -fopenmp + +- # Google Performance Tools cpu profiler (CPUPROFILE=/path) +- #CXXFLAGS += +- #LDFLAGS += -lprofiler ++ else + +- # callgrind +- #CXXFLAGS += -g3 -Wa,--gstabs -save-temps ++ ###################################################### ++ # If compiling outside ports system (not recommended) ++ ###################################################### + +- ifeq ($(BUILDOPTIMIZED), 1) +- else +- CXXFLAGS += -g3 +- endif ++ CC ?= gcc48 ++ CXX ?= g++48 + +- ifeq ($(BUILDDEBUG), 1) +- else +- CXXFLAGS += -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer +- endif +-endif +-endif ++ # GCC ++ CXXFLAGS += -I/usr/local/include -D_GLIBCXX_PARALLEL -pthread -fopenmp -fPIC ++ LDFLAGS += -L/usr/local/lib -D_GLIBCXX_PARALLEL -pthread -fopenmp -rpath /usr/local/lib/gcc48 -lm -lexecinfo + ++ # CLANG ++ #CXXFLAGS += -I/usr/local/include -D_GLIBCXX_PARALLEL -pthread -fPIC ++ #LDFLAGS += -L/usr/local/lib -D_GLIBCXX_PARALLEL -pthread -lm -lexecinfo -lgomp + +-ifeq (${OSTYPE}, FreeBSD) +-ifeq (${MACHINETYPE}, arm) +- CC ?= gcc48 +- CXX ?= g++48 ++ #CXXFLAGS += -Wall -Wextra -Wformat -Wno-unused -Wno-parentheses ++ CXXFLAGS += -Wall -Wextra -Wformat -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-char-subscripts -Wno-write-strings -Wno-sign-compare -Wno-format-truncation + +- CXXFLAGS += -I/usr/local/include -D_GLIBCXX_PARALLEL -pthread -fopenmp -fPIC +- LDFLAGS += -L/usr/local/lib -D_GLIBCXX_PARALLEL -pthread -fopenmp -rpath /usr/local/lib/gcc48 -lm ++ # Google Performance Tools malloc and heapchecker (HEAPCHECK=normal) ++ #CXXFLAGS += ++ #LDFLAGS += -ltcmalloc + +- CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat -Wno-parentheses +- CXXFLAGS += -funroll-loops -fomit-frame-pointer +- LDFLAGS += ++ # Google Performance Tools cpu profiler (CPUPROFILE=/path) ++ #CXXFLAGS += ++ #LDFLAGS += -lprofiler + +- ifeq ($(BUILDOPTIMIZED), 1) +- else +- CXXFLAGS += -g3 +- endif ++ # callgrind ++ #CXXFLAGS += -g3 -Wa,--gstabs -save-temps + +- ifeq ($(BUILDDEBUG), 1) +- else +- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer +- endif +-endif +-endif ++ ifeq ($(BUILDOPTIMIZED), 1) ++ else ++ CXXFLAGS += -g3 ++ endif ++ ++ ifeq ($(BUILDDEBUG), 1) ++ else ++ CXXFLAGS += -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer ++ endif ++ ++ endif # CANU_BUILD_ENV ++ ++endif # FreeBSD + + + ifneq (,$(findstring CYGWIN, ${OSTYPE})) Property changes on: head/biology/canu/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/biology/canu/files/patch-pipelines_canu_Defaults.pm =================================================================== --- head/biology/canu/files/patch-pipelines_canu_Defaults.pm (revision 499250) +++ head/biology/canu/files/patch-pipelines_canu_Defaults.pm (revision 499251) @@ -1,19 +1,19 @@ ---- pipelines/canu/Defaults.pm.orig 2018-06-19 17:20:30 UTC +--- pipelines/canu/Defaults.pm.orig 2018-10-22 16:47:31 UTC +++ pipelines/canu/Defaults.pm -@@ -812,6 +812,16 @@ sub setDefaults () { +@@ -917,6 +917,16 @@ sub setDefaults () { setDefault("gridEngineArraySubmitID", undef, "Grid engine configuration, not documented"); setDefault("gridEngineJobID", undef, "Grid engine configuration, not documented"); + ##### Slurm-specific parameters for controlling the number of + ##### cores / tasks dispatched per step or globally (WIP) + + setDefault( 'slurmCormhapCoreLimit', undef, 'Maximum number of cores allocated for MHAP pre-computing and alignment within the correction phase' ); + setDefault( 'slurmOvbCoreLimit', undef, 'Maximum number of single-core tasks dispatched for the ovlStore bucketizing step within the trimming phase' ); + setDefault( 'slurmOvsCoreLimit', undef, 'Maximum number of single-core tasks dispatched for the ovlStore sorting step within the trimming phase' ); + setDefault( 'slurmRedCoreLimit', undef, 'Maximum number of cores allocated for read error detection within the unitigging phase' ); + setDefault( 'slurmArrayTaskLimit', undef, 'Maximum number of tasks permitted for each step throughout assembly' ); + setDefault( 'slurmArrayCoreLimit', undef, 'Maximum number of cores allocated for each step throughout assembly' ); + ##### Grid Engine Pipeline setDefault("useGrid", 1, "If 'true', enable grid-based execution; if 'false', run all jobs on the local machine; if 'remote', create jobs for grid execution but do not submit; default 'true'"); Index: head/biology/canu/files/patch-pipelines_canu_Execution.pm =================================================================== --- head/biology/canu/files/patch-pipelines_canu_Execution.pm (revision 499250) +++ head/biology/canu/files/patch-pipelines_canu_Execution.pm (revision 499251) @@ -1,78 +1,78 @@ ---- pipelines/canu/Execution.pm.orig 2018-06-18 02:42:11 UTC +--- pipelines/canu/Execution.pm.orig 2018-10-22 16:47:31 UTC +++ pipelines/canu/Execution.pm -@@ -303,10 +303,6 @@ sub skipStage ($$@) { +@@ -333,10 +333,6 @@ sub resetIteration ($) { sub getInstallDirectory () { my $installDir = $FindBin::RealBin; - if ($installDir =~ m!^(.*)/\w+-\w+/bin$!) { - $installDir = $1; - } - return($installDir); } -@@ -694,8 +690,8 @@ sub submitScript ($$) { +@@ -784,8 +780,8 @@ sub submitScript ($$) { -sub buildGridArray ($$$$) { - my ($name, $bgn, $end, $opt) = @_; +sub buildGridArray (@) { + my ( $name, $bgn, $end, $opt, $thr ) = @_; my $off = 0; # In some grids (SGE) this is the maximum size of an array job. -@@ -725,8 +721,42 @@ sub buildGridArray ($$$$) { +@@ -823,8 +819,42 @@ sub buildGridArray ($$$$) { $off = "-F \"$off\""; } - $opt =~ s/ARRAY_NAME/$name/g; # Replace ARRAY_NAME with 'job name' - $opt =~ s/ARRAY_JOBS/$bgn-$end/g; # Replace ARRAY_JOBS with 'bgn-end' + if( $opt =~ m/(ARRAY_NAME)/ ) + { + $opt =~ s/$1/$name/; # Replace ARRAY_NAME with 'job name' + } + elsif( $opt =~ m/(ARRAY_JOBS)/ ) + { + $opt =~ s/$1/$bgn-$end/; # Replace ARRAY_JOBS with 'bgn-end' + + if( lc( getGlobal( 'gridEngine' ) ) eq 'slurm' && $end > 1 ) + { + if( $name =~ m/^cormhap_/i && defined getGlobal( 'slurmCormhapCoreLimit' ) ) + { + $opt .= '%' . int( getGlobal( 'slurmCormhapCoreLimit' ) / $thr ); + } + elsif( $name =~ m/^ovb_/i && defined getGlobal( 'slurmOvbCoreLimit' ) ) + { + $opt .= '%' . getGlobal( 'slurmOvbCoreLimit' ); + } + elsif( $name =~ m/^ovs_/i && defined getGlobal( 'slurmOvsCoreLimit' ) ) + { + $opt .= '%' . getGlobal( 'slurmOvsCoreLimit' ); + } + elsif( $name =~ m/^red_/i && defined getGlobal( 'slurmRedCoreLimit' ) ) + { + $opt .= '%' . int( getGlobal( 'slurmRedCoreLimit' ) / $thr ); + } + elsif( defined getGlobal( 'slurmArrayTaskLimit' ) ) + { + $opt .= '%' . getGlobal( 'slurmArrayTaskLimit' ); + } + elsif( defined getGlobal( 'slurmArrayCoreLimit' ) ) + { + $opt .= '%' . int( getGlobal( 'slurmArrayCoreLimit' ) / $thr ); + } + } + } return($opt, $off); } -@@ -870,7 +900,7 @@ sub buildGridJob ($$$$$$$$$) { +@@ -973,7 +1003,7 @@ sub buildGridJob ($$$$$$$$$) { my $jobNameT = makeUniqueJobName($jobType, $asm); my ($jobName, $jobOff) = buildGridArray($jobNameT, $bgnJob, $endJob, getGlobal("gridEngineArrayName")); - my ($arrayOpt, $arrayOff) = buildGridArray($jobNameT, $bgnJob, $endJob, getGlobal("gridEngineArrayOption")); + my ( $arrayOpt, $arrayOff ) = buildGridArray( $jobNameT, $bgnJob, $endJob, getGlobal( "gridEngineArrayOption" ), $thr ); my $outputOption = buildOutputOption($path, $script);