Seperating cuda and c++ flags. Fixing some compile warnings.
This commit is contained in:
parent
a60ee4ca99
commit
1b3152e690
|
@ -135,10 +135,11 @@ void ParallelStreamBuffer::reserve( size_t size )
|
|||
}
|
||||
}
|
||||
}
|
||||
std::streamsize ParallelStreamBuffer::xsputn( const std::string &text, std::streamsize n )
|
||||
std::streamsize ParallelStreamBuffer::xsputn( const char* text, std::streamsize n )
|
||||
{
|
||||
reserve(d_size+n);
|
||||
memcpy(&d_buffer[d_size],text.c_str(),text.size());
|
||||
memcpy(&d_buffer[d_size],text,n);
|
||||
d_size += n;
|
||||
if ( text[n-1]==0 || text[n-1]==10 ) { sync(); }
|
||||
return n;
|
||||
}
|
||||
|
|
2
IO/PIO.h
2
IO/PIO.h
|
@ -73,7 +73,7 @@ public:
|
|||
* Write the specified number of characters into the output stream (called
|
||||
* from streambuf).
|
||||
*/
|
||||
virtual std::streamsize xsputn(const std::string &text, std::streamsize n);
|
||||
virtual std::streamsize xsputn(const char* text, std::streamsize n);
|
||||
|
||||
/*!
|
||||
* Write an overflow character into the parallel buffer (called from
|
||||
|
|
|
@ -33,19 +33,29 @@ ENDFUNCTION()
|
|||
MACRO( CONFIGURE_CUDA )
|
||||
CHECK_ENABLE_FLAG( USE_CUDA 0 )
|
||||
IF( USE_CUDA )
|
||||
SET( CUDA_FLAGS ${CUDA_NVCC_FLAGS} )
|
||||
SET( CUDA_FIND_QUIETLY 1 )
|
||||
INCLUDE ( FindCUDA )
|
||||
# Include FindCUDA
|
||||
INCLUDE( FindCUDA )
|
||||
IF ( NOT CUDA_FOUND )
|
||||
MESSAGE ( FATAL_ERROR "CUDA not found" )
|
||||
ENDIF()
|
||||
SET(CUDA_NVCC_FLAGS ${CUDA_FLAGS})
|
||||
# Initialize the cuda flags
|
||||
IF ( CUDA_FLAGS )
|
||||
SET( CUDA_NVCC_FLAGS "${CUDA_FLAGS}" )
|
||||
ENDIF()
|
||||
IF(NOT CUDA_NVCC_FLAGS)
|
||||
# Set minimum requirements
|
||||
SET( CUDA_NVCC_FLAGS "-arch=sm_20" )
|
||||
ELSE()
|
||||
STRING( REPLACE " " ";" CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} )
|
||||
ENDIF()
|
||||
IF( NOT CMAKE_BUILD_TYPE )
|
||||
MESSAGE(FATAL_ERROR "CMAKE_BUILD_TYPE is not set")
|
||||
ELSEIF( ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
|
||||
SET( CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -g -O0" )
|
||||
ELSEIF( ${CMAKE_BUILD_TYPE} STREQUAL "Release" )
|
||||
SET( CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -O3" )
|
||||
ENDIF()
|
||||
SET( CUDA_PROPAGATE_HOST_FLAGS OFF )
|
||||
SET( CUDA_FIND_QUIETLY )
|
||||
STRING( REPLACE " " ";" CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} )
|
||||
ENDIF()
|
||||
IF ( NOT USE_CUDA )
|
||||
MESSAGE( "Not using CUDA" )
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <math.h>
|
||||
#include "Array.h"
|
||||
#include "PointList.h"
|
||||
#include "Utilities.h"
|
||||
//#include "vecLib/clapack.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -4159,14 +4160,14 @@ inline void pmmc_CommonCurveSpeed(DoubleArray &CubeValues, DoubleArray &dPdt, Do
|
|||
{
|
||||
int p;
|
||||
double s,lwns,norm;
|
||||
double a,b,c,d,e,f,g,h;
|
||||
double x,y,z,zeta;
|
||||
double zeta;
|
||||
double tangent_x,tangent_y,tangent_z;
|
||||
double ns_x, ns_y, ns_z;
|
||||
double nwn_x, nwn_y, nwn_z;
|
||||
double nwns_x, nwns_y, nwns_z;
|
||||
Point P,A,B;
|
||||
lwns = 0.0;
|
||||
NULL_USE(lwns);
|
||||
|
||||
TriLinPoly Px,Py,Pz,SDx,SDy,SDz,Pt;
|
||||
Px.assign(Fx,i,j,k);
|
||||
|
@ -4259,6 +4260,9 @@ inline void pmmc_CommonCurveSpeed(DoubleArray &CubeValues, DoubleArray &dPdt, Do
|
|||
ReturnVector(2) += zeta*nwns_z*s;
|
||||
}
|
||||
}
|
||||
NULL_USE(tangent_x);
|
||||
NULL_USE(tangent_y);
|
||||
NULL_USE(tangent_z);
|
||||
}
|
||||
inline void pmmc_CurveOrientation(DoubleArray &Orientation, DTMutableList<Point> &Points, int npts, int i, int j, int k){
|
||||
|
||||
|
@ -4301,10 +4305,9 @@ inline void pmmc_CurveCurvature(DoubleArray &f, DoubleArray &s, DoubleArray &KN,
|
|||
double &KNavg, double &KGavg, DTMutableList<Point> &Points, int npts, int ic, int jc, int kc){
|
||||
|
||||
int p,i,j,k;
|
||||
double x,y,z,length;
|
||||
double length;
|
||||
double fxx,fyy,fzz,fxy,fxz,fyz,fx,fy,fz;
|
||||
double sxx,syy,szz,sxy,sxz,syz,sx,sy,sz;
|
||||
|
||||
double Axx,Axy,Axz,Ayx,Ayy,Ayz,Azx,Azy,Azz;
|
||||
// double Tx[8],Ty[8],Tz[8]; // Tangent vector
|
||||
// double Nx[8],Ny[8],Nz[8]; // Principle normal
|
||||
|
@ -4477,7 +4480,17 @@ inline void pmmc_CurveCurvature(DoubleArray &f, DoubleArray &s, DoubleArray &KN,
|
|||
KGavg += K*(nwsx*nwnsx + nwsy*nwnsy + nwsz*nwnsz)*length;
|
||||
}
|
||||
}
|
||||
NULL_USE(fxx); NULL_USE(fyy); NULL_USE(fzz);
|
||||
NULL_USE(fxy); NULL_USE(fxz); NULL_USE(fyz);
|
||||
NULL_USE(fx); NULL_USE(fy); NULL_USE(fz);
|
||||
NULL_USE(sxx); NULL_USE(syy); NULL_USE(szz);
|
||||
NULL_USE(sxy); NULL_USE(sxz); NULL_USE(syz);
|
||||
NULL_USE(sx); NULL_USE(sy); NULL_USE(sz);
|
||||
NULL_USE(Axx); NULL_USE(Ayy); NULL_USE(Azz);
|
||||
NULL_USE(Axy); NULL_USE(Axz); NULL_USE(Ayz);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
inline void pmmc_InterfaceSpeed(DoubleArray &dPdt, DoubleArray &P_x, DoubleArray &P_y, DoubleArray &P_z,
|
||||
DoubleArray &CubeValues, DTMutableList<Point> &Points, IntArray &Triangles,
|
||||
|
|
|
@ -14,9 +14,8 @@ rm -rf CMake*
|
|||
cmake \
|
||||
-D CMAKE_C_COMPILER:PATH=cc \
|
||||
-D CMAKE_CXX_COMPILER:PATH=CC \
|
||||
-D CMAKE_CXX_COMPILER:PATH=CC \
|
||||
-D CMAKE_C_FLAGS="-DCBUB" \
|
||||
-D CMAKE_CXX_FLAGS="-DCBUB" \
|
||||
-D CMAKE_CXX_FLAGS="-DCBUB -tp=bulldozer" \
|
||||
-D MPI_COMPILER:BOOL=TRUE \
|
||||
-D MPIEXEC=aprun \
|
||||
-D USE_EXT_MPI_FOR_SERIAL_TESTS:BOOL=TRUE \
|
||||
|
@ -28,11 +27,11 @@ cmake \
|
|||
|
||||
|
||||
# Build the code
|
||||
make install -j 8
|
||||
# make install -j 8
|
||||
|
||||
|
||||
# Run the fast tests
|
||||
ctest -E WEEKLY
|
||||
# ctest -E WEEKLY
|
||||
|
||||
|
||||
# Run the slow tests
|
||||
|
|
Loading…
Reference in New Issue
Block a user