From c870b40aa231c947fd1e48f7494f1d0cd98a429b Mon Sep 17 00:00:00 2001 From: ofgeorg Date: Thu, 26 Nov 2009 09:20:12 +0000 Subject: [PATCH] Updated the header in all files to the new group name and included all authors changed filenames/subroutine names in the libcma folder --- BBOB/BBOB.vcproj | 2 +- Libpcma.sln | 2 +- Libpcma.vfproj | 100 ++++++++++++++++-------------- bfgs/lbfgs_nocedal.f | 2 +- bfgs/lbfgsb_mod.f90 | 20 +++--- energy_landscapes/LJ/LJ_COMP.f90 | 2 +- libcma/cma.f90 | 7 ++- libcma/cmaes_checkparams.f90 | 9 +-- libcma/cmaes_freememory.f90 | 7 ++- libcma/cmaes_funcwrap.f90 | 7 ++- libcma/cmaes_handlebounds.f90 | 7 ++- libcma/cmaes_init.f90 | 11 ++-- libcma/cmaes_initbounds.f90 | 7 ++- libcma/cmaes_initoutput.f90 | 7 ++- libcma/cmaes_mod.f90 | 11 ++-- libcma/cmaes_myprctile.f90 | 7 ++- libcma/cmaes_opts_mod.f90 | 7 ++- libcma/cmaes_out_mod.f90 | 7 ++- libcma/cmaes_param_mod.f90 | 7 ++- libcma/cmaes_readparams.f90 | 4 +- libcma/cmaes_run.f90 | 43 ++++++------- libcma/cmaes_run_mod.f90 | 15 ++--- libcma/cmaes_start.f90 | 13 ++-- libcma/cmaes_startpoint.f90 | 8 +-- libcma/cmaes_writegen.f90 | 7 ++- libcma/cmaes_xintobounds.f90 | 7 ++- libcma/tool_create_rotmat.f90 | 7 ++- libcma/tool_create_rotmat_mod.f90 | 7 ++- libcma/tool_eigendecomp.f90 | 7 ++- libcma/tool_eigendecomp_mod.f90 | 7 ++- libcma/tool_formatarrays.f90 | 7 ++- libcma/tool_mindist2lines.f90 | 7 ++- libcma/tool_myrange.f90 | 7 ++- libcma/tool_realtxt2arr.f90 | 7 ++- libcma/tool_symmatrix.f90 | 7 ++- libcma/tool_symmatrix_mod.f90 | 7 ++- libqrng/qr_gen_mod.f90 | 2 +- libtestfcns/CEC2005.f90 | 2 +- libtestfcns/DoubleFunnel.f90 | 2 +- libtestfcns/benchmark_bobb.f90 | 2 +- libtestfcns/random_landscape.f90 | 2 +- 41 files changed, 221 insertions(+), 185 deletions(-) diff --git a/BBOB/BBOB.vcproj b/BBOB/BBOB.vcproj index a49df81..0355e2e 100644 --- a/BBOB/BBOB.vcproj +++ b/BBOB/BBOB.vcproj @@ -92,7 +92,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -307,39 +332,38 @@ + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + @@ -368,22 +392,6 @@ - - - - - - - - - - - - - - - - @@ -394,5 +402,5 @@ - + diff --git a/bfgs/lbfgs_nocedal.f b/bfgs/lbfgs_nocedal.f index 8c0380f..0298fc3 100644 --- a/bfgs/lbfgs_nocedal.f +++ b/bfgs/lbfgs_nocedal.f @@ -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) diff --git a/bfgs/lbfgsb_mod.f90 b/bfgs/lbfgsb_mod.f90 index 591752a..bd324f2 100644 --- a/bfgs/lbfgsb_mod.f90 +++ b/bfgs/lbfgsb_mod.f90 @@ -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) diff --git a/energy_landscapes/LJ/LJ_COMP.f90 b/energy_landscapes/LJ/LJ_COMP.f90 index 3dd01b5..5f0ee8f 100644 --- a/energy_landscapes/LJ/LJ_COMP.f90 +++ b/energy_landscapes/LJ/LJ_COMP.f90 @@ -1,6 +1,6 @@ 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 diff --git a/libcma/cma.f90 b/libcma/cma.f90 index a4f9873..753efc0 100644 --- a/libcma/cma.f90 +++ b/libcma/cma.f90 @@ -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 diff --git a/libcma/cmaes_checkparams.f90 b/libcma/cmaes_checkparams.f90 index 61d15ea..4c44ce1 100644 --- a/libcma/cmaes_checkparams.f90 +++ b/libcma/cmaes_checkparams.f90 @@ -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 diff --git a/libcma/cmaes_freememory.f90 b/libcma/cmaes_freememory.f90 index 6710bb2..4304b2f 100644 --- a/libcma/cmaes_freememory.f90 +++ b/libcma/cmaes_freememory.f90 @@ -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() !------------------------------------------------------------------------- diff --git a/libcma/cmaes_funcwrap.f90 b/libcma/cmaes_funcwrap.f90 index 171d93f..4c21b8d 100644 --- a/libcma/cmaes_funcwrap.f90 +++ b/libcma/cmaes_funcwrap.f90 @@ -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) diff --git a/libcma/cmaes_handlebounds.f90 b/libcma/cmaes_handlebounds.f90 index d2efff6..0d84b3c 100644 --- a/libcma/cmaes_handlebounds.f90 +++ b/libcma/cmaes_handlebounds.f90 @@ -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) !------------------------------------------------------------------------- diff --git a/libcma/cmaes_init.f90 b/libcma/cmaes_init.f90 index e985775..f804086 100644 --- a/libcma/cmaes_init.f90 +++ b/libcma/cmaes_init.f90 @@ -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 diff --git a/libcma/cmaes_initbounds.f90 b/libcma/cmaes_initbounds.f90 index 0368d35..6dd8811 100644 --- a/libcma/cmaes_initbounds.f90 +++ b/libcma/cmaes_initbounds.f90 @@ -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() !------------------------------------------------------------------------- diff --git a/libcma/cmaes_initoutput.f90 b/libcma/cmaes_initoutput.f90 index bceaee0..810bd9a 100644 --- a/libcma/cmaes_initoutput.f90 +++ b/libcma/cmaes_initoutput.f90 @@ -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 diff --git a/libcma/cmaes_mod.f90 b/libcma/cmaes_mod.f90 index f3f520b..c980b71 100644 --- a/libcma/cmaes_mod.f90 +++ b/libcma/cmaes_mod.f90 @@ -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 diff --git a/libcma/cmaes_myprctile.f90 b/libcma/cmaes_myprctile.f90 index 8e38b94..97e392a 100644 --- a/libcma/cmaes_myprctile.f90 +++ b/libcma/cmaes_myprctile.f90 @@ -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 diff --git a/libcma/cmaes_opts_mod.f90 b/libcma/cmaes_opts_mod.f90 index 6c59983..95aac60 100644 --- a/libcma/cmaes_opts_mod.f90 +++ b/libcma/cmaes_opts_mod.f90 @@ -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 diff --git a/libcma/cmaes_out_mod.f90 b/libcma/cmaes_out_mod.f90 index 16ebf1c..0ea6240 100644 --- a/libcma/cmaes_out_mod.f90 +++ b/libcma/cmaes_out_mod.f90 @@ -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 diff --git a/libcma/cmaes_param_mod.f90 b/libcma/cmaes_param_mod.f90 index 5864bfe..8fcaabb 100644 --- a/libcma/cmaes_param_mod.f90 +++ b/libcma/cmaes_param_mod.f90 @@ -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 diff --git a/libcma/cmaes_readparams.f90 b/libcma/cmaes_readparams.f90 index dd674ba..45d3a45 100644 --- a/libcma/cmaes_readparams.f90 +++ b/libcma/cmaes_readparams.f90 @@ -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() diff --git a/libcma/cmaes_run.f90 b/libcma/cmaes_run.f90 index edc6485..8de7de5 100644 --- a/libcma/cmaes_run.f90 +++ b/libcma/cmaes_run.f90 @@ -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 - CALL formatArrays(outFormat,1) + CALL tool_formatarrays(outFormat,1) WRITE(*,*) WRITE(*,*) 'GLOBAL Bestever.f:',bestever%f !GLOBAL_F_BEST(1) WRITE(*,*) 'GLOBAL Bestever.x:' diff --git a/libcma/cmaes_run_mod.f90 b/libcma/cmaes_run_mod.f90 index 7398274..737fb0f 100644 --- a/libcma/cmaes_run_mod.f90 +++ b/libcma/cmaes_run_mod.f90 @@ -11,17 +11,18 @@ ! 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_run_mod USE cmaes_param_mod USE cmaes_opts_mod USE cmaes_mod USE cmaes_out_mod - USE m_mrgrnk - USE symMatrix_mod + USE tool_mrgrnk_mod + USE tool_symmatrix_mod USE mpi_mod #ifdef __HAVE_MPI__ USE pso_mod @@ -33,7 +34,7 @@ ! Module Procedures !------------------------------------------------------------------------- CONTAINS -#include "handleBounds.f90" -#include "writeGen.f90" +#include "cmaes_handlebounds.f90" +#include "cmaes_writegen.f90" END MODULE cmaes_run_mod \ No newline at end of file diff --git a/libcma/cmaes_start.f90 b/libcma/cmaes_start.f90 index b4351d9..bccbc31 100644 --- a/libcma/cmaes_start.f90 +++ b/libcma/cmaes_start.f90 @@ -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_start(fitfun,xstart,insigma,varargin) !------------------------------------------------------------------------- @@ -98,7 +99,7 @@ !------------------------------------------------------------------------- ! Initialize Boundary Handling !------------------------------------------------------------------------- - CALL initBounds() + CALL cmaes_initbounds() !------------------------------------------------------------------------- ! Check CMA consistency @@ -108,7 +109,7 @@ !------------------------------------------------------------------------- ! Initialize output and logging variables !------------------------------------------------------------------------- - CALL initOutput(fitfun) + CALL cmaes_initoutput(fitfun) !------------------------------------------------------------------------- ! Start CMA run @@ -126,7 +127,7 @@ !------------------------------------------------------------------------- ! Free Memory !------------------------------------------------------------------------- - CALL freeMemory() + CALL cmaes_freememory() !------------------------------------------------------------------------- ! free CEC2005 resources if benchmark is used diff --git a/libcma/cmaes_startpoint.f90 b/libcma/cmaes_startpoint.f90 index ed5329f..f8e2840 100644 --- a/libcma/cmaes_startpoint.f90 +++ b/libcma/cmaes_startpoint.f90 @@ -13,10 +13,10 @@ SUBROUTINE cmaes_startpoint(new_start) - USE cmaesOpts_mod + USE cmaes_opts_mod USE cmaes_mod USE cmaes_param_mod - USE cmaesOut_mod + USE cmaes_out_mod #ifdef __HAVE_MPI__ INCLUDE "mpif.h" #endif @@ -113,8 +113,8 @@ DO i = 1,input%N input%insigma(i) = options%insigma(i) END DO - CALL cmaesInit() - CALL initBounds() + CALL cmaes_init() + CALL cmaes_initbounds() ELSE initial_Popsize = 0 END IF diff --git a/libcma/cmaes_writegen.f90 b/libcma/cmaes_writegen.f90 index b5db508..a53f676 100644 --- a/libcma/cmaes_writegen.f90 +++ b/libcma/cmaes_writegen.f90 @@ -13,9 +13,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 __HAVE_MPI__ SUBROUTINE cmaes_writegen(arx,arxvalid,GLOBAL_X_BEST,m,n,unit) diff --git a/libcma/cmaes_xintobounds.f90 b/libcma/cmaes_xintobounds.f90 index 682cc1b..ccd51e4 100644 --- a/libcma/cmaes_xintobounds.f90 +++ b/libcma/cmaes_xintobounds.f90 @@ -22,9 +22,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_xintobounds(LBounds,UBounds,N,x,xout,idx) !------------------------------------------------------------------------- diff --git a/libcma/tool_create_rotmat.f90 b/libcma/tool_create_rotmat.f90 index f447779..7d7c295 100644 --- a/libcma/tool_create_rotmat.f90 +++ b/libcma/tool_create_rotmat.f90 @@ -20,9 +20,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 !------------------------------------------------------------------------- #if(__KIND == __SINGLE_PRECISION) SUBROUTINE tool_create_rotmat_s(S,T,N,R) diff --git a/libcma/tool_create_rotmat_mod.f90 b/libcma/tool_create_rotmat_mod.f90 index 096b877..37b39bd 100644 --- a/libcma/tool_create_rotmat_mod.f90 +++ b/libcma/tool_create_rotmat_mod.f90 @@ -13,9 +13,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 tool_create_rotmat_mod diff --git a/libcma/tool_eigendecomp.f90 b/libcma/tool_eigendecomp.f90 index 1d4bdfd..1b932c7 100644 --- a/libcma/tool_eigendecomp.f90 +++ b/libcma/tool_eigendecomp.f90 @@ -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 !------------------------------------------------------------------------- #if(__KIND == __SINGLE_PRECISION) SUBROUTINE tool_eigendecomp_s(A,n,eVals,eVecs,info) diff --git a/libcma/tool_eigendecomp_mod.f90 b/libcma/tool_eigendecomp_mod.f90 index 1fd994e..41152d0 100644 --- a/libcma/tool_eigendecomp_mod.f90 +++ b/libcma/tool_eigendecomp_mod.f90 @@ -13,9 +13,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 tool_eigendecomp_mod diff --git a/libcma/tool_formatarrays.f90 b/libcma/tool_formatarrays.f90 index 79d962b..9bf6359 100644 --- a/libcma/tool_formatarrays.f90 +++ b/libcma/tool_formatarrays.f90 @@ -17,9 +17,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 tool_formatarrays(form,D) IMPLICIT NONE diff --git a/libcma/tool_mindist2lines.f90 b/libcma/tool_mindist2lines.f90 index ae8fbd3..ff83a69 100644 --- a/libcma/tool_mindist2lines.f90 +++ b/libcma/tool_mindist2lines.f90 @@ -30,9 +30,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 tool_mindist2lines(N,X0,X,Y0,Y,DIST,XMIN,YMIN) !------------------------------------------------------------------------- diff --git a/libcma/tool_myrange.f90 b/libcma/tool_myrange.f90 index f696242..c7f122f 100644 --- a/libcma/tool_myrange.f90 +++ b/libcma/tool_myrange.f90 @@ -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 !------------------------------------------------------------------------- REAL(MK) FUNCTION tool_myrange(x,n,y,m,exc) USE cmaes_param_mod diff --git a/libcma/tool_realtxt2arr.f90 b/libcma/tool_realtxt2arr.f90 index fb139a6..991b175 100644 --- a/libcma/tool_realtxt2arr.f90 +++ b/libcma/tool_realtxt2arr.f90 @@ -20,9 +20,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 tool_realtxt2arr(filename,N,M,arr) USE cmaes_param_mod diff --git a/libcma/tool_symmatrix.f90 b/libcma/tool_symmatrix.f90 index a554a3b..1177b83 100644 --- a/libcma/tool_symmatrix.f90 +++ b/libcma/tool_symmatrix.f90 @@ -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 !------------------------------------------------------------------------- #if(__KIND == __SINGLE_PRECISION) SUBROUTINE tool_symmatrix_s(C,n,triuC) diff --git a/libcma/tool_symmatrix_mod.f90 b/libcma/tool_symmatrix_mod.f90 index 849d574..fe453cb 100644 --- a/libcma/tool_symmatrix_mod.f90 +++ b/libcma/tool_symmatrix_mod.f90 @@ -13,9 +13,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 tool_symmatrix_mod diff --git a/libqrng/qr_gen_mod.f90 b/libqrng/qr_gen_mod.f90 index 659e118..54243c5 100644 --- a/libqrng/qr_gen_mod.f90 +++ b/libqrng/qr_gen_mod.f90 @@ -52,7 +52,7 @@ #ifdef __CMA USE cmaes_param_mod - USE cmaesOpts_mod + USE cmaes_opts_mod #endif IMPLICIT NONE diff --git a/libtestfcns/CEC2005.f90 b/libtestfcns/CEC2005.f90 index 908f0cf..3eec2df 100644 --- a/libtestfcns/CEC2005.f90 +++ b/libtestfcns/CEC2005.f90 @@ -210,7 +210,7 @@ #ifdef __CMA USE cmaes_param_mod - USE cmaesOpts_mod + USE cmaes_opts_mod #endif IMPLICIT none diff --git a/libtestfcns/DoubleFunnel.f90 b/libtestfcns/DoubleFunnel.f90 index 33f7a9a..b3dd98d 100644 --- a/libtestfcns/DoubleFunnel.f90 +++ b/libtestfcns/DoubleFunnel.f90 @@ -48,7 +48,7 @@ #ifdef __CMA USE cmaes_param_mod - USE cmaesOpts_mod + USE cmaes_opts_mod #endif diff --git a/libtestfcns/benchmark_bobb.f90 b/libtestfcns/benchmark_bobb.f90 index 7f9aff6..272dbf9 100644 --- a/libtestfcns/benchmark_bobb.f90 +++ b/libtestfcns/benchmark_bobb.f90 @@ -16,7 +16,7 @@ #ifdef __CMA USE cmaes_param_mod - USE cmaesOpts_mod + USE cmaes_opts_mod #endif IMPLICIT NONE diff --git a/libtestfcns/random_landscape.f90 b/libtestfcns/random_landscape.f90 index bce9924..2dc3dfe 100644 --- a/libtestfcns/random_landscape.f90 +++ b/libtestfcns/random_landscape.f90 @@ -27,7 +27,7 @@ #ifdef __CMA USE cmaes_param_mod - USE cmaesOpts_mod + USE cmaes_opts_mod #endif -- GitLab