Commit c870b40a authored by ofgeorg's avatar ofgeorg

Updated the header in all files to the new group name and included all authors

changed filenames/subroutine names in the libcma folder
parent 9b419162
......@@ -92,7 +92,7 @@
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
OutputDirectory="$(SolutionDir)$\(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
......
......@@ -61,7 +61,7 @@ Global
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.Debug Single Matlab|x64.ActiveCfg = Debug|x64
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.Debug|Win32.ActiveCfg = Debug|Win32
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.Debug|Win32.Build.0 = Debug|Win32
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.Debug|x64.ActiveCfg = Debug|Win32
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.Debug|x64.ActiveCfg = Debug|x64
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.DebugMPI|Win32.ActiveCfg = Debug|Win32
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.DebugMPI|Win32.Build.0 = Debug|Win32
{351C4CC9-FB03-4476-A1CD-56A7E0709A31}.DebugMPI|x64.ActiveCfg = Debug|Win32
......
......@@ -276,6 +276,31 @@
<Filter Name="BFGS">
<File RelativePath=".\bfgs\lbfgs_nocedal.f"/>
<File RelativePath=".\bfgs\lbfgsb_mod.f90"/></Filter>
<Filter Name="energy_landscapes">
<Filter Name="LJ">
<File RelativePath=".\energy_landscapes\LJ\lj.f">
<FileConfiguration Name="Debug Single Matlab|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="DebugMPI|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration></File>
<File RelativePath=".\energy_landscapes\LJ\LJ_COMP.f90"/>
<File RelativePath=".\energy_landscapes\LJ\LJ_POT.f90"/>
<File RelativePath=".\energy_landscapes\LJ\lj_writeout.f90"/></Filter>
<Filter Name="TIPnP">
<File RelativePath=".\energy_landscapes\TIPnP\tip.f">
<FileConfiguration Name="Debug Single Matlab|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration>
<FileConfiguration Name="DebugMPI|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration></File>
<File RelativePath=".\energy_landscapes\TIPnP\water_writeout.f90"/></Filter></Filter>
<Filter Name="libCMA">
<Filter Name="matlab">
<File RelativePath=".\libcma\matlab\cma2mat.f90">
......@@ -307,39 +332,38 @@
<File RelativePath=".\libcma\mpi\psoUpdate.f90">
<FileConfiguration Name="Debug Single Matlab|x64" ExcludedFromBuild="true"/>
<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true"/></File></Filter>
<File RelativePath=".\libcma\cmaes_checkparams.f90"/>
<File RelativePath=".\libcma\cmaes_freememory.f90"/>
<File RelativePath=".\libcma\cmaes_funcwrap.f90"/>
<File RelativePath=".\libcma\cmaes_handlebounds.f90"/>
<File RelativePath=".\libcma\cmaes_init.f90"/>
<File RelativePath=".\libcma\cmaes_initbounds.f90"/>
<File RelativePath=".\libcma\cmaes_initoutput.f90"/>
<File RelativePath=".\libcma\cmaes_mod.f90"/>
<File RelativePath=".\libcma\cmaes_myprctile.f90"/>
<File RelativePath=".\libcma\cmaes_opts_mod.f90"/>
<File RelativePath=".\libcma\cmaes_out_mod.f90"/>
<File RelativePath=".\libcma\cmaes_param_mod.f90"/>
<File RelativePath=".\libcma\cmaes_params.txt"/>
<File RelativePath=".\libcma\cmaes_readparams.f90"/>
<File RelativePath=".\libcma\cmaes_Startpoint.f90"/>
<File RelativePath=".\libcma\cmaesCheck.f90"/>
<File RelativePath=".\libcma\cmaesInit.f90"/>
<File RelativePath=".\libcma\cmaesOpts_mod.f90"/>
<File RelativePath=".\libcma\cmaesOut_mod.f90"/>
<File RelativePath=".\libcma\cmaesRun.f90"/>
<File RelativePath=".\libcma\cmaesRun_mod.f90"/>
<File RelativePath=".\libcma\cmaesStart.f90"/>
<File RelativePath=".\libcma\createR.f90"/>
<File RelativePath=".\libcma\createR_mod.f90"/>
<File RelativePath=".\libcma\eigenDecomp.f90"/>
<File RelativePath=".\libcma\eigenDecomp_mod.f90"/>
<File RelativePath=".\libcma\formatArrays.f90"/>
<File RelativePath=".\libcma\freeMemory.f90"/>
<File RelativePath=".\libcma\funcWrap.f90"/>
<File RelativePath=".\libcma\handleBounds.f90"/>
<File RelativePath=".\libcma\initBounds.f90"/>
<File RelativePath=".\libcma\initOutput.f90"/>
<File RelativePath=".\libcma\m_mrgrnk.f90"/>
<File RelativePath=".\libcma\main_cma.f90"/>
<File RelativePath=".\libcma\mindist2lines.f90"/>
<File RelativePath=".\libcma\cmaes_run.f90"/>
<File RelativePath=".\libcma\cmaes_run_mod.f90"/>
<File RelativePath=".\libcma\cmaes_start.f90"/>
<File RelativePath=".\libcma\cmaes_startpoint.f90"/>
<File RelativePath=".\libcma\cmaes_writegen.f90"/>
<File RelativePath=".\libcma\cmaes_xintobounds.f90"/>
<File RelativePath=".\libcma\cma.f90"/>
<File RelativePath=".\libcma\mpi_mod.f90"/>
<File RelativePath=".\libcma\myprctile.f90"/>
<File RelativePath=".\libcma\myrange.f90"/>
<File RelativePath=".\libcma\realtxt2Arr.f90"/>
<File RelativePath=".\libcma\symMatrix.f90"/>
<File RelativePath=".\libcma\symMatrix_mod.f90"/>
<File RelativePath=".\libcma\writeGen.f90"/>
<File RelativePath=".\libcma\xIntoBounds.f90"/></Filter>
<File RelativePath=".\libcma\tool_create_rotmat.f90"/>
<File RelativePath=".\libcma\tool_create_rotmat_mod.f90"/>
<File RelativePath=".\libcma\tool_eigendecomp.f90"/>
<File RelativePath=".\libcma\tool_eigendecomp_mod.f90"/>
<File RelativePath=".\libcma\tool_formatarrays.f90"/>
<File RelativePath=".\libcma\tool_mindist2lines.f90"/>
<File RelativePath=".\libcma\tool_mrgrnk_mod.f90"/>
<File RelativePath=".\libcma\tool_myrange.f90"/>
<File RelativePath=".\libcma\tool_realtxt2arr.f90"/>
<File RelativePath=".\libcma\tool_symmatrix.f90"/>
<File RelativePath=".\libcma\tool_symmatrix_mod.f90"/></Filter>
<Filter Name="libtestfcns">
<Filter Name="BOBB objects">
<File RelativePath=".\BBOB\x64\Debug\benchmarks.obj">
......@@ -368,22 +392,6 @@
<File RelativePath=".\libtestfcns\random_landscape.f90"/>
<File RelativePath=".\libtestfcns\testCEC2005.f90">
<FileConfiguration Name="Debug|x64" ExcludedFromBuild="true"/></File></Filter>
<Filter Name="Potential Energy Landscapes">
<Filter Name="LJ">
<File RelativePath=".\Potential_Energy_Landscapes\LJ\lj.f">
<FileConfiguration Name="Debug Single Matlab|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration></File>
<File RelativePath=".\Potential_Energy_Landscapes\LJ\LJ_COMP.f90"/>
<File RelativePath=".\Potential_Energy_Landscapes\LJ\LJ_POT.f90"/>
<File RelativePath=".\Potential_Energy_Landscapes\LJ\lj_writeout.f90"/></Filter>
<Filter Name="water">
<File RelativePath=".\Potential_Energy_Landscapes\Water\rigidfuncs.f">
<FileConfiguration Name="Debug Single Matlab|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration></File>
<File RelativePath=".\Potential_Energy_Landscapes\Water\tip.f">
<FileConfiguration Name="Debug Single Matlab|x64">
<Tool Name="VFFortranCompilerTool" FixedFormLineLength="fixedLength132"/></FileConfiguration></File>
<File RelativePath=".\Potential_Energy_Landscapes\Water\water_writeout.f90"/></Filter></Filter>
<Filter Name="Random Numbers">
<File RelativePath=".\libqrng\faure.f90"/>
<File RelativePath=".\libqrng\halton.f90"/>
......@@ -394,5 +402,5 @@
<File RelativePath=".\libqrng\randomGenerator.f"/>
<File RelativePath=".\libqrng\sobol.f90"/></Filter></Filter>
<File RelativePath=".\make_brutus.inc"/>
<File RelativePath=".\makefile.txt"/></Files>
<File RelativePath=".\makefile"/></Files>
<Globals/></VisualStudioProject>
......@@ -8,7 +8,7 @@ C
SUBROUTINE LBFGS(N,M,X,F,G,DIAGCO,DIAG,IPRINT,EPS,XTOL,W,IFLAG,
.DGUESS,STEPMAX)
C
USE cmaesOpts_mod
USE cmaes_opts_mod
INTEGER N,M,IPRINT(2),IFLAG
DOUBLE PRECISION X(N),G(N),DIAG(N),W(N*(2*M+1)+2*M)
......
......@@ -22,7 +22,7 @@
MODULE lbfgsb_mod
USE cmaes_param_mod
USE cmaesOpts_mod
USE cmaes_opts_mod
USE cmaes_mod
USE CEC2005
! USE deriv_class
......@@ -78,7 +78,7 @@
INTEGER :: iflag
REAL(MK),DIMENSION(n*(2*m+1)+2*m) :: W
INTEGER,DIMENSION(2) :: iprint
REAL(MK) :: funcWrap
REAL(MK) :: cmaes_funcwrap
!INTEGER,SAVE :: test = 0
REAL(MK) :: dguess
iprint = options%BFGS_print
......@@ -110,10 +110,10 @@
IF (options%Benchfctnr .EQ. 9) THEN
CALL F09_grad(g,x,n,n,options%LBounds,options%UBounds)!gradient
!CALL my_grad_approx(n,x,fcn,f,g1) !otherwise approximate the Gradient
f = funcWrap(x,n,fcn)
f = cmaes_funcwrap(x,n,fcn)
countBFGSEval = countBFGSEval + 1
ELSE
f = funcWrap(x,n,fcn)
f = cmaes_funcwrap(x,n,fcn)
countBFGSEval = countBFGSEval + 1
CALL my_grad_approx(n,x,fcn,f,g) !otherwise approximate the Gradient
......@@ -145,7 +145,7 @@
!local vars
REAL(MK) :: funcWrap
REAL(MK) :: cmaes_funcwrap
INTEGER :: i
REAL(MK) :: f_plus,f_minus
......@@ -154,10 +154,10 @@
DO i = 1, n
xtmp = x
xtmp(i) = xtmp(i) + options%BFGS_grad_stepsize/2
f_plus = funcWrap(xtmp,n,fcn)
f_plus = cmaes_funcwrap(xtmp,n,fcn)
countBFGSEval = countBFGSEval + 1
xtmp(i) = xtmp(i) - options%BFGS_grad_stepsize
f_minus = funcWrap(xtmp,n,fcn)
f_minus = cmaes_funcwrap(xtmp,n,fcn)
countBFGSEval = countBFGSEval + 1
g(i) = (f_plus - f_minus)/options%BFGS_grad_stepsize
END DO
......@@ -166,7 +166,7 @@
xtmp = x
xtmp(i) = xtmp(i) + options%BFGS_grad_stepsize
countBFGSEval = countBFGSEval + 1
f_plus = funcWrap(xtmp,n,fcn)
f_plus = cmaes_funcwrap(xtmp,n,fcn)
countBFGSEval = countBFGSEval + 1
g(i) = (f_plus - f)/options%BFGS_grad_stepsize
END DO
......@@ -187,13 +187,13 @@
INTEGER :: n
REAL(MK),DIMENSION(n) :: x
REAL(MK) :: f
REAL(MK) :: funcWrap
REAL(MK) :: cmaes_funcwrap
EXTERNAL :: fcn
f = funcWrap(x,n,fcn)
f = cmaes_funcwrap(x,n,fcn)
......
SUBROUTINE LJ_POT_COMP(res,vars,m,n,lbounds,ubounds)
USE cmaes_param_mod
USE cmaesOpts_mod
USE cmaes_opts_mod
!Parameters
REAL(MK), DIMENSION(n), INTENT(out) :: res
REAL(MK), DIMENSION(m,n),INTENT(in) :: vars
......
......@@ -11,9 +11,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner, Christian L. Mueller
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck, Christian L. Mueller
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
PROGRAM cma
......
......@@ -12,16 +12,17 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_checkparams()
!-------------------------------------------------------------------------
! Modules
!-------------------------------------------------------------------------
USE cmaes_mod
USE cmaesOpts_mod
USE cmaes_opts_mod
IMPLICIT NONE
!-------------------------------------------------------------------------
! Local Variables
......
......@@ -11,9 +11,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_freememory()
!-------------------------------------------------------------------------
......
......@@ -19,9 +19,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
#ifdef __SP
REAL FUNCTION cmaes_funcwrap(x,N,fitfun)
......
......@@ -27,9 +27,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_handlebounds(arxvalid,arx,m,n)
!-------------------------------------------------------------------------
......
......@@ -11,9 +11,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_init
!-------------------------------------------------------------------------
......@@ -21,7 +22,7 @@
!-------------------------------------------------------------------------
USE cmaes_param_mod
USE cmaes_mod
USE cmaesOpts_mod
USE cmaes_opts_mod
IMPLICIT NONE
!-------------------------------------------------------------------------
! Local variables
......@@ -92,7 +93,7 @@
weights(i) = log(REAL(mu)+1.)-log(REAL(i))
END DO
ELSE
STOP 'RecombinationWeights not set correctly (see cmaesOpts_mod)'
STOP 'RecombinationWeights not set correctly (see cmaes_opts_mod)'
END IF
! mueff
......
......@@ -15,9 +15,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_initbounds()
!-------------------------------------------------------------------------
......
......@@ -12,9 +12,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_initoutput(fitfun)
USE cmaes_param_mod
......
......@@ -12,13 +12,14 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
MODULE cmaes_mod
USE cmaes_param_mod
USE eigenDecomp_mod
USE tool_eigendecomp_mod
IMPLICIT NONE
SAVE
......@@ -135,7 +136,7 @@
! Module Procedures
!-----------------------------------------------------------------------
! CONTAINS
!#include "xIntoBounds.f90"
!#include "cmaes_xintobounds.f90"
END MODULE cmaes_mod
\ No newline at end of file
......@@ -21,9 +21,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_myprctile(inar, N, perc, rN, res)
USE cmaes_param_mod
......
......@@ -18,9 +18,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
MODULE cmaes_opts_mod
USE cmaes_param_mod
......
......@@ -12,9 +12,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
MODULE cmaes_out_mod
USE cmaes_param_mod
......
......@@ -12,9 +12,10 @@
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
MODULE cmaes_param_mod
IMPLICIT NONE
......
......@@ -13,7 +13,7 @@
!-------------------------------------------------------------------------
SUBROUTINE cmaes_readparams(ctrlfile, info)
USE cmaesOpts_mod
USE cmaes_opts_mod
USE CEC2005
IMPLICIT NONE
#ifdef __HAVE_MPI__
......@@ -499,7 +499,7 @@
!-----------------------------------------------------------------------------
! Set the inital Starting Point
!-----------------------------------------------------------------------------
CALL cmaes_Startpoint()
CALL cmaes_startpoint()
......
......@@ -16,9 +16,10 @@
! Revisions :
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
! Covariance Matrix Adaption Library (LIBCMA)
! Benedikt Baumgartner
! Computational Biophysics Lab, ETH Zurich, Switzerland
! pCMALib: a parallel fortran 90 library for the evolution strategy with
! covariance matrix adaptation
! Christian L. Mueller, Benedikt Baumgartner, Georg Ofenbeck
! MOSAIC group, ETH Zurich, Switzerland
!-------------------------------------------------------------------------
SUBROUTINE cmaes_run(fitfun)
!-------------------------------------------------------------------------
......@@ -36,7 +37,7 @@
! Interfaces
!-------------------------------------------------------------------------
INTERFACE
SUBROUTINE xIntoBounds(LBounds,UBounds,N,x,xout,idx)
SUBROUTINE cmaes_xintobounds(LBounds,UBounds,N,x,xout,idx)
USE cmaes_param_mod
USE cmaes_mod,only:countOutOfBounds
IMPLICIT NONE
......@@ -58,8 +59,8 @@
!-------------------------------------------------------------------------
REAL(MK) :: ZBQLNOR !RNG
!REAL(MK) :: ZBQLU01
REAL(MK) :: funcWrap
REAL(MK) :: myrange
REAL(MK) :: cmaes_funcwrap
REAL(MK) :: tool_myrange
!-------------------------------------------------------------------------
! Local Variables
!-------------------------------------------------------------------------
......@@ -352,9 +353,9 @@
!-------------------------------------------------------------------------
IF(options%flgGenData) THEN
#ifdef __HAVE_MPI__
CALL writeGen(arx,arxvalid,GLOBAL_X_BEST,input%N,lambda,uNum)
CALL cmaes_writegen(arx,arxvalid,GLOBAL_X_BEST,input%N,lambda,uNum)
#else
CALL writeGen(arx,arxvalid,input%N,lambda,uNum)
CALL cmaes_writegen(arx,arxvalid,input%N,lambda,uNum)
#endif
END IF
......@@ -447,7 +448,7 @@
! Check if sample point is valid (within given bounds)
!-------------------------------------------------------------------
IF(bnd%isactive) THEN
CALL xIntoBounds(options%LBounds,options%UBounds,&
CALL cmaes_xintobounds(options%LBounds,options%UBounds,&
input%N,arx(:,k),arxvalid(:,k))
ELSE
arxvalid(:,k) = arx(:,k)
......@@ -472,7 +473,7 @@
!-------------------------------------------------------------------
! Otherwise Evaluate function at valid sample point
!-------------------------------------------------------------------
fitness%raw(k) = funcWrap(arxvalid(:,k),input%N,fitfun)
fitness%raw(k) = cmaes_funcwrap(arxvalid(:,k),input%N,fitfun)
END IF
tries = tries + 1
!WRITE(*,*) 'fitness%raw: ', fitness%raw(k)
......@@ -585,7 +586,7 @@
!------------------------------------------------------------------------
! Handle boundaries
!------------------------------------------------------------------------
IF(bnd%isactive) CALL handleBounds(arxvalid,arx,input%N,lambda)
IF(bnd%isactive) CALL cmaes_handlebounds(arxvalid,arx,input%N,lambda)
!-------------------------------------------------------------------------
! Sort by fitness (idx/idxsel being indices indicating orig. positions)
......@@ -789,7 +790,7 @@
!-----------------------------------------------------------------------
! Enforce symmetry
!-----------------------------------------------------------------------
CALL symMatrix(C,input%N,triuC)
CALL tool_symmatrix(C,input%N,triuC)
......@@ -797,9 +798,9 @@
! Eigen decomposition, D=diagonal matrix of eigenvalues,
! B=normalized eigenvectors
!-----------------------------------------------------------------------
CALL eigenDecomp(triuC,input%N,D,B,info)
CALL tool_eigendecomp(triuC,input%N,D,B,info)
!if eigenDecomp returned Error go to the Restart Loop
!if tool_eigendecomp returned Error go to the Restart Loop
IF (info .NE. 0) THEN
stopflag = 'DeComp Error'
!STOP
......@@ -976,7 +977,7 @@
!-------------------------------------------------------------------------
! Adjust step size in case of equal function values
!-------------------------------------------------------------------------
temp = myrange(fitness%hist,size(fitness%hist),fitness%sel(1),1,posInf)
temp = tool_myrange(fitness%hist,size(fitness%hist),fitness%sel(1),1,posInf)
IF((countIter - lastRestart .GT. 2) .AND. (temp .EQ. 0.)) THEN
IF(options%stopOnWarnings) THEN
stopflag = 'warnequalfunvalhist'
......@@ -1042,13 +1043,13 @@
IF(any(sigma*sqrt(diag) .GT. options%StopTolUpX)) stopflag = 'tolupx'
IF((countIter-lastRestart .GT. 2) .AND. &
(myrange(fitness%sel,size(fitness%sel),fitness%hist,&
(tool_myrange(fitness%sel,size(fitness%sel),fitness%hist,&
size(fitness%hist),posInf) .LE. options%StopTolFun)) &
stopflag = 'tolfun'
IF((countIter-lastRestart .GE. size(fitness%hist)) .AND. &
(myrange(fitness%hist,size(fitness%hist),posInf_array,1,posInf) &
(tool_myrange(fitness%hist,size(fitness%hist),posInf_array,1,posInf) &
.LE. options%StopTolHistFun)) THEN
stopflag = 'tolhistfun'
END IF
......@@ -1073,9 +1074,9 @@
!-------------------------------------------------------------------------
IF(options%flgGenData .AND. (mod(countIter,options%intGenData)) .EQ. 0) THEN
#ifdef __HAVE_MPI__
CALL writeGen(arx,arxvalid,GLOBAL_X_BEST,input%N,lambda,uNum)
CALL cmaes_writegen(arx,arxvalid,GLOBAL_X_BEST,input%N,lambda,uNum)
#else
CALL writeGen(arx,arxvalid,input%N,lambda,uNum)
CALL cmaes_writegen(arx,arxvalid,input%N,lambda,uNum)
#endif
END IF
......@@ -1181,7 +1182,7 @@
IF(stop_me) THEN
! Close MATLAB engine if used
IF (options%matlab_func) THEN
temp=funcWrap(arxvalid(:,1),-1,fitfun)
temp=cmaes_funcwrap(arxvalid(:,1),-1,fitfun)
ENDIF
EXIT genLoop
ENDIF
......@@ -1303,7 +1304,7 @@
IF(MY_RANK .EQ. 0) THEN
#endif