diff --git a/README.visit b/README.visit index 22e59e04..890ad605 100644 --- a/README.visit +++ b/README.visit @@ -4,9 +4,10 @@ Checkout code and create a cmake script to compile plug-in. Example commands for Rhea: Load the proper modules - module load visit - module load cmake + module unload intel gcc module load gcc/4.8.2 + module load cmake + Configure cmake to build the plug-in cmake \ @@ -16,20 +17,21 @@ Configure cmake to build the plug-in -D USE_MPI=false \ -D USE_CUDA=false \ -D USE_VISIT=true \ - -D VISIT_ROOT_DIR=/sw/rhea/visit \ + -D VISIT_ROOT_DIR=/sw/redhat6/visit \ -D USE_TIMER=false \ ../../LBPM-WIA - Build the visit plug-in + make install -j 8 make visit -Check that the visit plug-in installed in ~/.visit/2.7.1/linux-x86_64/plugins/databases +Check that the visit plug-in installed in ~/.visit/2.9.0/linux-x86_64/plugins/databases +where 2.9.0 is the current version of visit on rhea It should have created several shared libraries: libELBMDatabase_par.so libELBMDatabase_ser.so libILBMDatabase.so libMLBMDatabase.so -Install visit on local machine (2.7.3) +Install visit on local machine (2.9.0) Start visit on local machine diff --git a/cmake/FindVisIt.cmake b/cmake/FindVisIt.cmake index fdd7bd4b..3c1dfd4d 100644 --- a/cmake/FindVisIt.cmake +++ b/cmake/FindVisIt.cmake @@ -45,7 +45,7 @@ MACRO( VISIT_PLUGIN SRC_DIR TARGET ) ENDFOREACH() ADD_CUSTOM_TARGET( ${SRC_DIR} - COMMAND ${VISIT_XML_CMAKE} ${TARGET}.xml + COMMAND ${VISIT_XML_CMAKE} -clobber ${TARGET}.xml COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} . diff --git a/common/MPI_Helpers.cpp b/common/MPI_Helpers.cpp index c2c2c702..23978cba 100644 --- a/common/MPI_Helpers.cpp +++ b/common/MPI_Helpers.cpp @@ -162,11 +162,27 @@ int MPI_Waitall( int, MPI_Request[], MPI_Status[] ) { return 0; } +int MPI_Wait( MPI_Request*, MPI_Status* ) +{ + return 0; +} int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm ) { ERROR("Not implimented yet"); return 0; } +int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm) +{ + ERROR("Not implimented yet"); + return 0; +} +int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + MPI_Comm comm, MPI_Status *status) +{ + ERROR("Not implimented yet"); + return 0; +} int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) { @@ -185,6 +201,13 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, ERROR("Not implimented yet"); return 0; } +int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPI_Comm comm) +{ + ERROR("Not implimented yet"); + return 0; +} int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, @@ -194,6 +217,16 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, ERROR("Not implimented yet"); return 0; } +int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) +{ + ERROR("Not implimented yet"); + return 0; +} +int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) +{ + ERROR("Not implimented yet"); + return 0; +} double MPI_Wtime( void ) { return 0.0; diff --git a/common/MPI_Helpers.h b/common/MPI_Helpers.h index fa386b2d..14752bcd 100644 --- a/common/MPI_Helpers.h +++ b/common/MPI_Helpers.h @@ -18,28 +18,40 @@ #define MPI_COMM_WORLD 0 #define MPI_COMM_SELF 0 #define MPI_STATUS_IGNORE NULL - enum MPI_Datatype { MPI_LOGICAL, MPI_CHAR, MPI_INT, MPI_DOUBLE }; - enum MPI_Op { MPI_SUM }; + enum MPI_Datatype { MPI_LOGICAL, MPI_CHAR, MPI_UNSIGNED_CHAR, MPI_INT, + MPI_UNSIGNED, MPI_LONG, MPI_UNSIGNED_LONG, MPI_LONG_LONG, MPI_FLOAT, MPI_DOUBLE }; + enum MPI_Op { MPI_MIN, MPI_MAX, MPI_SUM }; + enum MPI_Group { }; // Fake MPI functions int MPI_Init(int*,char***); int MPI_Finalize(); int MPI_Comm_size( MPI_Comm, int *size ); int MPI_Comm_rank( MPI_Comm, int *rank ); int MPI_Barrier(MPI_Comm); + int MPI_Wait(MPI_Request*,MPI_Status*); int MPI_Waitall(int,MPI_Request[],MPI_Status[]); int MPI_Bcast(void*,int,MPI_Datatype,int,MPI_Comm); + int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, + MPI_Comm comm); + int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, + MPI_Comm comm, MPI_Status *status); int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request); int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request); int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); + int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, + MPI_Comm comm); int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status); double MPI_Wtime( void ); + int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); + int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); #endif diff --git a/tests/lbpm_disc_pp.cpp b/tests/lbpm_disc_pp.cpp index 1364a9f0..50a1e8cb 100644 --- a/tests/lbpm_disc_pp.cpp +++ b/tests/lbpm_disc_pp.cpp @@ -5,11 +5,12 @@ #include #include #include -#include #include "pmmc.h" #include "Domain.h" #include "Communication.h" +#include "MPI_Helpers.h" // This includes mpi.h + /* * Pre-Processor to generate signed distance function from disc packing @@ -151,6 +152,8 @@ int main(int argc, char **argv) MPI_Request req1[18],req2[18]; MPI_Status stat1[18],stat2[18]; + int depth; + if (rank == 0){ printf("********************************************************\n"); printf("Running Disc Packing Pre-Processor for LBPM-WIA \n"); @@ -200,8 +203,10 @@ int main(int argc, char **argv) MPI_Bcast(&Lz,1,MPI_DOUBLE,0,MPI_COMM_WORLD); //................................................. MPI_Barrier(MPI_COMM_WORLD); - + // ************************************************************** + if (argc > 1) depth=atoi(argv[1]); + else depth=Nz; if (nprocs != nprocx*nprocy*nprocz){ printf("nprocx = %i \n",nprocx); @@ -227,6 +232,7 @@ int main(int argc, char **argv) printf("Process grid = %ix%ix%i \n", nprocx,nprocy,nprocz); printf("Sub-domain size = %ix%ix%i \n", Nx,Ny,Nz); printf("Physical domain size = %fx%fx%f \n",Lx,Ly,Lz); + printf("Micromodel depth = %i voxels",depth); } @@ -284,6 +290,7 @@ int main(int argc, char **argv) printf("************ \n"); } + if (nprocz > 1 && rank==0) printf("Disc packs are 2D -- are you sure you want nprocz > 1? \n"); //....................................................................... SignedDistanceDiscPack(SignDist.get(),ndiscs,cx,cy,rad,Lx,Ly,Lz,Nx,Ny,Nz, iproc,jproc,kproc,nprocx,nprocy,nprocz); @@ -293,8 +300,13 @@ int main(int argc, char **argv) for (k=0;k