Strange symbols appear when running a program - fortran

I have a simple Fortran program that read data froma a text file containing mesh data of an object. It uses a module named mesh where are the functions to read the file and put the data in a mesh_container variable
This is the code:
program prueba2
use mesh
! prueba leyendo un archivo mesh .msh
TYPE(mesh_container) :: meshs
Character(len=40) :: file
print *, 'Nombre del archivo'
read *, file
meshs = load_mesh(file)
print *, 'Ahora vamos a esportarlo'
call export_mesh('nuevo.msh',meshs)
! meshs es la variables con los mesh
!call build_solid_faces(meshs)
print *, 'Fino, ojala aiga servido'
end program prueba2
When run this show the result for the cubito.msh:
$ gfortran -o prueba1a constants.f90 mesh.f90 prueba1.f90
$ ./prueba1a
Introduzca el archivo .msh que quiere leer
cubito.msh
Mesh version: 2.2
Mesh file loaded successfully.
- Read 14 nodes
- Read 24 faces
- Read 12 lines
- Read 24 solids
Ahora vamos a esportarlo
Fino, ojala aiga servido, vea el archivo nuevo.msh
But when I add other modules, compile and run again appear this
$ gfortran constants.f90 linalg.f90 aux.f90 mesh.f90 prueba2.f90
$ ./a.out
Nombre del archivo
cubito.msh
Could not open mesh file cubito.mshAhora vamos a esportarlonuevo.mshFino, ojala aiga servidoD�;�O�����l����b����a�������D����l���������������`����H�������D����l~����!
Screenshoot of the terminal
I don't knew why these symbols appear and the program can't recognize the file cubito.msh
But when I type a nonexistent I get this:
$ ./a.out
Nombre del archivo
c
Unrecognized mesh file extension!
This files are in my Github repository, the prueba1 is in the root of repository and prueba2 in the test folder.

Related

error al ejecutar npm run serve dentro de la carpeta frontend [closed]

Closed. This question is not written in English. It is not currently accepting answers.
Stack Overflow is an English-only site. The author must be able to communicate in English to understand and engage with any comments and/or answers their question receives. Don't translate this post for the author; machine translations can be inaccurate, and even human translations can alter the intended meaning of the post.
Closed 8 days ago.
Improve this question
estaria necesitando ayuda ya que al intentar ejecutar npm run serve dentro de mi carpeta front en mi proyecto django saltan los siguientes errores
ERROR Failed to compile with 1 error 13:19:35
[eslint] Failed to load plugin '#typescript-eslint' declared in '.eslintrc.json': Cannot find module 'typescript'
Require stack:
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/util/astUtils.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/util/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/rules/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#eslint/eslintrc/lib/config-array-factory.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#eslint/eslintrc/lib/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/cli-engine/cli-engine.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/cli-engine/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/api.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/getESLint.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/linter.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-plugin-eslint/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-service/lib/Service.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-service/bin/vue-cli-service.js
Referenced from: /home/juan/Escritorio/proyectopersonal/app_front/.eslintrc.json
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in [eslint] Failed to load plugin '#typescript-eslint' declared in '.eslintrc.json': Cannot find module 'typescript'
Require stack:
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/util/astUtils.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/util/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/rules/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#typescript-eslint/eslint-plugin/dist/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#eslint/eslintrc/lib/config-array-factory.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#eslint/eslintrc/lib/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/cli-engine/cli-engine.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/cli-engine/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint/lib/api.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/getESLint.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/linter.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/eslint-webpack-plugin/dist/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-plugin-eslint/index.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-service/lib/Service.js
/home/juan/Escritorio/proyectopersonal/app_front/node_modules/#vue/cli-service/bin/vue-cli-service.js
Referenced from: /home/juan/Escritorio/proyectopersonal/app_front/.eslintrc.json
webpack compiled with 1 error
probe borrar y reinstalar la carpeta node modules pero no hay solución por mas que la reinstalo sigue saltando el mismo error

Execute groovy inside nextflow process using process inputs

I have a nextflow script with a channel for paired file inputs. I am trying to extract a substring from the file inputs to use as part of the shell call. I am trying to use Groovy's regex matching to extract the substring, but since it is based on an input value, I am having trouble executing the matching. An alternative would be to perform the regex in bash as part of the process shell call, but I am interested in figuring out how to manipulate inputs within a process anyways, as I feel it would be useful for other things too. How can I perform intermediate Groovy code with the process inputs prior to the shell call?
process alignment {
input:
val files
output:
stdout
def matcher = "${files[1][0]}" =~ /.+\/bcl2fastq_out\/([^\/]+)\/.+/
# this is the culprit, as if I hardcode the first string it works
def project = matcher.findAll()[0][1]
"""
echo ${project}
"""
}
workflow {
files = Channel
.fromFilePairs("${params.out_dir}/**{_R1,_R2}_00?.fastq.gz", checkIfExists:true, size: 2)
alignment(files)
}
when I execute this, I get the error
No such variable: files
an example input string would look like extractions/test/bcl2fastq_out/project1/example_L001_R1_001.fastq.gz where I'm trying to extract the project1 substring
As you've already discovered, you can declare variables in the script block, before the command string. For example:
process alignment {
input:
tuple val(sample), path(fastq_files)
output:
tuple val(sample), path(output_file)
script:
output_file = "${sample}.bam"
"""
>&2 echo "Aligning ${sample}..."
touch "${output_file}"
"""
}
Note that these are global (within the process scope) unless you define them using the def keyword. If you don't need these elsewhere in your process definition, like in your example, a local variable (using def) is usually preferable. If, however, you need to access these in your output declaration, for example, then they will need to be global.
Note that the fromFilePairs factory method emits a tuple, where the first element is a group key and the second element is a list of files. The problem with just using val to declare the inputs is that the files in the second element will not be localized to the working directory when your script is run. To fix this, you can just change your input definition to something like:
input:
tuple val(sample), path(fastq_files)
The problem with this approach, is that we're unable to extract the parent directory name from the localized filenames. So you will need to pass this in somehow. Usually, you could just get the parent name from the first file in the tuple, using:
params.input_dir = './path/to/files'
params.pattern = '**_R{1,2}_00?.fastq.gz'
process alignment {
debug true
input:
tuple val(sample), val(project), path(fastq_files)
"""
echo "${sample}: ${project}: ${fastq_files}"
"""
}
workflow {
Channel
.fromFilePairs( "${params.input_dir}/${params.pattern}" )
.map { sample, reads ->
def project = reads[0].parent.name
tuple( sample, project, reads )
}
.set { reads }
alignment( reads )
}
But since the glob pattern has an additional wildcard, i.e. _00?, you may not necessarily get the results you expect. For example:
$ mkdir -p path/to/files/project{1,2,3}
$ touch path/to/files/project1/sample1_R{1,2}_00{1,2,3,4}.fastq.gz
$ touch path/to/files/project2/sample2_R{1,2}_00{1,2,3,4}.fastq.gz
$ touch path/to/files/project3/sample3_R{1,2}_00{1,2,3,4}.fastq.gz
$ nextflow run main.nf
N E X T F L O W ~ version 22.04.0
Launching `main.nf` [determined_roentgen] DSL2 - revision: f80ab33ac8
executor > local (12)
[a8/9235cc] process > alignment (12) [100%] 12 of 12 ✔
sample2: project2: sample2_R1_001.fastq.gz sample2_R1_004.fastq.gz
sample1: project1: sample1_R1_003.fastq.gz sample1_R2_001.fastq.gz
sample1: project1: sample1_R1_004.fastq.gz sample1_R2_003.fastq.gz
sample3: project3: sample3_R1_001.fastq.gz sample3_R2_001.fastq.gz
sample1: project1: sample1_R1_001.fastq.gz sample1_R2_004.fastq.gz
sample1: project1: sample1_R1_002.fastq.gz sample1_R2_002.fastq.gz
sample2: project2: sample2_R1_002.fastq.gz sample2_R2_002.fastq.gz
sample2: project2: sample2_R2_001.fastq.gz sample2_R2_004.fastq.gz
sample2: project2: sample2_R1_003.fastq.gz sample2_R2_003.fastq.gz
sample3: project3: sample3_R2_002.fastq.gz sample3_R2_004.fastq.gz
sample3: project3: sample3_R1_003.fastq.gz sample3_R1_004.fastq.gz
sample3: project3: sample3_R1_002.fastq.gz sample3_R2_003.fastq.gz
Fortunately, we can supply a custom file pair grouping strategy using a closure. This uses the readPrefix helper function:
workflow {
Channel
.fromFilePairs( "${params.input_dir}/${params.pattern}" ) { file ->
prefix = Channel.readPrefix(file, params.pattern)
suffix = file.simpleName.tokenize('_').last()
"${file.parent.name}/${prefix}_${suffix}"
}
.map { key, reads ->
def (project, sample) = key.tokenize('/')
tuple( sample, project, reads )
}
.set { reads }
alignment( reads )
}
Results:
$ nextflow run main.nf
N E X T F L O W ~ version 22.04.0
Launching `main.nf` [loving_cantor] DSL2 - revision: 5a76ac712f
executor > local (12)
[f4/74edbc] process > alignment (12) [100%] 12 of 12 ✔
sample1_003: project1: sample1_R1_003.fastq.gz sample1_R2_003.fastq.gz
sample2_002: project2: sample2_R1_002.fastq.gz sample2_R2_002.fastq.gz
sample1_002: project1: sample1_R1_002.fastq.gz sample1_R2_002.fastq.gz
sample2_003: project2: sample2_R1_003.fastq.gz sample2_R2_003.fastq.gz
sample2_004: project2: sample2_R1_004.fastq.gz sample2_R2_004.fastq.gz
sample2_001: project2: sample2_R1_001.fastq.gz sample2_R2_001.fastq.gz
sample1_001: project1: sample1_R1_001.fastq.gz sample1_R2_001.fastq.gz
sample1_004: project1: sample1_R1_004.fastq.gz sample1_R2_004.fastq.gz
sample3_001: project3: sample3_R1_001.fastq.gz sample3_R2_001.fastq.gz
sample3_004: project3: sample3_R1_004.fastq.gz sample3_R2_004.fastq.gz
sample3_002: project3: sample3_R1_002.fastq.gz sample3_R2_002.fastq.gz
sample3_003: project3: sample3_R1_003.fastq.gz sample3_R2_003.fastq.gz
I figured it out, if instead of just jumping into the shell script with the triple quotes, you can start specifying the process execution script with "script:" then run Groovy using the process inputs
process alignment {
input:
val files
output:
stdout
script:
test = (files[1][0] =~ '.+/test/([^/]+)/.+').findAll()[0][1]
"""
echo $test
"""

Mask RCNN OpenVino - C++ API

I would like to implement a custom image classifier using MaskRCNN.
In order to increase the speed of the network, i would like to optimise the inference.
I already used OpenCV DNN library, but i would like to do a step forward with OpenVINO.
I used successfully OpenVINO Model optimiser (python), to build the .xml and .bin file representing my network.
I successfully builded OpenVINO Sample directory with Visual Studio 2017 and run MaskRCNNDemo project.
mask_rcnn_demo.exe -m .\Release\frozen_inference_graph.xml -i .\Release\input.jpg
InferenceEngine:
API version ............ 1.4
Build .................. 19154
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] .\Release\input.jpg
[ INFO ] Loading plugin
API version ............ 1.5
Build .................. win_20181005
Description ....... MKLDNNPlugin
[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (4288, 2848) to (800, 800)
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
[ INFO ] Start inference (1 iterations)
Average running time of one iteration: 2593.81 ms
[ INFO ] Processing output blobs
[ INFO ] Detected class 16 with probability 0.986519: [2043.3, 1104.9], [2412.87, 1436.52]
[ INFO ] Image out.png created!
[ INFO ] Execution successful
Then i tried to reproduce this project in a separate project...
First i had to watch dependancies...
<MaskRCNNDemo>
//References
<format_reader/> => Open CV Images, resize it and get uchar data
<ie_cpu_extension/> => CPU extension for un-managed layers (?)
//Linker
format_reader.lib => Format Reader Lib (VINO Samples Compiled)
cpu_extension.lib => CPU extension Lib (VINO Samples Compiled)
inference_engined.lib => Inference Engine lib (VINO)
opencv_world401d.lib => OpenCV Lib
libiomp5md.lib => Dependancy
... (other libs)
With it i've build a new project, with my own classes and way to open images (multiframe tiff).
This work without problem then i will not describe (i use with a CV DNN inference engine without problem).
I wanted to build the same project than MaskRCNNDemo : CustomIA
<CustomIA>
//References
None => I use my own libtiff way to open image and i resize with OpenCV
None => I will just add include to cpu_extension source code.
//Linker
opencv_world345d.lib => OpenCV 3.4.5 library
tiffd.lib => Libtiff Library
cpu_extension.lib => CPU extension compiled with sample
inference_engined.lib => Inference engine lib.
I added the following dll to the project target dir :
cpu_extension.dll
inference_engined.dll
libiomp5md.dll
mkl_tiny_omp.dll
MKLDNNPlugind.dll
opencv_world345d.dll
tiffd.dll
tiffxxd.dll
I successfully compiled and execute but i faced two issues :
OLD CODE:
slog::info << "Loading plugin" << slog::endl;
InferencePlugin plugin = PluginDispatcher({ FLAGS_pp, "../../../lib/intel64" , "" }).getPluginByDevice(FLAGS_d);
/** Loading default extensions **/
if (FLAGS_d.find("CPU") != std::string::npos) {
/**
* cpu_extensions library is compiled from "extension" folder containing
* custom MKLDNNPlugin layer implementations. These layers are not supported
* by mkldnn, but they can be useful for inferring custom topologies.
**/
plugin.AddExtension(std::make_shared<Extensions::Cpu::CpuExtensions>());
}
/** Printing plugin version **/
printPluginVersion(plugin, std::cout);
OUTPUT :
[ INFO ] Loading plugin
API version ............ 1.5
Build .................. win_20181005
Description ....... MKLDNNPlugin
NEW CODE:
VINOEngine::VINOEngine()
{
// Loading Plugin
std::cout << std::endl;
std::cout << "[INFO] - Loading VINO Plugin..." << std::endl;
this->plugin= PluginDispatcher({ "", "../../../lib/intel64" , "" }).getPluginByDevice("CPU");
this->plugin.AddExtension(std::make_shared<Extensions::Cpu::CpuExtensions>());
printPluginVersion(this->plugin, std::cout);
OUTPUT :
[INFO] - Loading VINO Plugin...
000001A242280A18 // Like memory adress ???
Second Issue :
When i try to extract my ROI and masks from New Code, if i have a "match", i always have :
score =1.0
x1=x2=0.0
y1=y2=1.0
But the mask looks well extracted...
New Code :
float score = box_info[2];
if (score > this->Conf_Threshold)
{
// On reconstruit les coordonnées de la box..
float x1 = std::min(std::max(0.0f, box_info[3] * Image.cols), static_cast<float>(Image.cols));
float y1 = std::min(std::max(0.0f, box_info[4] * Image.rows), static_cast<float>(Image.rows));
float x2 = std::min(std::max(0.0f, box_info[5] * Image.cols), static_cast<float>(Image.cols));
float y2 = std::min(std::max(0.0f, box_info[6] * Image.rows), static_cast<float>(Image.rows));
int box_width = std::min(static_cast<int>(std::max(0.0f, x2 - x1)), Image.cols);
int box_height = std::min(static_cast<int>(std::max(0.0f, y2 - y1)), Image.rows);
Image is resized from (4288, 2848) to (800, 800)
Detected class 62 with probability 1: [4288, 0], [4288, 0]
Then it is impossible for me to place the mask in the image and resize it while i don't have correct bbox coordinate...
Do anybody have an idea about what i make badly ?
How to create and link correctly an OpenVINO project using cpu_extension ?
Thanks !
First issue with version: look above printPluginVersion function, you will see overloaded std::ostream operators for InferenceEngine and plugin version info.
Second: You can try to debug your model by comparing output after very first convolution and output layer for original framework and OV. Make sure it's equal element by element.
In OV you can use network.addOutput("layer_name") to add any layer to output. Then read output by using: const Blob::Ptr debug_blob = infer_request.GetBlob("layer_name").
Most of the time with issues like this i finding missing of input pre-processing (mean, normalization, etc.)
cpu_extensions is a dynamic library, but you still can change cmake script to make it static and link it with your application. After that you would need to use your application path with call to IExtensionPtr extension_ptr = make_so_pointer(argv[0])

Trouble installing wxWIDGETS w/CodeLite

I am trying to install wxWIDGETS w/CodeLite by following their instructions and it does not work. I am stuck on a step. Can you please help me? In case you're wondering, wxWIDGETS is a gui library for C++:
Hello, I am trying to reinstall wxWIDGETS from the ground up. Here's
what I've done so far in one of the easiest explanations yet:
I went on here for installation help with MINGW (the compiler):
https://wiki.wxwidgets.org/Installing_M ... er_Windows
I went on here for installation help on compiling wxWIDGETS with MinGW
(to install it, am I right?): https://wiki.wxwidgets.org/Compiling_wx
... tall_MinGW
I've also done this: https://wiki.wxwidgets.org/Adding_an_En ...
er_Windows
I've downloaded MinGW from here:
http://sourceforge.net/projects/mingw/f ... e/download & then I've
reinstalled it.
So, here's what I've done so far:
Uninstalled/removed wxWIDGETS & MinGW (the compiler, I've
uninstalled/removed all of my compilers) → Reinstalled/re-added MinGW
and wxWIDGETS (https://www.wxwidgets.org/downloads/, I took the
Windows Installer under Source) → Followed these steps:
https://wiki.wxwidgets.org/Installing_M ... er_Windows → Followed
these steps: https://wiki.wxwidgets.org/Adding_an_En ... er_Windows →
Followed these steps: https://wiki.wxwidgets.org/Compiling_wx ...
with_MinGW → Now I'm at the "Build the library" step and I'm
specifically on "Clean up the source:" and I am stuck on this step
w/an error that says "gcc_mswundll/wxjpeg_jctrans.o.d:1: *** missing
separator. Stop." how can I fix this? Can you please assist me?
Please help.
Update 11/3/2015:
This is the full-log of what I've done. I've deleted/removed and reinstalled CodeLite, wxWIDGETS, and even my minGW compiler & followed instructions as advised # https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW
Now here is the full log as requested:
C:\Windows\system32>CD C:\wxWidgets-3.0.2\build\msw
C:\wxWidgets-3.0.2\build\msw>mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUI
LD=release clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
if exist ..\..\lib\gcc_dll\libwxpng.a del ..\..\lib\gcc_dll\libwxpng.a
if exist ..\..\lib\gcc_dll\libwxjpeg.a del ..\..\lib\gcc_dll\libwxjpeg.a
if exist ..\..\lib\gcc_dll\libwxtiff.a del ..\..\lib\gcc_dll\libwxtiff.a
if exist ..\..\lib\gcc_dll\libwxexpat.a del ..\..\lib\gcc_dll\libwxexpat.a
if exist ..\..\lib\gcc_dll\libwxscintilla.a del ..\..\lib\gcc_dll\libwxscintilla
.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw30
u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\libwxmsw30u.a del ..\..\lib\gcc_dll\libwxmsw30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase
30u_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\libwxbase30u.a del ..\..\lib\gcc_dll\libwxbase30u.a
if exist ..\..\lib\gcc_dll\wxbase30u_net_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base30u_net_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u
_net.a
if exist ..\..\lib\gcc_dll\libwxbase30u_net.a del ..\..\lib\gcc_dll\libwxbase30u
_net.a
if exist ..\..\lib\gcc_dll\wxmsw30u_core_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw30u_core_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_
core.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_core.a del ..\..\lib\gcc_dll\libwxmsw30u_
core.a
if exist ..\..\lib\gcc_dll\wxmsw30u_adv_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw30u_adv_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_a
dv.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_adv.a del ..\..\lib\gcc_dll\libwxmsw30u_a
dv.a
if exist ..\..\lib\gcc_dll\wxmsw30u_media_gcc_custom.dll del ..\..\lib\gcc_dll\w
xmsw30u_media_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u
_media.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_media.a del ..\..\lib\gcc_dll\libwxmsw30u
_media.a
if exist ..\..\lib\gcc_dll\wxmsw30u_html_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw30u_html_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_
html.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_html.a del ..\..\lib\gcc_dll\libwxmsw30u_
html.a
if exist ..\..\lib\gcc_dll\wxmsw30u_webview_gcc_custom.dll del ..\..\lib\gcc_dll
\wxmsw30u_webview_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw3
0u_webview.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_webview.a del ..\..\lib\gcc_dll\libwxmsw3
0u_webview.a
if exist ..\..\lib\gcc_dll\wxmsw30u_qa_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w30u_qa_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa
.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_qa.a del ..\..\lib\gcc_dll\libwxmsw30u_qa
.a
if exist ..\..\lib\gcc_dll\wxbase30u_xml_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base30u_xml_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u
_xml.a
if exist ..\..\lib\gcc_dll\libwxbase30u_xml.a del ..\..\lib\gcc_dll\libwxbase30u
_xml.a
if exist ..\..\lib\gcc_dll\wxmsw30u_xrc_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw30u_xrc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_x
rc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_xrc.a del ..\..\lib\gcc_dll\libwxmsw30u_x
rc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_aui_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw30u_aui_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_a
ui.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_aui.a del ..\..\lib\gcc_dll\libwxmsw30u_a
ui.a
if exist ..\..\lib\gcc_dll\wxmsw30u_ribbon_gcc_custom.dll del ..\..\lib\gcc_dll\
wxmsw30u_ribbon_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30
u_ribbon.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_ribbon.a del ..\..\lib\gcc_dll\libwxmsw30
u_ribbon.a
if exist ..\..\lib\gcc_dll\wxmsw30u_propgrid_gcc_custom.dll del ..\..\lib\gcc_dl
l\wxmsw30u_propgrid_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw
30u_propgrid.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_propgrid.a del ..\..\lib\gcc_dll\libwxmsw
30u_propgrid.a
if exist ..\..\lib\gcc_dll\wxmsw30u_richtext_gcc_custom.dll del ..\..\lib\gcc_dl
l\wxmsw30u_richtext_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw
30u_richtext.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_richtext.a del ..\..\lib\gcc_dll\libwxmsw
30u_richtext.a
if exist ..\..\lib\gcc_dll\wxmsw30u_stc_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw30u_stc_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_s
tc.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_stc.a del ..\..\lib\gcc_dll\libwxmsw30u_s
tc.a
if exist ..\..\lib\gcc_dll\wxmsw30u_gl_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w30u_gl_gcc_custom.dll
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl
.a
if exist ..\..\lib\gcc_dll\libwxmsw30u_gl.a del ..\..\lib\gcc_dll\libwxmsw30u_gl
.a
mingw32-make -C ..\..\samples -f makefile.gcc LINK_DLL_FLAGS="-shared" LINK_MODU
LE_FLAGS="-shared" CC="gcc" CXX="g++" CFLAGS="" CXXFLAGS="" CPPFLAGS="" LDFLAGS=
"" CPP="gcc -E" SHARED="1" TOOLKIT_VERSION="" WXUNIV="0" UNICODE="1" MSLU="0" BU
ILD="release" DEBUG_INFO="default" DEBUG_FLAG="1" MONOLITHIC="0" USE_GUI="1" USE
_HTML="1" USE_WEBVIEW="1" USE_MEDIA="1" USE_XRC="1" USE_AUI="1" USE_RIBBON="1" U
SE_PROPGRID="1" USE_RICHTEXT="1" USE_STC="1" USE_OPENGL="1" USE_QA="0" USE_EXCEP
TIONS="1" USE_RTTI="1" USE_THREADS="1" USE_CAIRO="0" OFFICIAL_BUILD="0" VENDOR="
custom" WX_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS=""
RUNTIME_LIBS="dynamic" GCC_VERSION="3" WINDRES="windres --use-temp-file" clean
mingw32-make[1]: Entering directory 'C:/wxWidgets-3.0.2/samples'
if exist .\*.o del .\*.o
if exist .\*.d del .\*.d
mingw32-make -C access -f makefile.gcc LINK_DLL_FLAGS="-shared" LINK_MODULE_FLAG
S="-shared" CC="gcc" CXX="g++" CFLAGS="" CXXFLAGS="" CPPFLAGS="" LDFLAGS="" CPP=
"gcc -E" SHARED="1" TOOLKIT_VERSION="" WXUNIV="0" UNICODE="1" MSLU="0" BUILD="re
lease" DEBUG_INFO="default" DEBUG_FLAG="1" MONOLITHIC="0" USE_GUI="1" USE_HTML="
1" USE_WEBVIEW="1" USE_MEDIA="1" USE_XRC="1" USE_AUI="1" USE_RIBBON="1" USE_PROP
GRID="1" USE_RICHTEXT="1" USE_STC="1" USE_OPENGL="1" USE_QA="0" USE_EXCEPTIONS="
1" USE_RTTI="1" USE_THREADS="1" USE_CAIRO="0" OFFICIAL_BUILD="0" VENDOR="custom"
WX_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIM
E_LIBS="dynamic" GCC_VERSION="3" WINDRES="windres --use-temp-file" clean
mingw32-make[2]: Entering directory 'C:/wxWidgets-3.0.2/samples/access'
makefile.gcc:1: *** missing separator. Stop.
mingw32-make[2]: Leaving directory 'C:/wxWidgets-3.0.2/samples/access'
makefile.gcc:44: recipe for target 'clean' failed
mingw32-make[1]: *** [clean] Error 2
mingw32-make[1]: Leaving directory 'C:/wxWidgets-3.0.2/samples'
makefile.gcc:5096: recipe for target 'clean' failed
mingw32-make: *** [clean] Error 2
It looks like you've tried something different before as you shouldn't have any .d files in the first place if this were your first attempt to build. So to begin with you should return to the clean state: either delete your existing directory entirely and unpack the archive again or, if you're using git, do git clean -dfx (warning: this will delete all files not under version control).
After this running mingw32-make -f makefile.gcc (with any extra options you need, such as BUILD=release) in build\msw subdirectory should work. If it doesn't, please update your question with the full command you used and its full output, and also mention which version of MinGW and wxWidgets exactly did you use.

How the detect whether a file with a typical extension exists by using Fortran

My problem is like this,
Say there is a folder named as 'Input' containing some files. The names of these files are like *.nod, *.elem etc. The major part of the file name is given by the end-users.
Now, I want to detect whether any *.nod exists in the folder and get the major part of the file name to generate some output files.
For example, if there is test.nod. Firstly, I want to detect whether this file exists. If yes, I need to get the character 'test', and use it to name a output file, e.g., 'test.rst'
I did not find any solution of this problem on Internet.
Found at Rosettacode.org:
LOGICAL :: file_exists
INQUIRE(FILE="input.txt", EXIST=file_exists) ! file_exists will be TRUE if the file
! exists and FALSE otherwise
INQUIRE(FILE="/input.txt", EXIST=file_exists)
Edit:
CHARACTER(10) :: extension="nod"
CHARACTER(255) :: cfile
IF(os == "unix") THEN
CALL system('ls -1 *.'//TRIM(extension)//'> list')
ELSE
CALL system('dir /b/on *.'//TRIM(extension)//'> list')
ENDIF
open and read file list with the format "(A)" e.g.
OPEN(15,file="list")
READ(15,"(A)",END=10) cfile
If you are using Linux, you can do this by using the system command together with the basename command. Here, the obtained basename is saved in "_tmp_" and then read into a character string.
character(50) :: base
logical :: ok
call system( "cd input; rm -f _tmp_; [ -f *.nod ] && basename *.nod .nod > _tmp_" )
inquire( file="input/_tmp_", exist=ok )
if ( ok ) then
open( 10, file="input/_tmp_", status="old" )
read( 10, * ) base
close( 10 )
print *, "basename = ", trim(base)
else
stop "*.nod not found :("
endif
! open( 20, file=trim(base) // ".rst" ) ! open new files
If there are many *.nod files and all the base names need to be extracted, it may be useful to do something like this (thanks to #Vladimir and #RolfofSaxony):
!> A pattern using for loops in the shell script.
! call system( "cd input; rm -f _tmp_; for f in *.nod; do basename -s .nod $f >> _tmp_; done" )
!> Another pattern using -s option for basename command.
! call system( "cd input; rm -f _tmp_; basename -s .nod *.nod > _tmp_" )
If your compiler is sufficiently new, you can use execute_command_line in Fortran2008 (Ref) which is the standardized version of system and makes the code more portable:
call execute_command_line( "...." )