[Avida-SVN] r2825 - in branches/hjg-dev: . source/actions

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Thu Oct 9 12:00:09 PDT 2008


Author: hjg
Date: 2008-10-09 15:00:09 -0400 (Thu, 09 Oct 2008)
New Revision: 2825

Modified:
   branches/hjg-dev/CMakeLists.txt
   branches/hjg-dev/source/actions/EnvironmentActions.cc
Log:
fixes for running on hpc

Modified: branches/hjg-dev/CMakeLists.txt
===================================================================
--- branches/hjg-dev/CMakeLists.txt	2008-10-09 18:56:00 UTC (rev 2824)
+++ branches/hjg-dev/CMakeLists.txt	2008-10-09 19:00:09 UTC (rev 2825)
@@ -38,8 +38,8 @@
       SET(COMPILER_WARNING_FLAGS "")
       SET(COMPILER_OPTIMIZATION_FLAGS "")
     ELSE (CMAKE_CXX_COMPILER MATCHES ".*icpc.*")
-      SET(COMPILER_WARNING_FLAGS "-Wextra -Wno-unknown-pragmas -Wconversion -Wno-trigraphs")
-      SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing -ftree-vectorize -fvisibility-inlines-hidden")
+      SET(COMPILER_WARNING_FLAGS "-Wno-unknown-pragmas -Wconversion -Wno-trigraphs")
+      SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing")
     ENDIF (CMAKE_CXX_COMPILER MATCHES ".*icpc.*")
   ENDIF (CMAKE_CXX_COMPILER MATCHES ".*pathCC.*")
 

Modified: branches/hjg-dev/source/actions/EnvironmentActions.cc
===================================================================
--- branches/hjg-dev/source/actions/EnvironmentActions.cc	2008-10-09 18:56:00 UTC (rev 2824)
+++ branches/hjg-dev/source/actions/EnvironmentActions.cc	2008-10-09 19:00:09 UTC (rev 2825)
@@ -554,7 +554,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -1*(0.4*tanh((time-182500)/50000)+0.5)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -1*(0.4*tanh((double)(time-182500)/50000)+0.5)*(0.5*sin(time/58.091)+0.5)+1;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);
 		if (res != NULL)
 			m_world->GetPopulation().SetResource(res->GetID(), m_res_count);
@@ -582,7 +582,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -m_scale*(tanh((time-182500)/50000)+1)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -m_scale*(tanh((double)(time-182500)/50000)+1)*(0.5*sin(time/58.091)+0.5)+1;
 		if(m_res_count < 0.0)
 			m_res_count = 0.0;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);
@@ -614,7 +614,7 @@
 	void Process(cAvidaContext& ctx)
 	{
 		int time = m_world->GetStats().GetUpdate();
-		double m_res_count = -m_scale*(tanh((time-1825000)/500000)+1)*(0.5*sin(time/58.091)+0.5)+1;
+		double m_res_count = -m_scale*(tanh((double)(time-1825000)/500000)+1)*(0.5*sin(time/58.091)+0.5)+1;
 		if(m_res_count < 0.0)
 			m_res_count = 0.0;
 		cResource* res = m_world->GetEnvironment().GetResourceLib().GetResource(m_res_name);




More information about the Avida-cvs mailing list