Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
science/openmx: Re-add port: Nanoscale material simulations using den…
…sity functional theories (DFT) It isn't unfetchable.
- Loading branch information
Showing
16 changed files
with
604 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# $FreeBSD$ | ||
|
||
PORTNAME= openmx | ||
DISTVERSION= 3.8.5 # the 18June12 patch upgrades 3.8 -> 3.8.5 | ||
PORTREVISION= 7 | ||
CATEGORIES= science | ||
MASTER_SITES= http://www.openmx-square.org/ \ | ||
http://www.openmx-square.org/bugfixed/18June12/:patch | ||
DISTFILES= ${PORTNAME}${DISTVERSION:R}${EXTRACT_SUFX} \ | ||
patch${DISTVERSION}${EXTRACT_SUFX}:patch # this patch isn't a patch, but a set of file updates | ||
DIST_SUBDIR= ${PORTNAME} | ||
EXTRACT_ONLY= ${PORTNAME}${DISTVERSION:R}${EXTRACT_SUFX} | ||
|
||
MAINTAINER= yuri@FreeBSD.org | ||
COMMENT= Nanoscale material simulations using density functional theories (DFT) | ||
|
||
LICENSE= GPLv2 | ||
|
||
BROKEN_i386= undefined reference to `__atomic_load', see bug#229605 and https://reviews.llvm.org/D42154 | ||
LIB_DEPENDS= libblas.so:math/blas \ | ||
libfftw3.so:math/fftw3 \ | ||
liblapack.so:math/lapack \ | ||
libmpich.so:net/mpich | ||
USES= dos2unix fortran gmake localbase:ldflags | ||
USE_CXXSTD= c++11 | ||
DOS2UNIX_FILES= openmx_common.h | ||
MAKEFILE= makefile | ||
WRKSRC= ${WRKDIR}/${PORTNAME}${DISTVERSION:R} | ||
CFLAGS+= -Dkcomp -fcommon | ||
LDFLAGS+= ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so ${LOCALBASE}/lib/libmpifort.so | ||
FFLAGS+= -fallow-argument-mismatch | ||
WRKSRC_SUBDIR= source | ||
MAKE_ENV= MPICH_CC=${CC} | ||
MAKE_ARGS+= CFLAGS="${CFLAGS}" FFLAGS="${FFLAGS}" LDFLAGS="${LDFLAGS}" GCC_LIB=${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgfortran.so | ||
BINARY_ALIAS= gcc=${CXX} gcc7=${CXX} | ||
UTIL_PROGS= DosMain jx analysis_example esp polB bandgnu13 bin2txt cube2xsf intensity_map md2axsf | ||
PLIST_FILES= bin/${PORTNAME} ${UTIL_PROGS:C/^/bin\//} | ||
OPTIONS_DEFINE_amd64= SIMD | ||
OPTIONS_DEFINE_i386= SIMD | ||
OPTIONS_DEFAULT_amd64= SIMD | ||
OPTIONS_DEFAULT_i386= SIMD | ||
SIMD_CFLAGS= -msse -msse2 -mfpmath=sse | ||
SIMD_CFLAGS_OFF= -Dnosse | ||
CFLAGS+= ${ARCH:S/amd64//:S/i386//:S/${ARCH}/-Dnosse/} | ||
pre-patch: # overlay files before patching | ||
@cd ${WRKSRC} && ${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/patch${DISTVERSION}${EXTRACT_SUFX} | ||
post-patch: | ||
@cd ${WRKSRC} && ${REINPLACE_CMD} 's|DFT_DATA_PATH|"${DATADIR}/DFT_DATA13"|' Input_std.c check_lead.c SetPara_DFT.c OutData.c OutData_Binary.c | ||
post-install: | ||
.for u in ${UTIL_PROGS} | ||
${INSTALL_PROGRAM} ${WRKSRC}/${u} ${STAGEDIR}${PREFIX}/bin | ||
.endfor | ||
cd ${WRKSRC}/.. && ${COPYTREE_SHARE} DFT_DATA13 ${STAGEDIR}${DATADIR} | ||
# autoplist for potentials: about 500 files in DATADIR | ||
@cd ${STAGEDIR}${PREFIX} && \ | ||
${FIND} ${DATADIR:S/^${PREFIX}\///} -type f >> ${TMPPLIST} | ||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
TIMESTAMP = 1536713126 | ||
SHA256 (openmx/openmx3.8.tar.gz) = 36ee10d8b1587b25a2ca1d57f110111be65c4fb4dc820e6d93e1ed2b562634a1 | ||
SIZE (openmx/openmx3.8.tar.gz) = 143086177 | ||
SHA256 (openmx/patch3.8.5.tar.gz) = d0fea2ce956d796a87a4bc9e9d580fb115ff2a22764650fffa78bb79a1b30468 | ||
SIZE (openmx/patch3.8.5.tar.gz) = 316333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- Band_DFT_Col.c.orig 2018-08-29 06:24:38 UTC | ||
+++ Band_DFT_Col.c | ||
@@ -483,9 +483,9 @@ double Band_DFT_Col(int SCF_iter, | ||
|
||
/* allocation */ | ||
|
||
- stat_send = malloc(sizeof(MPI_Status)*numprocs2); | ||
- request_send = malloc(sizeof(MPI_Request)*numprocs2); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs2); | ||
+ stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs2); | ||
+ request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs2); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs2); | ||
|
||
is1 = (int*)malloc(sizeof(int)*numprocs2); | ||
ie1 = (int*)malloc(sizeof(int)*numprocs2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- Band_DFT_NonCol.c.orig 2018-08-29 06:26:10 UTC | ||
+++ Band_DFT_NonCol.c | ||
@@ -554,9 +554,9 @@ double Band_DFT_NonCol(int SCF_iter, | ||
|
||
/* allocation */ | ||
|
||
- stat_send = malloc(sizeof(MPI_Status)*numprocs1); | ||
- request_send = malloc(sizeof(MPI_Request)*numprocs1); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs1); | ||
+ stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs1); | ||
+ request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs1); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs1); | ||
|
||
is1 = (int*)malloc(sizeof(int)*numprocs1); | ||
ie1 = (int*)malloc(sizeof(int)*numprocs1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- Cluster_DFT.c.orig 2018-08-29 06:05:22 UTC | ||
+++ Cluster_DFT.c | ||
@@ -194,9 +194,9 @@ static double Cluster_collinear( | ||
|
||
Num_Comm_World1 = SpinP_switch + 1; | ||
|
||
- stat_send = malloc(sizeof(MPI_Status)*numprocs0); | ||
- request_send = malloc(sizeof(MPI_Request)*numprocs0); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs0); | ||
+ stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs0); | ||
+ request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs0); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs0); | ||
|
||
/*********************************************** | ||
allocation of arrays for the first world | ||
@@ -1541,9 +1541,9 @@ static double Cluster_non_collinear( | ||
/* allocation of arrays */ | ||
|
||
- stat_send = malloc(sizeof(MPI_Status)*numprocs); | ||
- request_send = malloc(sizeof(MPI_Request)*numprocs); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs); | ||
+ stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs); | ||
+ request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs); | ||
|
||
/**************************************************** | ||
calculation of the array size | ||
@@ -2649,7 +2649,7 @@ void Save_DOS_Col(int n, int MaxN, int * | ||
MPI_Comm_size(mpi_comm_level1,&numprocs); | ||
MPI_Comm_rank(mpi_comm_level1,&myid); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs); | ||
/* open file pointers */ | ||
|
||
@@ -2901,7 +2901,7 @@ void Save_DOS_NonCol(int n, int MaxN, in | ||
MPI_Comm_size(mpi_comm_level1,&numprocs); | ||
MPI_Comm_rank(mpi_comm_level1,&myid); | ||
|
||
- request_recv = malloc(sizeof(MPI_Request)*numprocs); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs); | ||
|
||
/* open file pointers */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- Cluster_DFT_ON2.c.orig 2016-03-27 06:53:28 UTC | ||
+++ Cluster_DFT_ON2.c | ||
@@ -10,6 +10,7 @@ | ||
|
||
***********************************************************************/ | ||
|
||
+#include <complex.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
@@ -1275,9 +1276,9 @@ static void OND_Solver( | ||
MPI_Request *request_send; | ||
MPI_Request *request_recv; | ||
|
||
- stat_send = malloc(sizeof(MPI_Status)*numprocs2); | ||
- request_send = malloc(sizeof(MPI_Request)*numprocs2); | ||
- request_recv = malloc(sizeof(MPI_Request)*numprocs2); | ||
+ stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs2); | ||
+ request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs2); | ||
+ request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs2); | ||
|
||
al.r = 1.0; | ||
al.i = 0.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- Input_std.c.orig 2018-09-12 02:18:32 UTC | ||
+++ Input_std.c | ||
@@ -85,7 +85,7 @@ void Input_std(char *file) | ||
|
||
input_string("System.CurrrentDirectory",filepath,"./"); | ||
input_string("System.Name",filename,"default"); | ||
- input_string("DATA.PATH",DFT_DATA_PATH,"../DFT_DATA13"); | ||
+ //input_string("DATA.PATH",DFT_DATA_PATH,"../DFT_DATA13"); | ||
input_int("level.of.stdout", &level_stdout,1); | ||
input_int("level.of.fileout",&level_fileout,1); | ||
input_logical("memory.usage.fileout",&memoryusage_fileout,0); /* default=off */ |
Oops, something went wrong.