blueCFD / Core

Coordination repository for the blueCFD-Core: Issue tracking, Wiki, project webpage and miscellaneous scripts
http://bluecfd.github.io/Core
53 stars 10 forks source link

Issue occurred while building swak4Foam with blueCFD-Core 2017-2 #129

Closed MarineAiry closed 4 years ago

MarineAiry commented 5 years ago

Hi guys, I am trying to generate a mesh. I am working in these conditions:

Version information

Windows 10 64 bit blueCFD-Core 2017-2 OpenFOAM 5.x Python 3.7.4

Issue

I just want to run: $ blockMesh But it gives back the following error:

Create time

--> FOAM Warning : From function void Foam::dlOpen(const Foam::fileName&, bool) in file MSwindows.C at line 1336 \ LoadLibrary failed. "Error 126: Impossibile trovare il modulo specificato. " --> FOAM Warning : From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105 could not load "libsimpleSwakFunctionObjects.so" --> FOAM Warning : From function void Foam::dlOpen(const Foam::fileName&, bool) in file MSwindows.C at line 1336 \ LoadLibrary failed. "Error 126: Impossibile trovare il modulo specificato. " --> FOAM Warning : From function bool Foam::dlLibraryTable::open(const Foam::fileName&, bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 105 could not load "libswakFunctionObjects.so" Creating block mesh from "D:/PROGRAMMI/blueCFD-Core-2017/ofuser-of5/run/IWWTC_Model/system/blockMeshDict" Creating block edges No non-planar block faces defined Creating topology blocks --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const pointField&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -37.05 for face 3

--> FOAM FATAL IO ERROR: Block hex (0 1 2 3 4 5 6 7) (30 10 6) simpleGrading (1(1) 1(1) 1(1)) has inward-pointing faces 4(0 1 5 4) 4(3 7 6 2)

file: D:/PROGRAMMI/blueCFD-Core-2017/ofuser-of5/run/IWWTC_Model/system/blockMeshDict.blocks at line 59. From function void Foam::blockDescriptor::check(const Foam::Istream&) in file blockDescriptor/blockDescriptor.C at line 89.

FOAM exiting

In order to solve this issue, I am following the instructions on how to build swak4Foam with blueCFD here: https://github.com/blueCFD/Core/wiki/Building-swak4Foam-with-blueCFD-Core#building-with-bluecfd-core-2017 but the fourth step: $ ./Allwmake > log.make 2>&1 takes a time shorter than 40 minutes. But most of all, the next step: $ ./Allwmake shows an output other than that provided from Wiki istructions:

Previously compiled for OpenFOAM (5.x) No file 'swakConfiguration'. Python etc won't work. See README for details Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems Checking swak4Foam-version and generating file Swak version is 0.4.2 Bison is version 3.4.1 Flex is version 2.6.4 (Minor version: 4) OpenFOAM-version: Major 5 Minor 0 Patch 0 (-1 == x / 0) Fork: openfoam No change to swak4FoamParsers/foamVersion4swak.H wmake libso swak4FoamParsers .. [I am not including the middle part of the output, which is too long, and useless, as well.] .. Parser library did not compile OK. No sense continuing as everything else depends on it

Requirements for Library not satisfied. I see no sense in going on Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard

I am having trouble getting the file log.make.gz because by running: $ gzip < log.make > log.make.gz I do not understand how to get it.

Thank you for taking time out of your day by reading this message, and for any help you might be able to provide.

Berin

wyldckat commented 5 years ago

Quick answers:

  1. The command:
gzip < log.make > log.make.gz

should have created the file log.make.gz without problems.

  1. I suspect that the reason why you're having problems with building swak4Foam is because you've updated the MSys2 software stack in order to get Python 3 to work properly. But by doing that, you've updated the GCC software stack as well, which might not be compatible anymore with the OpenFOAM build we provide with blueCFD-Core 2017.

The other possibility could be because Bison 3.4.1 is the version made available in your current MSys2 installation, while the version we tested with was 3.0.4.

Without the log file, it's a lot harder to properly diagnose the problem.

MarineAiry commented 5 years ago

Thank you @wyldckat for the quick answer. In order to get the log file, I have just opened the terminal, and after typing: user cd swak4Foam gzip < log.make > log.make.gz unfortunately the last command does not show any output, even now.

Do we have any option to solve this issue ? Thank you so much for all the help.

MarineAiry commented 5 years ago

Dear @wyldckat, it seems that I already have the log file. I am truly sorry for having not understand that the log file should be found into the swak4Foam folder (obviously, and not in the terminal, as I thought before). Here the log file: log.make.gz Sorry again, and really thanks for your continuous reply.

wyldckat commented 5 years ago

I've taken a look at the log file and it really is a problem with using a more modern GCC compiler.

I'm not sure when I'll be able to look into this, but one alternative is for you to move/rename the folder "msys64" that you currently have installed in the main blueCFD-Core folder and then reinstall blueCFD-Core 2017-2 on top of the existing installation. This will reinstall the original "msys64" folder.

You can then copy the batch file that is the blueCFD-Core folder that starts the terminal (I don't remember the exact name right now), and in the new batch file you created, you can change the folder name it uses from "msys64" to the new name.

I believe this is the simplest way to work on this, given your updated MSys64 installation.

MarineAiry commented 5 years ago

@wyldckat few quick questions: 1) I should uninstall the previous installation of blueCFD 2017-2 and then re-install it ?

And then:

You can then copy the batch file that is the blueCFD-Core folder that starts the terminal (I don't remember the exact name right now), and in the new batch file you created, you can change the folder name it uses from "msys64" to the new name

2) Which batch file should I take ?

wyldckat commented 5 years ago

@MarineAiry: Just in case you are not familiar with blueCFD-Core's shortcuts, you might have it on your desktop, but should also have it on the Windows Start Menu this shortcut within the blueCFD-Core 2017 folder: blueCFD-Core folder That shortcut will take you to the main installation folder for blueCFD-Core.

Now, for the answers:

  1. As long as you first rename the folder "msys64", you can simply re-install it again, without uninstalling it. When you run the installer, it will even re-use your installation instructions, so it makes it easier to recover files this way as well... although it will take a while to unpack the several thousand files once again...

  2. I have to go look for it... OK, in the main folder for blueCFD-Core 2017, you should find this batch file: blueCFD-Core_MSys2_mingw64.bat - then:

    1. Copy it to a new name, e.g. blueCFD-Core_MSys2_mingw64_upgraded.bat

    2. Right-click on the new file and choose Open with Notepad2, if I remember correctly.

    3. Then look for the line number 39, namely this line:

    cd "%~dp0\msys64"
    1. And change it to the name you gave your installation of msys64, for example I called mine msys64_upgraded, so it becomes:
    cd "%~dp0\msys64_upgraded"
    1. You can now save the file and close Notepad2.

After you're finished re-installing blueCFD-Core, I leave it up to you to decide on how to manage the two MSys64 installations, namely which one you make the default version and which one is the one for doing a specific task.

There are other strategies to make this a cleaner installation, but this was never planned for in the blueCFD-Core project. The primary objective was to release every year a new updated build of OpenFOAM with an updated MSys2 installation, so that each individual installation was self-sufficient... but we haven't had enough time to work on this project, so we ended up not developing/releasing OpenFOAM 6 and blueCFD-Core 2018.

Hopefully we are able to find some time this year to work on this and release the 2019 version, but there aren't any schedules planned for it yet :(

MarineAiry commented 5 years ago

@wyldckat Thank you so much for your help!

With your instructions, I have re-installed blueCFD-Core 2017-2 after renaming the "msys64" folder. I have then built swak4Foam (log file attached below, if you'd like to take a look) and rebuilt numpy, matplotlib etc. that I need for my study. log.make.docx.gz

Just one thing: during the reinstallation there was a warning saying: MS-MPI installation failed with error code 50. A version of MPI that is the same or newer is already installed. But I guess it doesn't matter. Does it ?

Again Thank you so much:)

wyldckat commented 5 years ago

@MarineAiry You're welcome.

Answering in reverse:

  1. The message from MS-MPI is normal, because it was trying to install again, even though it's already installed. Hence that message. Therefore everything should be OK on that point.

  2. As for the log file... yes, everything is fine with swak4Foam!


I'll leave this report open so that I can look into document these issues later on, namely:

  1. How to deal with upgrading the MSys2 software stack and preserve a working shell environment.

  2. What to do if swak4Foam fails to build in this kind of scenario, namely having the incorrect software stack environment... which will essentially point to the first instructions, i.e. how to maintain it.

MarineAiry commented 5 years ago

@wyldckat Thank you a lot for your support and your patience! And even though I am a newbie of blueCFD, in any case I feel so happy to have discussed with you about this!

peaceshielder commented 5 years ago

Hi @wyldckat and other experts. I'm new at OpenFOAM. I've installed both OF6 and OF7 but I can't compile swak4foam yet. log.make.gz

Previously compiled for OpenFOAM () Reading variables from 'swakConfiguration' swakConfiguration: line 1: cygpath: command not found swakConfiguration: line 1: cygpath: command not found sed: -e expression #1, char 0: no previous regular expression Checking swak4Foam-version and generating file Swak version is 0.4.2 ./Allwmake: line 63: wmake: command not found

What can I do? According to wiki's site it caused by shell's problem. But it's not clear. I tried many times but same error has been occurred.

wyldckat commented 5 years ago

@peaceshielder It is not clear within which Operating System you are using and which installation instructions you are following for neither OpenFOAM nor swak4Foam.

This issue tracker is for people who are using the blueCFD-Core installers which we provide here at this project and we currently do not support yet OpenFOAM 6 nor 7.

If you are trying to compile swak4Foam 0.4.2 with OpenFOAM 6 or 7, please ask about this at the dedicated forum for swak4Foam: https://www.cfd-online.com/Forums/openfoam-community-contributions/?pp=40&daysprune=-1&prefixid=openfoam_cc_swak4foam