Welcome! Log In Create A New Profile

Advanced

palabos 1.5 and CodeBlocks(Windows)

Posted by DavidADavidA  
palabos 1.5 and CodeBlocks(Windows)
December 04, 2014 09:53AM
I am using codeBLocks under windows and the compiler gcc 4.7.1
I don'nt know if I am doing sth wrong but I am testing the new version and when I tried to compile the generalExteranlFlow showCase, i get:


Z:\palabos-v1.5r0\src\core\plbTimer.cpp||In member function 'void plb::global::PlbTimer::start()':|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|51|error: 'timespec' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|51|error: expected ';' before 'ts'|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|52|error: 'CLOCK_REALTIME' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|52|error: 'ts' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|52|error: 'clock_gettime' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp||In member function 'double plb::global::PlbTimer::getTime() const':|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|82|error: 'timespec' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|82|error: expected ';' before 'ts'|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|83|error: 'CLOCK_REALTIME' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|83|error: 'ts' was not declared in this scope|
Z:\palabos-v1.5r0\src\core\plbTimer.cpp|83|error: 'clock_gettime' was not declared in this scope|
||=== Build failed: 10 error(s), 34 warning(s) (1 minute(s), 22 second(s)) ===|

The corresponding part of the code is this part
Language: C++
void PlbTimer::start() { #ifdef PLB_MPI_PARALLEL startTime = mpi().getTime(); #else #ifdef PLB_USE_POSIX timespec ts; clock_gettime(CLOCK_REALTIME, &ts); startTime = (double) ts.tv_nsec * (double) 1.0e-9; #else startClock = clock(); #endif #endif isOn = true; }



Edited 1 time(s). Last edit at 12/04/2014 03:40PM by DavidA.
Re: palabos 1.5 generalExternalFlow
December 04, 2014 10:01AM
Dear DavidA,

Thank you for trying out the new release of Palabos!

You are using Windows, so can you please try in the Makefile to set:

usePOSIX = false

Best Regards,
Dimitris
Re: palabos 1.5 generalExternalFlow
December 04, 2014 10:34AM
You will have to excuse becouse of my lack of programming knowledge but I am using the codeblocks template provided and using the procedure described on Compilation under Windows (and under many other OSes) with the integrated development environment Code::Blocks in the User guide. Does it use the makefile provided in ..\palabos-v1.5r0\examples\showCases\generalExternalFlow?

Anyway I tried it and it wont work, I think you are refering on another way of compiling the program.

Kind regards and thanks for your time



Edited 1 time(s). Last edit at 12/04/2014 10:37AM by DavidA.
Re: palabos 1.5 and CodeBlocks(Windows)
December 04, 2014 09:11PM
Dear DavidA,

Please try the following:

In CodeBlocks, go to:

Project -> Build options ... -> Compiler Settings -> #defines

and delete PLB_USE_POSIX

Then try to build aigain.

Hope this helps...

Best,
Dimitris
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 08:55AM
Dear Dimitris,

Unfortunatly it keeps giving the error. What's the purpose of that part of the code? Is it just debugging? What if I comment it?

Thanks again
pd: I saw it is for monitoring time spent between iterations. Now the program is working without that feature. I am open to any try you'd like to do in order to try to fix it.



Edited 1 time(s). Last edit at 12/05/2014 09:01AM by DavidA.
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 09:26AM
Dear DavidA,

OK, then as a last resort, do the following. Fully replace the file "plbTimer.h" with:

Language: C++
/* This file is part of the Palabos library. * * Copyright (C) 2011-2015 FlowKit Sarl * Route d';Oron 2 * 1010 Lausanne, Switzerland * E-mail contact: contact@flowkit.com * * The most recent release of Palabos can be downloaded at * http://www.palabos.org/ * * The library Palabos is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * The library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */   /** \file * A timer class for benchmarking program parts -- header file. */ #ifndef PLB_TIMER_H #define PLB_TIMER_H   #include <ctime>   namespace plb {   namespace global {   /// A cumulative timer for benchmarking program parts and summing up the times. /** In serial, the C function clock() is used. In parallel, the MPI * function is used. */ class PlbTimer { public: PlbTimer(); /// Proceed with time measurement. void start(); /// Reset timer to zero and start time measurement. void restart(); /// Interrupt time measurement ( you can still proceed with start() ). /* \return Current cumulative time. */ double stop(); /// Reset timer to zero. void reset(); /// Get current cumulative time. double getTime() const; private: double cumulativeTime; bool isOn; #ifdef PLB_MPI_PARALLEL double startTime; #else clock_t startClock; #endif friend PlbTimer& timer(std::string nameOfTimer); friend PlbTimer& plbTimer(std::string nameOfTimer); };   // Global instance of timer objects, for public use. PlbTimer& timer(std::string nameOfTimer);   // Global instance of timer objects, for internal use. PlbTimer& plbTimer(std::string nameOfTimer);   /// A cumulative counter for benchmarking program parts and summing up occurrences /// of events. class PlbCounter { public: PlbCounter(); /// Increment the counter. plint increment(plint value=1); /// Reset counter to zero. void reset(); /// Return current count. plint getCount() const; private: plint count; friend PlbCounter& counter(std::string nameOfCounter); friend PlbCounter& plbCounter(std::string nameOfCounter); };   // Global instance of counter objects, for public use. PlbCounter& counter(std::string nameOfCounter);   // Global instance of counter objects, for internal use. PlbCounter& plbCounter(std::string nameOfCounter);   } // namespace global   } // namespace plb   #endif // PLB_TIMER_H

and the file "plbTimer.cpp" with:

Language: C++
/* This file is part of the Palabos library. * * Copyright (C) 2011-2013 FlowKit Sarl * Route d';Oron 2 * 1010 Lausanne, Switzerland * E-mail contact: contact@flowkit.com * * The most recent release of Palabos can be downloaded at * http://www.palabos.org/ * * The library Palabos is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * The library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */   #include "parallelism/mpiManager.h" #include "core/plbTimer.h" #include <map>   #ifndef PLB_MPI_PARALLEL #include <time.h> #endif   namespace plb {   namespace global {   /* ************** Timer ***************************************** */   PlbTimer::PlbTimer() : cumulativeTime(0.), isOn(false) { }   void PlbTimer::start() { #ifdef PLB_MPI_PARALLEL startTime = mpi().getTime(); #else startClock = clock(); #endif isOn = true; }   void PlbTimer::restart() { reset(); start(); }   double PlbTimer::stop() { cumulativeTime = getTime(); isOn = false; return cumulativeTime; }   void PlbTimer::reset() { cumulativeTime = 0.; }   double PlbTimer::getTime() const { if (isOn) { #ifdef PLB_MPI_PARALLEL return cumulativeTime + mpi().getTime()-startTime; #else return cumulativeTime + (double)(clock()-startClock) / (double)CLOCKS_PER_SEC; #endif } else { return cumulativeTime; } }   PlbTimer& timer(std::string nameOfTimer) { static std::map<std::string, PlbTimer> timerCollection; return timerCollection[nameOfTimer]; }   PlbTimer& plbTimer(std::string nameOfTimer) { static std::map<std::string, PlbTimer> timerCollection; PlbTimer& answer=timerCollection[nameOfTimer]; return answer; }   /* ************** Timer ***************************************** */   PlbCounter::PlbCounter() : count(0) { }   plint PlbCounter::increment(plint value) { count += value; return count; }   void PlbCounter::reset() { count = 0; }   plint PlbCounter::getCount() const { return count; }   PlbCounter& counter(std::string nameOfCounter) { static std::map<std::string, PlbCounter> counterCollection; return counterCollection[nameOfCounter]; }   PlbCounter& plbCounter(std::string nameOfCounter) { static std::map<std::string, PlbCounter> counterCollection; return counterCollection[nameOfCounter]; }   } // namespace global   } // namespace plb

I hope this will do the trick!

Best,
Dimitris
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 09:43AM
Working! Great job, I am continuing trying the program.

Thanks for all the work to the palabos team
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 12:24PM
Sorry again. The cavity case works perfectly but when i switched to generalExternalFlow I recived the following compilation error:
undefined reference to `plb::loadState(std::vector<plb::MultiBlock3D*, std::allocator<plb::MultiBlock3D*> >, int&, bool, plb::FileName)'|
obj\Release\examples\showCases\generalExternalFlow\generalExternalFlow.o:generalExternalFlow.cpp:(.text.startup+0x1220)||undefined reference to `plb::saveState(std::vector<plb::MultiBlock3D*, std::allocator<plb::MultiBlock3D*> >, int, bool, plb::FileName, plb::FileName, int)'|
obj\Release\examples\showCases\generalExternalFlow\generalExternalFlow.o:generalExternalFlow.cpp:(.text.startup+0x1686)||undefined reference to `plb::abortExecution(plb::FileName, std::vector<plb::MultiBlock3D*, std::allocator<plb::MultiBlock3D*> >, int, bool, plb::FileName, plb::FileName, int)'|
||=== Build failed: 3 error(s), 34 warning(s) (2 minute(s), 18 second(s)) ===|
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 12:52PM
Dear DavidA,

Sorry about all of this. It is because we never compile with code-blocks here... Can you please replace all the "Palabos.cbp" file with:

Language: C++
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> <Option title="Palabos" /> <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="Release"> <Option output="bin/Release/Palabos" prefix_auto="1" extension_auto="1" /> <Option working_dir="" /> <Option object_output="obj/Release/" /> <Option type="1" /> <Option compiler="gcc" /> <Compiler> <Add option="-O3" /> <Add option="-DPLB_USE_POSIX" /> </Compiler> <Linker> <Add option="-s" /> </Linker> </Target> <Target title="Debug"> <Option output="bin/Debug/Palabos" prefix_auto="1" extension_auto="1" /> <Option working_dir="" /> <Option object_output="obj/Debug/" /> <Option type="1" /> <Option compiler="gcc" /> <Compiler> <Add option="-g" /> <Add option="-DPLB_USE_POSIX" /> <Add option="-DPLB_DEBUG" /> </Compiler> <Linker> <Add option="-g" /> <Add option="-s" /> </Linker> </Target> </Build> <Compiler> <Add option="-Wall" /> <Add directory="../src" /> <Add directory="../externalLibraries" /> </Compiler> <Unit filename="../examples/showCases/cavity2d/cavity2d.cpp" /> <Unit filename="../src/offLattice/domainClustering3D.cpp" /> <Unit filename="../src/offLattice/marchingCube.cpp" /> <Unit filename="../src/multiBlock/threadAttribution.cpp" /> <Unit filename="../src/multiBlock/nonLocalTransfer2D.cpp" /> <Unit filename="../src/multiBlock/redistribution3D.cpp" /> <Unit filename="../src/multiBlock/reductiveMultiDataProcessorWrapper2D.cpp" /> <Unit filename="../src/multiBlock/multiBlockInfo2D.cpp" /> <Unit filename="../src/multiBlock/multiContainerBlock3D.cpp" /> <Unit filename="../src/multiBlock/multiBlockOperations2D.cpp" /> <Unit filename="../src/multiBlock/domainManipulation2D.cpp" /> <Unit filename="../src/multiBlock/serialBlockCommunicator3D.cpp" /> <Unit filename="../src/multiBlock/reductiveMultiDataProcessorWrapper3D.cpp" /> <Unit filename="../src/multiBlock/localMultiBlockInfo2D.cpp" /> <Unit filename="../src/multiBlock/staticRepartitions3D.cpp" /> <Unit filename="../src/multiBlock/multiBlockOperations3D.cpp" /> <Unit filename="../src/multiBlock/multiBlock2D.cpp" /> <Unit filename="../src/multiBlock/multiDataProcessorWrapper2D.cpp" /> <Unit filename="../src/multiBlock/multiBlockManagement2D.cpp" /> <Unit filename="../src/multiBlock/serialBlockCommunicator2D.cpp" /> <Unit filename="../src/multiBlock/domainManipulation3D.cpp" /> <Unit filename="../src/multiBlock/multiBlock3D.cpp" /> <Unit filename="../src/multiBlock/nonLocalTransfer3D.cpp" /> <Unit filename="../src/multiBlock/sparseBlockStructure2D.cpp" /> <Unit filename="../src/multiBlock/multiBlockSerializer2D.cpp" /> <Unit filename="../src/multiBlock/sparseBlockStructure3D.cpp" /> <Unit filename="../src/multiBlock/localMultiBlockInfo3D.cpp" /> <Unit filename="../src/multiBlock/multiBlockSerializer3D.cpp" /> <Unit filename="../src/multiBlock/combinedStatistics.cpp" /> <Unit filename="../src/multiBlock/multiDataProcessorWrapper3D.cpp" /> <Unit filename="../src/multiBlock/multiContainerBlock2D.cpp" /> <Unit filename="../src/multiBlock/multiBlockInfo3D.cpp" /> <Unit filename="../src/multiBlock/staticRepartitions2D.cpp" /> <Unit filename="../src/multiBlock/multiBlockManagement3D.cpp" /> <Unit filename="../src/multiGrid/multiScale.cpp" /> <Unit filename="../src/multiGrid/parallelizer3D.cpp" /> <Unit filename="../src/multiGrid/multiGridDataProcessorWrapper3D.cpp" /> <Unit filename="../src/multiGrid/multiGridOperations2D.cpp" /> <Unit filename="../src/multiGrid/multiGrid3D.cpp" /> <Unit filename="../src/multiGrid/parallelizer2D.cpp" /> <Unit filename="../src/multiGrid/multiGridOperations3D.cpp" /> <Unit filename="../src/multiGrid/multiGridManagement3D.cpp" /> <Unit filename="../src/multiGrid/domainDivision3D.cpp" /> <Unit filename="../src/multiGrid/multiGrid2D.cpp" /> <Unit filename="../src/multiGrid/multiGridDataProcessorWrapper2D.cpp" /> <Unit filename="../src/multiGrid/multiGridManagement2D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessingFunctional2D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlockSerializer2D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessorWrapper2D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlockSerializer3D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessingFunctional3D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessor2D.cpp" /> <Unit filename="../src/atomicBlock/atomicContainerBlock3D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlockOperations2D.cpp" /> <Unit filename="../src/atomicBlock/reductiveDataProcessingFunctional3D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlock2D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlock3D.cpp" /> <Unit filename="../src/atomicBlock/reductiveDataProcessorWrapper3D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessor3D.cpp" /> <Unit filename="../src/atomicBlock/atomicContainerBlock2D.cpp" /> <Unit filename="../src/atomicBlock/dataProcessorWrapper3D.cpp" /> <Unit filename="../src/atomicBlock/reductiveDataProcessorWrapper2D.cpp" /> <Unit filename="../src/atomicBlock/reductiveDataProcessingFunctional2D.cpp" /> <Unit filename="../src/atomicBlock/atomicBlockOperations3D.cpp" /> <Unit filename="../src/dataProcessors/metaStuffWrapper2D.cpp" /> <Unit filename="../src/dataProcessors/metaStuffFunctional2D.cpp" /> <Unit filename="../src/dataProcessors/metaStuffFunctional3D.cpp" /> <Unit filename="../src/dataProcessors/metaStuffWrapper3D.cpp" /> <Unit filename="../src/algorithm/basicAlgorithms.cpp" /> <Unit filename="../src/algorithm/statistics.cpp" /> <Unit filename="../src/io/multiBlockReader2D.cpp" /> <Unit filename="../src/io/serializerIO.cpp" /> <Unit filename="../src/io/multiBlockWriter2D.cpp" /> <Unit filename="../src/io/serializerIO_2D.cpp" /> <Unit filename="../src/io/multiBlockWriter3D.cpp" /> <Unit filename="../src/io/serializerIO_3D.cpp" /> <Unit filename="../src/io/parallelIO.cpp" /> <Unit filename="../src/io/multiBlockReader3D.cpp" /> <Unit filename="../src/io/vtkDataOutput.cpp" /> <Unit filename="../src/io/plbFiles.cpp" /> <Unit filename="../src/io/mpiParallelIO.cpp" /> <Unit filename="../src/io/utilIO_3D.cpp" /> <Unit filename="../src/io/vtkStructuredDataOutput.cpp" /> <Unit filename="../src/io/colormaps.cpp" /> <Unit filename="../src/io/utilIO_2D.cpp" /> <Unit filename="../src/libraryInterfaces/TINYXML_xmlIO.cpp" /> <Unit filename="../src/parallelism/parallelBlockCommunicator3D.cpp" /> <Unit filename="../src/parallelism/mpiManager.cpp" /> <Unit filename="../src/parallelism/parallelBlockCommunicator2D.cpp" /> <Unit filename="../src/parallelism/sendRecvPool.cpp" /> <Unit filename="../src/parallelism/parallelStatistics.cpp" /> <Unit filename="../src/core/plbLogFiles.cpp" /> <Unit filename="../src/core/blockIdentifiers.cpp" /> <Unit filename="../src/core/processorIdentifiers3D.cpp" /> <Unit filename="../src/core/plbTypenames.cpp" /> <Unit filename="../src/core/blockStatistics.cpp" /> <Unit filename="../src/core/plbProfiler.cpp" /> <Unit filename="../src/core/multiBlockIdentifiers2D.cpp" /> <Unit filename="../src/core/blockSurface3D.cpp" /> <Unit filename="../src/core/block3D.cpp" /> <Unit filename="../src/core/block2D.cpp" /> <Unit filename="../src/core/serializer.cpp" /> <Unit filename="../src/core/runTimeDiagnostics.cpp" /> <Unit filename="../src/core/multiBlockIdentifiers3D.cpp" /> <Unit filename="../src/core/globalDefs.cpp" /> <Unit filename="../src/core/plbInit.cpp" /> <Unit filename="../src/core/indexUtil.cpp" /> <Unit filename="../src/core/plbTimer.cpp" /> <Unit filename="../src/core/blockSurface2D.cpp" /> <Unit filename="../src/core/processorIdentifiers2D.cpp" /> <Unit filename="../src/complexDynamics/carreauGlobalDefs.cpp" /> <Unit filename="../src/multiPhysics/bubbleMatch3D.cpp" /> <Unit filename="../externalLibraries/Eigen/src/Cholesky/CholeskyInstantiations.cpp" /> <Unit filename="../externalLibraries/Eigen/src/Core/CoreInstantiations.cpp" /> <Unit filename="../externalLibraries/Eigen/src/QR/QrInstantiations.cpp" /> <Unit filename="../externalLibraries/tinyxml/tinyxml.cpp" /> <Unit filename="../externalLibraries/tinyxml/tinyxmlparser.cpp" /> <Unit filename="../externalLibraries/tinyxml/tinyxmlerror.cpp" />   <Extensions> <code_completion /> <debugger /> </Extensions> </Project> </CodeBlocks_project_file>

Try again to compile (not the cavity2d but) the generalExternalFlow example and please let me know if you succeed.

Best,
Dimitris
Re: palabos 1.5 and CodeBlocks(Windows)
December 05, 2014 08:46PM
Thanks again Dimitris,

Don't worry, I trully appreciate your work and I suppose that you use Linux (I should too but becouse of another software I cant ...). I keep getting errors, I am attaching them:


obj\Release\src\multiPhysics\bubbleMatch3D.o:bubbleMatch3D.cpp:(.text$_ZN3plb18MultiScalarField3DIiEC1ERKNS_12MultiBlock3DE[__ZN3plb18MultiScalarField3DIiEC1ERKNS_12MultiBlock3DE]+0x115)||undefined reference to `plb::SerialScalarAccess3D<int>::SerialScalarAccess3D()'|
obj\Release\src\multiPhysics\bubbleMatch3D.o:bubbleMatch3D.cpp:(.text$_ZN3plb33defaultGenerateMultiScalarField3DIiEESt8auto_ptrINS_18MultiScalarField3DIT_EEERKNS_22MultiBlockManagement3DES3_[__ZN3plb33defaultGenerateMultiScalarField3DIiEESt8auto_ptrINS_18MultiScalarField3DIT_EEERKNS_22MultiBlockManagement3DES3_]+0xc4)||undefined reference to `plb::SerialScalarAccess3D<int>::SerialScalarAccess3D()'|
||=== Build failed: 2 error(s), 34 warning(s) (2 minute(s), 25 second(s)) ===|

It marks the first if in this part of Part.h
Language: C++
inline Scalar coeff(int row, int col) const { // SelfAdjointBit doesn';t play any role here: just because a matrix is selfadjoint doesn';t say anything about // each individual coefficient, except for the not-very-useful-here fact that diagonal coefficients are real. if( ((Flags & LowerTriangularBit) && (col>row)) || ((Flags & UpperTriangularBit) && (row>col)) ) return (Scalar)0; if(Flags & UnitDiagBit) return col==row ? (Scalar)1 : m_matrix.coeff(row, col); else if(Flags & ZeroDiagBit) return col==row ? (Scalar)0 : m_matrix.coeff(row, col); else return m_matrix.coeff(row, col); }


Regards



Edited 1 time(s). Last edit at 12/05/2014 08:50PM by DavidA.
Re: palabos 1.5 and CodeBlocks(Windows)
December 06, 2014 10:29AM
Dear DavidA,

Please try the following: In the file "src/multiPhysics/bubbleMatch3D.cpp" in the list of "include" files add these two lines:

Language: C++
#include "multiBlock/serialMultiDataField3D.h" #include "multiBlock/serialMultiDataField3D.hh"

Let me know in case of more errors! Thanks a lot, and let me apologize once again!

Best,
Dimitris
Re: palabos 1.5 and CodeBlocks(Windows)
December 06, 2014 07:15PM
Seem to working now! Thanks a lot Dimitris. I will play with it and let you know. The idea is validate the results from the example geometries with literature and other softwares as a first step, let me know if you have done some correlation of this kind.

Regards and great job
Re: palabos 1.5 and CodeBlocks(Windows)
December 21, 2014 10:50AM
I am using codeBLocks under windows and the compiler gnu gcc
I tried to compile the cavity 2d showCase, i get this build log:
-------------- Build: Release in Palabos (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -O3 -DPLB_USE_POSIX -I..\src -I..\externalLibraries -c C:\Users\Maurizio\Documents\Materiale_Università\Palabos\palabos-v1.5r0\src\parallelism\parallelBlockCommunicator3D.cpp -o obj\Release\src\parallelism\parallelBlockCommunicator3D.o
C:\Users\Maurizio\Documents\Materiale_Università\Palabos\palabos-v1.5r0\src\parallelism\parallelBlockCommunicator3D.cpp:36:17: mpi.h: No such file or directory
Process terminated with status 1 (0 minute(s), 8 second(s))
1 error(s), 0 warning(s) (0 minute(s), 8 second(s))

This is the corresponding part of code:

Language: C++
/* This file is part of the Palabos library. * * Copyright (C) 2011-2013 FlowKit Sarl * Route d';Oron 2 * 1010 Lausanne, Switzerland * E-mail contact: contact@flowkit.com * * The most recent release of Palabos can be downloaded at * http://www.palabos.org/ * * The library Palabos is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * The library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */   /** \file * Helper classes for parallel 3D multiblock lattice -- generic implementation. */   #include "parallelism/parallelBlockCommunicator3D.h" #include "multiBlock/multiBlock3D.h" #include "multiBlock/multiBlockManagement3D.h" #include "atomicBlock/atomicBlock3D.h" #include "core/plbDebug.h" #include "core/plbProfiler.h" #include <algorithm> #include <mpi.h>

I don't have the header file mpi.h, i only have mpiParalleIO.h and mpiManager.h.
What should i do?
Re: palabos 1.5 and CodeBlocks(Windows)
December 21, 2014 01:44PM
Dear Mario,

Please try to replace the line:

#include <mpi.h>

with:

#ifdef PLB_MPI_PARALLEL
#include <mpi.h>
#endif

and recompile.

Best,
Dimitris
Re: palabos 1.5 and CodeBlocks(Windows)
December 21, 2014 03:03PM
Thanks dimitris,
now the code is compiled, but palabos doesn't work.
I have tried with many files from showcases (cavity2d, dipole, poiseuille, movingWall etc..)
The output is:

Process returned -1073741819 (0xC0000005) execution time 0.998s
Press any key to continue

What is the problem?



Edited 1 time(s). Last edit at 12/21/2014 06:28PM by Mario.
Re: palabos 1.5 and CodeBlocks(Windows)
January 26, 2015 04:57AM
Dear all,

My name is Leonel, I am a student from Universitas Padjadjaran, Indonesia.

I have some problem when compiling the carreauPoisseuille program, It produced some errors I attach below

python2 ../../../scons/scons.py -j 6 -f ../../../SConstruct palabosRoot=../../.. projectFiles="carreauPoiseuille.cpp" optimize=true debug=true profile=false MPI parallel=true SMPparallel=false usePOSIX=true serialCXX=g++ parallelCXX=mpicxx c ompileFlags="-Wall -Wnon-virtual-dtor" linkFlags="" optimFlags="-O3" debugFlags= "-g" profileFlags="-pg" libraryPaths="" includePaths="" libraries=""
/bin/sh: python2: not found
make: *** [compile] Error 127


Need your advice how to solve this problem

regards,
Leo
Re: palabos 1.5 and CodeBlocks(Windows)
August 24, 2015 11:43AM
Hello
I am having the same problem as david but it is with cavity2d.cpp. BTW I am new and I would appreciate any help. I am using latest version of palabos.
Part of the program causing the error indicated by code block.
Language: Fortran
timespec ts; clock_gettime(CLOCK_REALTIME, &ts); startTime = (double) ts.tv_nsec * (double) 1.0e-9;

Errors:

D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp: In member function 'void plb::global::PlbTimer::start()':
D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp:50:19: error: 'CLOCK_REALTIME' was not declared in this scope
clock_gettime(CLOCK_REALTIME, &ts);
^
D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp:50:38: error: 'clock_gettime' was not declared in this scope
clock_gettime(CLOCK_REALTIME, &ts);
^
D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp: In member function 'double plb::global::PlbTimer::getTime() const':
D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp:81:23: error: 'CLOCK_REALTIME' was not declared in this scope
clock_gettime(CLOCK_REALTIME, &ts);
D:\fortran compiler\palabos-v1.5r1\src\core\plbTimer.cpp:81:42: error: 'clock_gettime' was not declared in this scope
clock_gettime(CLOCK_REALTIME, &ts);
Re: palabos 1.5 and CodeBlocks(Windows)
April 05, 2016 07:45AM
hi

i'm trying to run palabos tutorials in code blocks in windows 10. it is showing "fatal error: palabos2d.h :no such file or directory"
help me to run the codes in windows
Re: palabos 1.5 and CodeBlocks(Windows)
March 15, 2017 08:18AM
I try to replace all the setting

the build messages change to:

||=== Build: Release in Palabos (compiler: GNU GCC Compiler) ===|
=||No such file or directory|
false||No such file or directory|
=||No such file or directory|
false||No such file or directory|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

the build log shows:

mingw32-g++.exe: error: false: No such file or directory
mingw32-g++.exe: error: =: No such file or directory
mingw32-g++.exe: error: false: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Re: palabos 1.5 and CodeBlocks(Windows)
May 23, 2017 06:52PM
Hi palabos team,
I'm using the latest version of Palabos for my thesis project with CodeBlocks under windows.
I tried to compile the cavity 2d showCase and i get this build messages:

||=== Build: Release in Palabos (compiler: GNU GCC Compiler) ===|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp||In member function 'void plb::global::PlbTimer::start()':|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp|50|error: 'CLOCK_REALTIME' was not declared in this scope|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp|50|error: 'clock_gettime' was not declared in this scope|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp||In member function 'double plb::global::PlbTimer::getTime() const':|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp|81|error: 'CLOCK_REALTIME' was not declared in this scope|
C:\Users\Francesco\Università\Tesi magistrale\palabos-v1.5r1\src\core\plbTimer.cpp|81|error: 'clock_gettime' was not declared in this scope|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Where is the problem?
Thank you.
Regards
Sorry, you do not have permission to post/reply in this forum.